Index: third_party/WebKit/LayoutTests/fast/dom/shadow/v1-composed-tree-traversal-1.html |
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/v1-composed-tree-traversal-1.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/v1-composed-tree-traversal-1.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e807a1aa079641b26f11cedf968247fc97f337e5 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/v1-composed-tree-traversal-1.html |
@@ -0,0 +1,33 @@ |
+<!DOCTYPE html> |
+<script src='../../../resources/testharness.js'></script> |
+<script src='../../../resources/testharnessreport.js'></script> |
+<script src='resources/shadow-dom.js'></script> |
+<div id='host'> |
+ <template data-mode='open'> |
+ <div id='shadow-child1'></div> |
+ <slot name='slot1'></slot> |
+ <slot name='slot2'></slot> |
+ <div id='shadow-child2'></div> |
+ </template> |
+ <div id='child1' slot='slot1'></div> |
+ <div id='child2' slot='slot2'></div> |
+</div> |
+<script> |
+'use strict'; |
+convertTemplatesToShadowRootsWithin(host); |
+removeWhiteSpaceOnlyTextNodes(host); |
+document.body.offsetLeft; |
+ |
+const slot1 = host.shadowRoot.querySelector('[name=slot1]'); |
+const slot2 = host.shadowRoot.querySelector('[name=slot2]'); |
+const shadowChild1 = host.shadowRoot.querySelector('#shadow-child1'); |
+const shadowChild2 = host.shadowRoot.querySelector('#shadow-child2'); |
+ |
+test(() => { |
+ assert_equals(internals.nextInComposedTree(child1), child2); |
tkent
2015/12/10 04:23:02
C++ unit test is more suitable because this is not
hayato
2015/12/10 08:11:21
Done. Removed these tests and updated ComposedTree
|
+ assert_equals(internals.firstChildInComposedTree(host), shadowChild1); |
+ assert_equals(internals.nextSiblingInComposedTree(shadowChild1), child1); |
+ assert_equals(internals.nextSiblingInComposedTree(child1), child2); |
+ assert_equals(internals.nextSiblingInComposedTree(child2), shadowChild2); |
+}, "composed tree traversal in v1"); |
+</script> |