blob: f02ce08ee9cb75d99f466aeacfe9f852336f4a84 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<style>
body /deep/ .a { width: 100px; height: 100px; background-color: green; }
</style>
<script>
var inner;
onload = function() {
var root = document.getElementById('root');
var shadowContainer = document.createElement('div');
root.appendChild(shadowContainer);
var shadowRoot = shadowContainer.createShadowRoot();
var mid = document.createElement('div');
shadowRoot.appendChild(mid);
inner = document.createElement('div');
mid.appendChild(inner);
inner.offsetTop;
inner.classList.add('a');
shadowContainer.remove();
root.offsetTop;
root.appendChild(shadowContainer);
inner.offsetTop;
inner.classList.remove('a');
shouldBe('getComputedStyle(inner).backgroundColor', '"rgba(0, 0, 0, 0)"');
}
</script>
<div id="root"></div>