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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/v1-composed-tree-traversal-1.html

Issue 1489433002: Support the essential part of Shadow DOM v1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove one TODO Created 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src='../../../resources/testharness.js'></script>
3 <script src='../../../resources/testharnessreport.js'></script>
4 <script src='resources/shadow-dom.js'></script>
5 <div id='host'>
6 <template data-mode='open'>
7 <div id='shadow-child1'></div>
8 <slot name='slot1'></slot>
9 <slot name='slot2'></slot>
10 <div id='shadow-child2'></div>
11 </template>
12 <div id='child1' slot='slot1'></div>
13 <div id='child2' slot='slot2'></div>
14 </div>
15 <script>
16 'use strict';
17 convertTemplatesToShadowRootsWithin(host);
18 removeWhiteSpaceOnlyTextNodes(host);
19 document.body.offsetLeft;
20
21 const slot1 = host.shadowRoot.querySelector('[name=slot1]');
22 const slot2 = host.shadowRoot.querySelector('[name=slot2]');
23 const shadowChild1 = host.shadowRoot.querySelector('#shadow-child1');
24 const shadowChild2 = host.shadowRoot.querySelector('#shadow-child2');
25
26 test(() => {
27 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
28 assert_equals(internals.firstChildInComposedTree(host), shadowChild1);
29 assert_equals(internals.nextSiblingInComposedTree(shadowChild1), child1);
30 assert_equals(internals.nextSiblingInComposedTree(child1), child2);
31 assert_equals(internals.nextSiblingInComposedTree(child2), shadowChild2);
32 }, "composed tree traversal in v1");
33 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698