blob: 5082393b4a0d141735b0fc3c0fd2674810ae9da4 [file] [log] [blame]
<html>
<head>
<title>HIERARCHY_REQUEST_ERR raised if @import rule inserted after a regular rule</title>
<style type="text/css">
body {color: Blue; }
div {color: Red; }
</style>
<script>
if (window.testRunner)
window.testRunner.dumpAsText();
</script>
</head>
<body>
<div>This text should be red and the page should have no other style.</div>
<div id="testresult">Fail</div>
<script type="text/javascript">
try
{
document.styleSheets[0].insertRule("@import url(testStyle1.css);", 1);
}
catch(e)
{
if(window.getComputedStyle(document.body, "").getPropertyValue("background-color") == "rgba(0, 0, 0, 0)" && document.styleSheets[0].cssRules.length == 2)
{
document.getElementById("testresult").innerHTML = "Pass";
}
}
</script>
</body>
</html>