blob: f4389264cf976c2142b50f630a91c6709ca4e89f [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<div></div>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var host = document.querySelector('div');
var root = host.attachShadow({mode: 'open'});
root.innerHTML = '<style>:host(.enabled) #foo { background: green;}</style><div id="foo"></div>';
var foo = root.querySelector("#foo");
host.classList.add('enabled');
shouldBe('getComputedStyle(foo).backgroundColor', '"rgb(0, 128, 0)"');
</script>