OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <body onload="runTest()";> | 3 <head> |
4 <div id='sandbox'></div> | |
5 <script> | 4 <script> |
6 if (window.testRunner) | 5 if (window.testRunner) |
7 testRunner.waitUntilDone(); | 6 testRunner.waitUntilDone(); |
8 | 7 |
9 var sandbox = document.getElementById('sandbox'); | 8 function runTest() { |
10 var host = document.createElement('p'); | 9 var sandbox = document.getElementById('sandbox'); |
11 var shadowRoot = host.createShadowRoot(); | 10 var host = document.createElement('p'); |
12 shadowRoot.innerHTML = '<style>div { width: 100px; height: 100px; }</style><div>
</div>'; | 11 var shadowRoot = host.createShadowRoot(); |
13 sandbox.appendChild(host); | 12 shadowRoot.innerHTML = '<style>div { width: 100px; height: 100px; }</style><
div></div>'; |
14 document.body.offsetLeft; | 13 sandbox.appendChild(host); |
15 shadowRoot.styleSheets[0].insertRule('@import url(../resources/css-insert-import
-rule.css);', 0); | 14 document.body.offsetLeft; |
| 15 shadowRoot.styleSheets[0].insertRule('@import url(../resources/css-insert-im
port-rule.css);', 0); |
16 | 16 |
17 function runTest() { | |
18 setTimeout(function(){ | 17 setTimeout(function(){ |
19 if (window.testRunner) | 18 if (window.testRunner) |
20 testRunner.notifyDone(); | 19 testRunner.notifyDone(); |
21 }, 0); | 20 }, 0); |
22 } | 21 } |
23 </script> | 22 </script> |
| 23 </head> |
| 24 <body onload="runTest()";> |
| 25 <div id='sandbox'></div> |
24 </body> | 26 </body> |
25 </html> | 27 </html> |
OLD | NEW |