Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / nth-child-implied-step.html
blob1b112f274d20f4d3847f9656451a1da5603fdfc8
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
2 <html>
3 <head>
4 <title>CSS Test: :nth-child selector with implied step</title>
5 <style type="text/css">
6 div div:nth-child(+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 only the first DIV is green.</p>
18 <div id="test">
19 <div>DIV1</div>
20 <div>DIV2</div>
21 <div>DIV3</div>
22 <div>DIV4</div>
23 <div>DIV5</div>
24 <div>DIV6</div>
25 <div>DIV7</div>
26 <div>DIV8</div>
27 <div>DIV9</div>
28 <div>DIV10</div>
29 </div>
30 <div id="testresult" style="color: blue">Running</div>
31 <script type="text/javascript">
32 function ArrayContains(array, value, ci)
34 ci = ci == true ? true : false;
35 for (var i = 0; i < array.length; i++)
37 if (ci && array[i].toLowerCase() == value.toLowerCase())
39 return true;
41 else if (array[i] == value)
43 return true;
46 return false;
49 function TestCase()
51 try
53 var greenValues = new Array("green", "#008000", "rgb(0, 128, 0)");
55 var elem = document.getElementById("test");
56 var val = getComputedStyle(elem.children[0], null).getPropertyValue("color");
57 if (ArrayContains(greenValues, val, false))
59 document.getElementById("testresult").innerHTML = "Pass";
60 return;
63 catch(e){}
64 document.getElementById("testresult").innerHTML = "Fail";
66 TestCase();
67 </script>
68 </body>
69 </html>