| 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='resources/shadow-dom.js'></script> |
| 5 <div id='host'> | 5 <div id='host'> |
| 6 <template data-mode='v0'> | 6 <template data-mode='v0'> |
| 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 <slot id='slot0'> | 14 <slot id='slot0'> |
| 15 <div id='fallback0'></div> | 15 <div id='fallback0'></div> |
| 16 </slot> | 16 </slot> |
| 17 <div id='child1' slot='slot1'></div> | 17 <div id='child1' slot='slot1'></div> |
| 18 </div> | 18 </div> |
| 19 <script> | 19 <script> |
| 20 'use strict'; | 20 'use strict'; |
| 21 convertTemplatesToShadowRootsWithin(host); | 21 convertTemplatesToShadowRootsWithin(host); |
| 22 removeWhiteSpaceOnlyTextNodes(host); | 22 removeWhiteSpaceOnlyTextNodes(host); |
| 23 document.body.offsetLeft; | |
| 24 | 23 |
| 25 const slot1 = host.shadowRoot.querySelector('[name=slot1]'); | 24 const slot1 = host.shadowRoot.querySelector('[name=slot1]'); |
| 26 const slot2 = host.shadowRoot.querySelector('[name=slot2]'); | 25 const slot2 = host.shadowRoot.querySelector('[name=slot2]'); |
| 27 const fallback1 = host.shadowRoot.querySelector('#fallback1'); | 26 const fallback1 = host.shadowRoot.querySelector('#fallback1'); |
| 28 const fallback2 = host.shadowRoot.querySelector('#fallback2'); | 27 const fallback2 = host.shadowRoot.querySelector('#fallback2'); |
| 29 | 28 |
| 30 test(() => { | 29 test(() => { |
| 31 assert_equals(fallback0.assignedSlot, null); | 30 assert_equals(fallback0.assignedSlot, null); |
| 32 assert_equals(fallback1.assignedSlot, null); | 31 assert_equals(fallback1.assignedSlot, null); |
| 33 assert_equals(fallback2.assignedSlot, null); | 32 assert_equals(fallback2.assignedSlot, null); |
| 34 assert_equals(child1.assignedSlot, null); | 33 assert_equals(child1.assignedSlot, null); |
| 35 }, "assignedSlot"); | 34 }, "assignedSlot"); |
| 36 | 35 |
| 37 test(() => { | 36 test(() => { |
| 38 assert_array_equals(slot0.assignedNodes(), []); | 37 assert_array_equals(slot0.assignedNodes(), []); |
| 39 assert_array_equals(slot1.assignedNodes(), []); | 38 assert_array_equals(slot1.assignedNodes(), []); |
| 40 assert_array_equals(slot2.assignedNodes(), []); | 39 assert_array_equals(slot2.assignedNodes(), []); |
| 41 }, "assignedNodes"); | 40 }, "assignedNodes"); |
| 42 </script> | 41 </script> |
| OLD | NEW |