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; }
11 <p>Testing label+nav selector. The test passes if all NAVs are green.
</p>
14 <nav id=
"nav1">NAV1
</nav>
17 <nav id=
"nav2">NAV2
</nav>
19 <div id=
"three"></div>
20 <nav id=
"nav3">NAV4
</nav>
23 <nav id=
"nav4">NAV5
</nav>
26 <nav id=
"nav5">NAV6
</nav>
28 <script type=
"text/javascript">
29 if (window
.testRunner
)
30 window
.testRunner
.dumpAsText();
32 function runTest(element
)
35 "rgb(0, 128, 0)", // WebKit, Firefox 4, IE9
36 "#008000" // Opera 11.11
39 var elem
= document
.getElementById(element
);
40 var val
= getComputedStyle(elem
, null).getPropertyValue("color");
42 if (greenValues
.indexOf(val
.toLowerCase()) != -1)
43 document
.writeln("Pass: " + element
+ ".<br />");
45 document
.writeln("Fail: " + element
+ " actual color is \"" + val
+ "\".<br />");