OLD | NEW |
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='../fast/dom/shadow/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> | 9 </slot> |
10 <slot name='slot2'> | 10 <slot name='slot2'> |
11 <div id='fallback2'></div> | 11 <div id='fallback2'></div> |
12 </slot> | 12 </slot> |
13 </template> | 13 </template> |
14 <div id='child1' slot='slot1'></div> | 14 <div id='child1' slot='slot1'></div> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // Attribute change | 49 // Attribute change |
50 slot1.setAttribute('name', 'slot-foo'); | 50 slot1.setAttribute('name', 'slot-foo'); |
51 assert_array_equals(slot1.getAssignedNodes({flatten: true}), [fallback1]); | 51 assert_array_equals(slot1.getAssignedNodes({flatten: true}), [fallback1]); |
52 assert_array_equals(slot2.getAssignedNodes({flatten: true}), [fallback2]); | 52 assert_array_equals(slot2.getAssignedNodes({flatten: true}), [fallback2]); |
53 | 53 |
54 child1.setAttribute('slot', 'slot-foo'); | 54 child1.setAttribute('slot', 'slot-foo'); |
55 assert_array_equals(slot1.getAssignedNodes({flatten: true}), [child1]); | 55 assert_array_equals(slot1.getAssignedNodes({flatten: true}), [child1]); |
56 assert_array_equals(slot2.getAssignedNodes({flatten: true}), [fallback2]); | 56 assert_array_equals(slot2.getAssignedNodes({flatten: true}), [fallback2]); |
57 }, "Slot's distributed nodes after the attribute is changed."); | 57 }, "Slot's distributed nodes after the attribute is changed."); |
58 </script> | 58 </script> |
OLD | NEW |