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

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/v1-slots-api-with-closed-shadow-tree.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='d1'> 5 <div id='d1'>
6 <template data-mode='closed' data-expose-as='d1_shadow'> 6 <template data-mode='closed' data-expose-as='d1_shadow'>
7 <div id='d1-1'> 7 <div id='d1-1'>
8 <template data-mode='open'> 8 <template data-mode='open'>
9 <slot name='d1-1-s1'></slot> 9 <slot name='d1-1-s1'></slot>
10 </template> 10 </template>
(...skipping 25 matching lines...) Expand all
36 assert_equals(d3.assignedSlot, null); 36 assert_equals(d3.assignedSlot, null);
37 }, "A slot in a closed shadow tree should not be accessed via assignedSlot"); 37 }, "A slot in a closed shadow tree should not be accessed via assignedSlot");
38 38
39 test(() => { 39 test(() => {
40 assert_equals(d1_2.assignedSlot, d1_1_s1); 40 assert_equals(d1_2.assignedSlot, d1_1_s1);
41 assert_equals(d1_s1.assignedSlot, d1_1_s1); 41 assert_equals(d1_s1.assignedSlot, d1_1_s1);
42 assert_equals(d1_s2.assignedSlot, null); 42 assert_equals(d1_s2.assignedSlot, null);
43 }, "A slot in a open shadow tree should be accessed via assignedSlot from a clos ed shadow tree"); 43 }, "A slot in a open shadow tree should be accessed via assignedSlot from a clos ed shadow tree");
44 44
45 test(() => { 45 test(() => {
46 assert_array_equals(d1_s1.getAssignedNodes(), [d2]); 46 assert_array_equals(d1_s1.assignedNodes(), [d2]);
47 assert_array_equals(d1_s2.getAssignedNodes(), [d3]); 47 assert_array_equals(d1_s2.assignedNodes(), [d3]);
48 assert_array_equals(d1_1_s1.getAssignedNodes(), [d1_2, d1_s1]); 48 assert_array_equals(d1_1_s1.assignedNodes(), [d1_2, d1_s1]);
49 }, "A closed shadow tree has nothing to do with the behavior of getAssignedNodes "); 49 }, "A closed shadow tree has nothing to do with the behavior of assignedNodes");
50 50
51 test(() => { 51 test(() => {
52 assert_array_equals(d1_s1.getAssignedNodes({flatten: true}), [d2]); 52 assert_array_equals(d1_s1.assignedNodes({flatten: true}), [d2]);
53 assert_array_equals(d1_s2.getAssignedNodes({flatten: true}), [d3]); 53 assert_array_equals(d1_s2.assignedNodes({flatten: true}), [d3]);
54 assert_array_equals(d1_1_s1.getAssignedNodes({flatten: true}), [d1_2, d2]); 54 assert_array_equals(d1_1_s1.assignedNodes({flatten: true}), [d1_2, d2]);
55 }, "A closed shadow tree has nothing to do with the behavior of getAssignedNodes ({flatten: true}}"); 55 }, "A closed shadow tree has nothing to do with the behavior of assignedNodes({f latten: true}}");
56 </script> 56 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698