blob: 13bbef2f63a0694a993f515c2f0b4dfb9206d357 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<script src="resources/shadow-dom.js"></script>
<style>
.test { width: 100px; height: 100px; }
</style>
<div id="test1" class="test"></div>
<div id="test2" class="test"></div>
<script>
function insertIntoShadowRoot(id) {
let element = document.getElementById(id);
var shadowRoot = element.attachShadow({mode: 'open'});
shadowRoot.innerHTML = '<div style="all: initial; display: block; width:100%; height: 100%; background: black"></div>';
return element;
}
let test1 = insertIntoShadowRoot('test1');
let test2 = insertIntoShadowRoot('test2');
description('Test for issue 432257: Matched properties cache should work for all property.');
shouldBe('window.getComputedStyle(test1.shadowRoot.firstChild).width', '"100px"');
shouldBe('window.getComputedStyle(test2.shadowRoot.firstChild).width', '"100px"');
</script>