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

Unified Diff: LayoutTests/fast/dom/shadow/shadow-element-distributed-nodes.html

Issue 59903015: [Shadow DOM]: Empty shadow insertion points should behave like <shadow><content *leftover*></conten… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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-distributed-nodes.html
diff --git a/LayoutTests/fast/dom/shadow/shadow-element-distributed-nodes.html b/LayoutTests/fast/dom/shadow/shadow-element-distributed-nodes.html
index cf4206750e0c7d03eae80fbc53046c4e45212f49..46b8aef0356c47fae873f8a4d82f9bc73932526b 100644
--- a/LayoutTests/fast/dom/shadow/shadow-element-distributed-nodes.html
+++ b/LayoutTests/fast/dom/shadow/shadow-element-distributed-nodes.html
@@ -24,7 +24,7 @@ function assertDistributedNodes(insertionPointId, expectedDistributedNodes) {
window.distributedNodes = distributedNodes;
window.expectedDistributedNodes = expectedDistributedNodes;
shouldBe("distributedNodes.length", "expectedDistributedNodes.length");
- for (var i = 0; i < distributedNodes.length; ++i) {
+ for (var i = 0; i < distributedNodes.length && i < expectedDistributedNodes.length; ++i) {
shouldBe("distributedNodes.item(" + i + ")", "getNodeInTreeOfTrees(expectedDistributedNodes[" + i + "])");
}
}
@@ -51,7 +51,7 @@ prepareTree(
createShadowRoot(
createDOM('shadow', {'id': 'shadow'})),
createDOM('div', {'id': 'host-child'})));
-assertDistributedNodes('host/shadow', []);
+assertDistributedNodes('host/shadow', ['host-child']);
prepareTree(
createDOM('div', {'id': 'host'},
@@ -87,7 +87,7 @@ prepareTree(
createShadowRoot(
createDOM('shadow', {'id': 'shadow'})),
createDOM('div', {'id': 'host-child'})));
-assertDistributedNodes('host//shadow', ['host/older-child-1', 'host/older-child-2']);
+assertDistributedNodes('host//shadow', ['host/older-child-1', 'host-child', 'host/older-child-2']);
prepareTree(
createDOM('div', {'id': 'host'},

Powered by Google App Engine
This is Rietveld 408576698