blob: 1417922f0c67e57b73cba01834db7af840a63ecb [file] [log] [blame]
<!doctype html>
<html>
<head>
<title>Test for Bug 35014 - Modifying UA rules from page JS crashes</title>
<script>
if (window.testRunner)
testRunner.dumpAsText();
function test()
{
var cssRulesList = window.getMatchedCSSRules(document.body, "", false);
if (cssRulesList)
{
var styleToChange = cssRulesList[0].style;
var originalMarginTop = styleToChange.marginTop;
styleToChange.marginTop = "200px";
styleToChange.marginTop = originalMarginTop;
document.getElementById("result").innerHTML = "FAIL";
}
}
</script>
</head>
<body onload="test()">
<div id="result">
PASS
</div>
</body>
</html>