3 <title>getPropertyValue should be case insensitive
</title>
7 var console
= document
.getElementById('console');
8 console
.appendChild(document
.createTextNode(msg
+ "\n"));
14 var lowerValue
, upperValue
;
16 if (window
.testRunner
)
17 testRunner
.dumpAsText();
19 test
= document
.getElementById('test');
20 lowerValue
= document
.defaultView
.getComputedStyle(test
, "").getPropertyValue("width");
21 upperValue
= document
.defaultView
.getComputedStyle(test
, "").getPropertyValue("WIDTH");
22 log("getPropertyValue: " + (lowerValue
=== upperValue
? "PASS" : "FAIL"));
24 test
.style
.setProperty("color", "#ff0000", null);
25 test
.style
.setProperty("COLOR", "#00cc00", null);
26 lowerValue
= document
.defaultView
.getComputedStyle(test
, "").getPropertyValue("color");
27 log("setProperty: " + (lowerValue
== "rgb(0, 204, 0)" ? "PASS" : "FAIL"));
29 test
.style
.setProperty("font-weight", "bold", null);
30 test
.style
.removeProperty("FONT-WEIGHT");
31 lowerValue
= document
.defaultView
.getComputedStyle(test
, "").getPropertyValue("font-weight");
32 log("removeProperty: " + (lowerValue
== "normal" ? "PASS" : "FAIL"));
36 <body onload=
"test();">
37 <p>Property names retrieved by getPropertyValue, setProperty, removeProperty and others must be treated as case insensitive. This test ensures that they are.
</p>
40 <li><a href=
"http://bugs.webkit.org/show_bug.cgi?id=14645">http://bugs.webkit.org/show_bug.cgi?id=
14645</a></li>
41 <li><a href=
"http://www.w3.org/TR/CSS1#forward-compatible-parsing">http://www.w3.org/TR/CSS1#forward-compatible-parsing
</a></li>
43 <p id=
"test">This paragraph should be green, and not bold when the test completes.
</p>
44 <pre id='console'
></pre>