Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: LayoutTests/fast/dom/shadow/shadow-element-add-child-dynamically.html

Issue 77863002: Update styleRecalc so that it traverses shadow insertion points in 2 pass algorithms (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make styleRecalc traverse shadow trees in 2 pass algorithm Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..ac17a00e9f093129e1e08385213db44054b2326d
--- /dev/null
+++ b/LayoutTests/fast/dom/shadow/shadow-element-add-child-dynamically.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<body onload="test();">
+<div title="requiresThisElementToReproduce"><div id='host'></div></div>
+</body>
+<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'));
+
+ document.body.offsetLeft;
+ shadowChild.appendChild(document.createTextNode('CHILD2'));
+
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+</script>
+</head>
+</html>

Powered by Google App Engine
This is Rietveld 408576698