Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / nth-child-odd-case-insensitive.html
blob85ab278dd317ccc721cf4d9e85e39b79d9ac0b8a
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
2 <html>
3 <head>
4 <title>CSS Test: :nth-child selector 'odd' keyword case sensitivity</title>
5 <style type="text/css">
6 div div:nth-child(OdD)
8 color: green;
10 </style>
11 </head>
12 <body>
13 <p>The test passes if the odd numbered DIVs are green.</p>
14 <div id="test">
15 <div>DIV1</div>
16 <div>DIV2</div>
17 </div>
18 <div id="testresult" style="color: blue">Running</div>
19 <script type="text/javascript">
20 if (window.testRunner)
21 testRunner.dumpAsText();
23 function ArrayContains(array, value, ci)
25 ci = ci == true ? true : false;
26 for (var i = 0; i < array.length; i++)
28 if (ci && array[i].toLowerCase() == value.toLowerCase())
30 return true;
32 else if (array[i] == value)
34 return true;
37 return false;
39 function TestCase()
42 try
44 var greenValues = new Array("green", "#008000", "rgb(0, 128, 0)");
46 var elem = document.getElementById("test");
47 var val = getComputedStyle(elem.children[0], null).getPropertyValue("color");
48 if (ArrayContains(greenValues, val, false))
50 document.getElementById("testresult").innerHTML = "Pass";
51 return;
54 catch(e){}
56 document.getElementById("testresult").innerHTML = "Fail";
59 TestCase();
60 </script>
61 </body>
62 </html>