2 <!-- Adapted from http://samples.msdn.microsoft.com/ietestcenter/css3/selectors/notSelectorSequence.htm -->
5 <title>:not selector with simple selector sequence
</title>
6 <style type=
"text/css">
11 /* div#foo is not a simple selector, but a simple selector sequence.
12 Hence :not(div#foo) is invalid and the entire rule must be dropped.
13 The same applies for others below. */
14 div
, div:not
(div#foo
) {
17 div
, div:not
(div
.bar
) {
20 div
, div:not
(#foo
.bar
) {
23 div
, div:not
([name
="x"]#foo
) {
26 div
, div:not
(:nth-child
(odd
).bar
) {
32 <p>The test passes if the Filler Text below is green.
</p>
33 <div id=
"test">Filler Text
</div>
34 <div id=
"testresult" style=
"color: blue">Running
</div>
35 <script type=
"text/javascript">
36 function ArrayContains(array
, value
, ci
)
38 for (var i
= 0; i
< array
.length
; i
++) {
39 if (ci
&& array
[i
].toLowerCase() == value
.toLowerCase())
41 else if (array
[i
] == value
)
49 var target
= document
.getElementById("test");
50 var val
= getComputedStyle(target
, null).getPropertyValue("color");
51 var aExpectedValues
= new Array("green", "#008000", "rgb(0, 128, 0)");
53 if (ArrayContains(aExpectedValues
, val
, true)) {
54 document
.getElementById("testresult").innerHTML
= "Pass";
59 document
.getElementById("testresult").innerHTML
= "Fail";
62 if (window
.testRunner
)
63 testRunner
.dumpAsText();