blob: a14adf4bd0f4f61a9476fb091fd6292bd71266d6 [file] [log] [blame]
<html>
<head>
<title>Property is declared twice in rule</title>
<style type="text/css">
div
{
color: red;
color: green !important;
color: yellow;
width: 1px;
width: 2px !important;
width: 3px !important;
}
</style>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
</head>
<body>
<div>This text should be green and the page should have no other style.</div>
<div id="testresult">Fail</div>
<script type="text/javascript">
if(document.styleSheets[0].cssRules[0].style.length == 2 &&
document.styleSheets[0].cssRules[0].style.getPropertyValue("color") == "green" &&
document.styleSheets[0].cssRules[0].style.getPropertyPriority("color") == "important" &&
document.styleSheets[0].cssRules[0].style.getPropertyValue("width") == "3px" &&
document.styleSheets[0].cssRules[0].style.getPropertyPriority("width") == "important")
{
document.getElementById("testresult").innerHTML = "Pass";
}
</script>
</body>
</html>