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

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/v1-slots-fallback-api-2.html

Issue 1863413004: Rename Slot.getAssingedNodes() -> Slot.assignedNodes() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src='../resources/testharness.js'></script> 2 <script src='../resources/testharness.js'></script>
3 <script src='../resources/testharnessreport.js'></script> 3 <script src='../resources/testharnessreport.js'></script>
4 <script src='resources/shadow-dom.js'></script> 4 <script src='resources/shadow-dom.js'></script>
5 <div id='host'> 5 <div id='host'>
6 <template data-mode='open'> 6 <template data-mode='open'>
7 <slot name='slot1'> 7 <slot name='slot1'>
8 <div id='fallback1'></div> 8 <div id='fallback1'></div>
9 <slot name='slot2'> 9 <slot name='slot2'>
10 <div id='fallback2'></div> 10 <div id='fallback2'></div>
(...skipping 22 matching lines...) Expand all
33 const fallback3 = host.shadowRoot.querySelector('#fallback3'); 33 const fallback3 = host.shadowRoot.querySelector('#fallback3');
34 34
35 test(() => { 35 test(() => {
36 assert_equals(child1.assignedSlot, slot2); 36 assert_equals(child1.assignedSlot, slot2);
37 assert_equals(fallback1.assignedSlot, null); 37 assert_equals(fallback1.assignedSlot, null);
38 assert_equals(fallback2.assignedSlot, null); 38 assert_equals(fallback2.assignedSlot, null);
39 assert_equals(fallback3.assignedSlot, null); 39 assert_equals(fallback3.assignedSlot, null);
40 }, "assignedSlot"); 40 }, "assignedSlot");
41 41
42 test(() => { 42 test(() => {
43 assert_array_equals(slot1.getAssignedNodes(), []); 43 assert_array_equals(slot1.assignedNodes(), []);
44 assert_array_equals(slot2.getAssignedNodes(), [child1]); 44 assert_array_equals(slot2.assignedNodes(), [child1]);
45 assert_array_equals(slot3.getAssignedNodes(), []); 45 assert_array_equals(slot3.assignedNodes(), []);
46 assert_array_equals(slot4.getAssignedNodes(), []); 46 assert_array_equals(slot4.assignedNodes(), []);
47 }, "getAssignedNodes"); 47 }, "assignedNodes");
48 48
49 test(() => { 49 test(() => {
50 assert_array_equals(slot1.getAssignedNodes({flatten: true}), [fallback1, child 1]); 50 assert_array_equals(slot1.assignedNodes({flatten: true}), [fallback1, child1]) ;
51 assert_array_equals(slot2.getAssignedNodes({flatten: true}), [child1]); 51 assert_array_equals(slot2.assignedNodes({flatten: true}), [child1]);
52 assert_array_equals(slot3.getAssignedNodes({flatten: true}), [fallback3]); 52 assert_array_equals(slot3.assignedNodes({flatten: true}), [fallback3]);
53 assert_array_equals(slot4.getAssignedNodes({flatten: true}), [fallback3]); 53 assert_array_equals(slot4.assignedNodes({flatten: true}), [fallback3]);
54 }, "getDistributedNodes"); 54 }, "getDistributedNodes");
55 </script> 55 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698