5 <style type=
"text/css" media=
"screen">
7 background-color: green;
12 background-color: green;
17 /* These selectors should be ignored */
19 background-color: red;
22 background-color: red;
25 background-color: red;
29 if (window
.testRunner
)
30 testRunner
.dumpAsText();
34 var expected
= getComputedStyle(document
.getElementById("green"), null).backgroundColor
;
35 var actual
= getComputedStyle(document
.getElementById("test1"), null).backgroundColor
;
37 if (actual
!= expected
)
38 result
= "Expected " + expected
+ ", but comes " + actual
;
39 document
.getElementById("result").innerHTML
= result
;
41 var invalidSelectors
= [":first", ":left", ":right", "::first", "::left", "::right",
42 ".login-popup:first", ".login-popup:left", ".login-popup:right", ".login-popup::first", ".login-popup::left", ".login-popup::right"];
43 for (var testId
= 2; testId
<= 13; testId
++) {
44 var element
= document
.getElementById("test" + testId
);
45 var invalidSelector
= invalidSelectors
[testId
- 2];
47 document
.querySelectorAll(invalidSelector
);
48 element
.innerHTML
= "Test " + testId
+ ": FAIL";
50 element
.innerHTML
= "Test " + testId
+ ": PASS";
51 element
.style
.color
= "green";
57 <body onload=
"test()">
60 Test case for
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=38272">SHOULD NEVER BE REACHED assertion loading forbes.com
</a>.
61 Paged media related pseudo-classes should be ignored outside of @page.
64 You should see a green box for Test
1,
"Test n: PASS" for the rest.
66 <div id=
"green"></div>
67 <div id=
"test1"></div>
68 <div id=
"test2" class=
"exception_test">Test
2: Didn't run
</div>
69 <div id=
"test3" class=
"exception_test">Test
3: Didn't run
</div>
70 <div id=
"test4" class=
"exception_test">Test
4: Didn't run
</div>
71 <div id=
"test5" class=
"exception_test">Test
5: Didn't run
</div>
72 <div id=
"test6" class=
"exception_test">Test
6: Didn't run
</div>
73 <div id=
"test7" class=
"exception_test">Test
7: Didn't run
</div>
74 <div id=
"test8" class=
"exception_test">Test
8: Didn't run
</div>
75 <div id=
"test9" class=
"exception_test">Test
9: Didn't run
</div>
76 <div id=
"test10" class=
"exception_test">Test
10: Didn't run
</div>
77 <div id=
"test11" class=
"exception_test">Test
11: Didn't run
</div>
78 <div id=
"test12" class=
"exception_test">Test
12: Didn't run
</div>
79 <div id=
"test13" class=
"exception_test">Test
13: Didn't run
</div>
80 <div id=
"result"></div>