Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / nth-child-unary-prefix.html
blobbac130e490e7c7c6a9a23afb1946c599c41fc73d
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
2 <html>
3 <head>
4 <title>CSS Test: :nth-child selector with unary prefix on step</title>
5 <style type="text/css">
6 div div:nth-child(+2n+1)
8 color: green;
10 </style>
11 <script>
12 if (window.testRunner)
13 window.testRunner.dumpAsText()
14 </script>
15 </head>
16 <body>
17 <p>The test passes if the odd numbered DIVs are green.</p>
18 <div id="test">
19 <div>DIV1</div>
20 <div>DIV2</div>
21 </div>
22 <div id="testresult" style="color: blue">Running</div>
23 <script type="text/javascript">
24 function ArrayContains(array, value, ci)
26 ci = ci == true ? true : false;
27 for (var i = 0; i < array.length; i++)
29 if (ci && array[i].toLowerCase() == value.toLowerCase())
31 return true;
33 else if (array[i] == value)
35 return true;
38 return false;
40 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;
53 }catch(e){}
54 document.getElementById("testresult").innerHTML = "Fail";
56 TestCase();
57 </script>
58 </body>
59 </html>