| <!DOCTYPE html> |
| <script src='../resources/testharness.js'></script> |
| <script src='../resources/testharnessreport.js'></script> |
| <script src='resources/shadow-dom.js'></script> |
| <div id='host'> |
| <template data-mode='v0'> |
| <slot name='slot1'> |
| <div id='fallback1'></div> |
| </slot> |
| <slot name='slot2'> |
| <div id='fallback2'></div> |
| </slot> |
| </template> |
| <slot id='slot0'> |
| <div id='fallback0'></div> |
| </slot> |
| <div id='child1' slot='slot1'></div> |
| </div> |
| <script> |
| 'use strict'; |
| convertTemplatesToShadowRootsWithin(host); |
| removeWhiteSpaceOnlyTextNodes(host); |
| document.body.offsetLeft; |
| |
| const slot1 = host.shadowRoot.querySelector('[name=slot1]'); |
| const slot2 = host.shadowRoot.querySelector('[name=slot2]'); |
| const fallback1 = host.shadowRoot.querySelector('#fallback1'); |
| const fallback2 = host.shadowRoot.querySelector('#fallback2'); |
| |
| test(() => { |
| assert_equals(fallback0.assignedSlot, null); |
| assert_equals(fallback1.assignedSlot, null); |
| assert_equals(fallback2.assignedSlot, null); |
| assert_equals(child1.assignedSlot, null); |
| }, "assignedSlot"); |
| |
| test(() => { |
| assert_array_equals(slot0.assignedNodes(), []); |
| assert_array_equals(slot1.assignedNodes(), []); |
| assert_array_equals(slot2.assignedNodes(), []); |
| }, "assignedNodes"); |
| </script> |