blob: f8552f4ebcefef0bbaa153919603d51e07a3cc0e [file] [log] [blame]
<!doctype html>
<html>
<head>
<style>
.foo { color: green; }
</style>
<script>
if (window.testRunner)
testRunner.dumpAsText();
function runTest() {
var host = document.getElementById('sandbox');
var sr = host.attachShadow({mode: 'open'});
sr.innerHTML = '<div><style>div { color: red; }</style><div>Hello</div></div><div><style>.foo { color: red; }</style><div class="foo">Hello</div></div>';
sr.innerHTML = '';
var div = document.createElement('div');
div.className = 'foo';
div.innerText = 'PASS';
document.body.appendChild(div);
}
</script>
</head>
<body onload="runTest()">
<div id='sandbox'></div>
<div class='foo'></div>
</body>
</html>