OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style> | 4 <style> |
5 * { color: red; } | 5 * { color: red; } |
6 </style> | 6 </style> |
7 <script> | 7 <script> |
8 if (window.testRunner) { | 8 if (window.testRunner) { |
9 testRunner.dumpAsText(); | 9 testRunner.dumpAsText(); |
10 testRunner.addUserStyleSheet("div { width:0; }", true); | 10 testRunner.addUserStyleSheet("div { width:0; }", true); |
11 } | 11 } |
12 </script> | 12 </script> |
13 </head> | 13 </head> |
14 <body> | 14 <body> |
15 This test requires layout test runner. | 15 This test requires layout test runner. |
16 <div id="target">FAIL</div> | 16 <div id="target">FAIL</div> |
17 <script> | 17 <script> |
18 var style = document.createElement("style"); | 18 var style = document.createElement("style"); |
19 style.innerText = "* { color: blue; }"; | 19 style.innerText = "* { color: blue; }"; |
20 document.head.insertBefore(style, document.getElementsByTagName("style")[0]); | 20 document.head.insertBefore(style, document.getElementsByTagName("style")[0]); |
21 if (document.getElementById('target').offsetWidth == 0) | 21 if (document.getElementById('target').offsetWidth == 0) |
22 document.getElementById('target').innerHTML = 'PASS'; | 22 document.getElementById('target').innerHTML = 'PASS'; |
23 </script> | 23 </script> |
24 </body> | 24 </body> |
25 </html> | 25 </html> |
OLD | NEW |