Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / css-properties-case-insensitive.html
blob9f55fe63052a4807b2db7eb50abc590bc3afb69d
1 <html>
2 <head>
3 <title>getPropertyValue should be case insensitive</title>
4 <script>
5 function log(msg)
7 var console = document.getElementById('console');
8 console.appendChild(document.createTextNode(msg + "\n"));
11 function test()
13 var test;
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"));
34 </script>
35 </head>
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>
38 <p>References</p>
39 <ul>
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>
42 </ul>
43 <p id="test">This paragraph should be green, and not bold when the test completes.</p>
44 <pre id='console'></pre>
45 </body>
46 </html>