2010-04-30 Shinichiro Hamaji <hamaji@chromium.org>
[WebKit-https.git] / LayoutTests / printing / pseudo-class-outside-page.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4
5 <style type="text/css" media="screen">
6     #green {
7         background-color: green;
8     }
9     #test {
10         width: 100px;
11         height: 100px;
12         background-color: green;
13     }
14     /* These selectors should be ignored */
15     #test:first {
16         background-color: red;
17     }
18     #test:left {
19         background-color: red;
20     }
21     #test:right {
22         background-color: red;
23     }
24 </style>
25 <script>
26     if (window.layoutTestController)
27         layoutTestController.dumpAsText();
28
29     function test()
30     {
31         var expected = getComputedStyle(document.getElementById("green"), null).backgroundColor;
32         var actual = getComputedStyle(document.getElementById("test"), null).backgroundColor;
33         var result = "PASS";
34         if (actual != expected)
35             result = "Expected " + expected + ", but comes " + actual;
36         document.getElementById("result").innerHTML = result;
37     }
38 </script>
39 </head>
40 <body onload="test()">
41
42 <p>
43 Test case for <a href="https://bugs.webkit.org/show_bug.cgi?id=38272">SHOULD NEVER BE REACHED assertion loading forbes.com</a>.
44 Paged media related pseudo-classes should be ignored outside of @page.
45
46 <p>
47 You should see a green box.
48
49 <div id="green"></div>
50 <div id="test"></div>
51 <div id="result"></div>
52
53 </body>
54 </html>