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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-in-document-tree.html

Issue 1590533006: Support Slot.getAssignedNodes({flatten: true}) in a document tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v1-descendant-slots
Patch Set: rebased Created 4 years, 11 months 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLSlotElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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='wrapper'>
6 <slot id='slot1'></slot>
7 <slot id='slot2'>
8 <div id='child1'></div>
9 </slot>
10 <slot id='slot3'>
11 <div id='child2'></div>
12 <slot id='slot4'>
13 <div id='child3'></div>
14 <div id='child4'></div>
15 </slot>
16 </slot>
17 </div>
18 <script>
19 'use strict';
20 removeWhiteSpaceOnlyTextNodes(wrapper);
21
22 test(() => {
23 assert_equals(child1.assignedSlot, null);
24 assert_equals(child2.assignedSlot, null);
25 assert_equals(child3.assignedSlot, null);
26 assert_equals(child4.assignedSlot, null);
27 }, "assignedSlot");
28
29 test(() => {
30 assert_array_equals(slot1.getAssignedNodes(), []);
31 assert_array_equals(slot2.getAssignedNodes(), []);
32 assert_array_equals(slot3.getAssignedNodes(), []);
33 assert_array_equals(slot4.getAssignedNodes(), []);
34 }, "getAssignedNodes");
35
36 test(() => {
37 assert_array_equals(slot1.getAssignedNodes({flatten: true}), []);
38 assert_array_equals(slot2.getAssignedNodes({flatten: true}), [child1]);
39 assert_array_equals(slot3.getAssignedNodes({flatten: true}), [child2, child3, child4]);
40 assert_array_equals(slot4.getAssignedNodes({flatten: true}), [child3, child4]) ;
41 }, "getAssignedNodes({flatten: true})");
42 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLSlotElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698