| Index: LayoutTests/fast/dom/shadow/new-style-inserted-into-parent-treescope.html
|
| diff --git a/LayoutTests/fast/dom/shadow/new-style-inserted-into-parent-treescope.html b/LayoutTests/fast/dom/shadow/new-style-inserted-into-parent-treescope.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e787308421fecebc34e793f39be0fbae216a6ad8
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/dom/shadow/new-style-inserted-into-parent-treescope.html
|
| @@ -0,0 +1,34 @@
|
| +<!doctype html>
|
| +<html>
|
| +<head>
|
| +<script src="../../../resources/js-test.js"></script>
|
| +<script src="resources/shadow-dom.js"></script>
|
| +<style>
|
| +span { color: red; }
|
| +</style>
|
| +</head>
|
| +<body>
|
| + <div id='sandbox'></div>
|
| + <pre id='console'></pre>
|
| +</body>
|
| +<script>
|
| +description('Test the case: a treescope has some style element and a new style is inserted into its parent treescope.')
|
| +
|
| +sandbox.appendChild(
|
| + createDOM('div', {'id': 'host1'},
|
| + createShadowRoot(
|
| + createDOM('div', {'id': 'host2'},
|
| + createShadowRoot(
|
| + createDOM('style', {},
|
| + document.createTextNode('div { color: red; }')),
|
| + createDOM('span', {'id': 'target'},
|
| + document.createTextNode('Hello')))))));
|
| +getNodeInTreeOfTrees('host1/host2/').applyAuthorStyles = true;
|
| +document.body.offsetLeft;
|
| +getNodeInTreeOfTrees('host1/').appendChild(
|
| + createDOM('style', {},
|
| + document.createTextNode('span { color: green; }')));
|
| +
|
| +shouldBe("getComputedStyle(getNodeInTreeOfTrees('host1/host2/target')).color", '"rgb(0, 128, 0)"');
|
| +</script>
|
| +</html>
|
|
|