| Index: LayoutTests/fast/css/invalidation/shadow-add-sheet-content.html
|
| diff --git a/LayoutTests/fast/css/invalidation/shadow-add-sheet-content.html b/LayoutTests/fast/css/invalidation/shadow-add-sheet-content.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a1bf5539172b50ad5f808779ff9a3c89b17109ea
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/css/invalidation/shadow-add-sheet-content.html
|
| @@ -0,0 +1,43 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../../resources/js-test.js"></script>
|
| +<style>
|
| + #outerHost { color: red }
|
| +</style>
|
| +<div>
|
| + <div id="outerHost">
|
| + <span id="outerSpan"></span>
|
| + </div>
|
| + <div></div>
|
| + <div></div>
|
| + <div></div>
|
| + <div></div>
|
| + <div></div>
|
| + <div></div>
|
| + <div></div>
|
| + <div></div>
|
| +</div>
|
| +<script>
|
| + description("Insert a style element into a shadow tree affecting a distributed node.");
|
| +
|
| + var outerRoot = outerHost.createShadowRoot();
|
| + outerRoot.innerHTML = "<div id='host1'><content/></div>";
|
| +
|
| + var host1 = outerRoot.querySelector("#host1");
|
| + var root1 = host1.createShadowRoot();
|
| + root1.innerHTML = "<div id='host2'><content/></div>";
|
| +
|
| + var host2 = root1.querySelector("#host2");
|
| + var root2 = host2.createShadowRoot();
|
| + root2.innerHTML = "<content/>";
|
| +
|
| + shouldBeEqualToString("getComputedStyle(outerSpan).color", "rgb(255, 0, 0)");
|
| +
|
| + var sheet = document.createElement("style");
|
| + sheet.appendChild(document.createTextNode("::content #outerSpan { color: green }"));
|
| + root2.appendChild(sheet);
|
| +
|
| + if (window.internals)
|
| + shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "9");
|
| +
|
| + shouldBeEqualToString("getComputedStyle(outerSpan).color", "rgb(0, 128, 0)");
|
| +</script>
|
|
|