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