Regression(r188105): Seems to have caused crashes during PLT on some iPads
[WebKit-https.git] / LayoutTests / fast / css / div_plus_nav_bug47971.html
1 <!DOCTYPE HTML>
2
3 <style>
4 #one + nav { color: green; }
5 #two+nav { color: green; }
6 #three +nav { color: green; }
7 #four+ nav { color: green; }
8 label+nav { color: green; }
9 </style>
10
11 <p>Testing label+nav selector. The test passes if all NAVs are green.</p>
12
13 <div id="one"></div>
14 <nav id="nav1">NAV1</nav>
15
16 <div id="two"></div>
17 <nav id="nav2">NAV2</nav>
18
19 <div id="three"></div>
20 <nav id="nav3">NAV4</nav>
21
22 <div id="four"></div>
23 <nav id="nav4">NAV5</nav>
24
25 <label></label>
26 <nav id="nav5">NAV6</nav>
27
28 <script type="text/javascript">
29 if (window.testRunner)
30   window.testRunner.dumpAsText();
31
32 function runTest(element)
33 {
34     var greenValues = [
35         "rgb(0, 128, 0)", // WebKit, Firefox 4, IE9
36         "#008000" // Opera 11.11
37     ];
38
39     var elem = document.getElementById(element);
40     var val = getComputedStyle(elem, null).getPropertyValue("color");
41     
42     if (greenValues.indexOf(val.toLowerCase()) != -1)
43        document.writeln("Pass: " + element + ".<br />");
44     else
45        document.writeln("Fail: " + element + " actual color is \"" + val + "\".<br />");
46 }
47
48 runTest("nav1");
49 runTest("nav2");
50 runTest("nav3");
51 runTest("nav4");
52 runTest("nav5");
53 </script>