OLD | NEW |
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/
DTD/xhtml11.dtd"> | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/
DTD/xhtml11.dtd"> |
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head> | 2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head> |
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | 3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 <link rel="stylesheet" href="resources/basic.css" type="text/css"> | 4 <link rel="stylesheet" href="resources/basic.css" type="text/css"> |
5 <link rel="stylesheet" href="resources/small.css" type="text/css"> | 5 <link rel="stylesheet" href="resources/small.css" type="text/css"> |
6 <link rel="stylesheet" href="resources/normal.css" title="Different layout" ty
pe="text/css"> | 6 <link rel="stylesheet" href="resources/normal.css" title="Different layout" ty
pe="text/css"> |
7 <link rel="alternate stylesheet" href="resources/high.css" type="text/css"> | 7 <link rel="alternate stylesheet" href="resources/high.css" type="text/css"> |
8 <script src="../js/resources/js-test-pre.js"></script> | 8 <script src="../js/resources/js-test-pre.js"></script> |
9 </head> | 9 </head> |
10 <body> | 10 <body> |
11 <h1 id="firstH1">Alternate stylesheets</h1> | 11 <h1 id="firstH1">Alternate stylesheets</h1> |
12 | 12 |
13 <p id="textLine">This document has 3 stylesheets, one with a title, and 1 alte
rnate stylesheet. It should:</p> | 13 <p id="textLine">This document has 3 stylesheets, one with a title, and 1 alte
rnate stylesheet. It should:</p> |
14 | 14 |
15 <ul> | 15 <ul> |
16 <li>Have a green border at the top of the page</li> | 16 <li>Have a green border at the top of the page</li> |
17 <li>An underlined <code>H1</code></li> | 17 <li>An underlined <code>H1</code></li> |
18 <li>12px text</li> | 18 <li>12px text</li> |
19 </ul> | 19 </ul> |
20 | 20 |
21 <script> | 21 <script> |
22 description("Alternate stylesheet (link) title test 5"); | 22 description("Alternate stylesheet (link) title test 5"); |
23 | 23 |
24 if (window.testRunner) | 24 if (window.testRunner) |
25 testRunner.dumpAsText(); | 25 testRunner.dumpAsText(); |
26 | 26 |
27 window.onload = function () { | 27 window.onload = function () { |
28 element = document.getElementById("firstH1"); | 28 element = document.getElementById("firstH1"); |
29 shouldBe("getComputedStyle(element).getPropertyValue('text-decoration')",
"'underline'"); | 29 shouldBe("getComputedStyle(element).getPropertyValue('text-decoration')",
"'underline solid rgb(51, 51, 51)'"); |
30 | 30 |
31 element = document.getElementById("textLine"); | 31 element = document.getElementById("textLine"); |
32 shouldBe("getComputedStyle(element).getPropertyValue('font-size')", "'12px
'"); | 32 shouldBe("getComputedStyle(element).getPropertyValue('font-size')", "'12px
'"); |
33 | 33 |
34 shouldBe("getComputedStyle(document.body).getPropertyValue('border-top-col
or')", "'rgb(0, 128, 0)'"); | 34 shouldBe("getComputedStyle(document.body).getPropertyValue('border-top-col
or')", "'rgb(0, 128, 0)'"); |
35 wasPostTestScriptParsed = true; | 35 wasPostTestScriptParsed = true; |
36 finishJSTest(); | 36 finishJSTest(); |
37 } | 37 } |
38 </script> | 38 </script> |
39 | 39 |
40 </body> | 40 </body> |
41 </html> | 41 </html> |
OLD | NEW |