OLD | NEW |
| (Empty) |
1 <?xml-stylesheet href="data:text/css,@import url(http://localhost:8080/css/resou
rces/slow-loading-sheet.php?color=pink); h1 {color:red}" type="text/css"?> | |
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/
DTD/xhtml11.dtd"> | |
3 <html xmlns="http://www.w3.org/1999/xhtml"> | |
4 <head> | |
5 <style title="myset"></style> | |
6 </head> | |
7 <body> | |
8 <h1></h1> | |
9 <pre id="res"></pre> | |
10 <script> | |
11 if (window.testRunner) | |
12 testRunner.dumpAsText(); | |
13 | |
14 var result = ""; | |
15 | |
16 function expectComputedOnH1(name, expected) { | |
17 var value = getComputedStyle(document.querySelector("h1"))[name]; | |
18 result += name + ": "; | |
19 if (value == expected) | |
20 result += "PASS\n"; | |
21 else | |
22 result += "FAIL - " + value + ", expected " + expected + "\n"; | |
23 } | |
24 | |
25 document.body.offsetTop; | |
26 expectComputedOnH1("color", "rgb(0, 0, 0)"); | |
27 expectComputedOnH1("backgroundColor", "rgba(0, 0, 0, 0)"); | |
28 | |
29 document.querySelector("#res").innerHTML = result; | |
30 </script> | |
31 </body> | |
32 </html> | |
OLD | NEW |