Chromium Code Reviews| Index: LayoutTests/fast/dom/shadow/shadow-element-add-child-dynamically.html |
| diff --git a/LayoutTests/fast/dom/shadow/shadow-element-add-child-dynamically.html b/LayoutTests/fast/dom/shadow/shadow-element-add-child-dynamically.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..50a9d4b4ce668ff7c505a5d686549c750af6e83e |
| --- /dev/null |
| +++ b/LayoutTests/fast/dom/shadow/shadow-element-add-child-dynamically.html |
| @@ -0,0 +1,32 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| +<script> |
| +if (window.testRunner) |
| + testRunner.waitUntilDone(); |
| + |
| +function test() { |
| + var host = document.querySelector("#host"); |
| + var olderShadowRoot = host.createShadowRoot(); |
| + olderShadowRoot.appendChild(document.createElement("content")); |
| + var youngerShadowRoot = host.createShadowRoot(); |
| + var shadow = document.createElement("shadow"); |
| + var shadowChild = document.createElement("div"); |
| + youngerShadowRoot.appendChild(shadow); |
| + shadow.appendChild(shadowChild); |
| + shadowChild.appendChild(document.createTextNode('CHILD1')); |
| + |
| + function addChild() { |
| + shadowChild.appendChild(document.createTextNode('CHILD2')); |
| + if (window.testRunner) |
| + testRunner.notifyDone(); |
| + } |
| + |
| + setTimeout(addChild, 0); |
|
esprehn
2013/11/20 09:22:23
Why setTimeout? Are you assuming that a recalcStyl
|
| +} |
| +</script> |
| +</head> |
| +<body onload="test()"> |
| +<div title="requiresThisElementToReproduce"><div id='host'></div></div> |
| +</body> |
| +</html> |