OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>Shadow DOM: Slots and assignments</title> | 2 <title>Shadow DOM: Slots and assignments</title> |
3 <meta name="author" title="Hayato Ito" href="mailto:hayato@google.com"> | 3 <meta name="author" title="Hayato Ito" href="mailto:hayato@google.com"> |
4 <script src="../resources/testharness.js"></script> | 4 <script src="/resources/testharness.js"></script> |
5 <script src="../resources/testharnessreport.js"></script> | 5 <script src="/resources/testharnessreport.js"></script> |
6 <script src="resources/shadow-dom.js"></script> | 6 <script src="resources/shadow-dom.js"></script> |
7 | 7 |
8 <div id="test_basic"> | 8 <div id="test_basic"> |
9 <div id="host"> | 9 <div id="host"> |
10 <template data-mode="open"> | 10 <template data-mode="open"> |
11 <slot id="s1" name="slot1"></slot> | 11 <slot id="s1" name="slot1"></slot> |
12 </template> | 12 </template> |
13 <div id="c1" slot="slot1"></div> | 13 <div id="c1" slot="slot1"></div> |
14 </div> | 14 </div> |
15 </div> | 15 </div> |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 | 499 |
500 n.s1.setAttribute('slot', 'slot6'); | 500 n.s1.setAttribute('slot', 'slot6'); |
501 | 501 |
502 assert_array_equals(n.s1.assignedNodes(), [n.c1]); | 502 assert_array_equals(n.s1.assignedNodes(), [n.c1]); |
503 | 503 |
504 assert_array_equals(n.s5.assignedNodes(), [n.c5]); | 504 assert_array_equals(n.s5.assignedNodes(), [n.c5]); |
505 assert_array_equals(n.s6.assignedNodes(), [n.s1, n.s2, n.c6]); | 505 assert_array_equals(n.s6.assignedNodes(), [n.s1, n.s2, n.c6]); |
506 assert_array_equals(n.s6.assignedNodes({ flatten: true }), [n.c1, n.c2, n.c6])
; | 506 assert_array_equals(n.s6.assignedNodes({ flatten: true }), [n.c1, n.c2, n.c6])
; |
507 }, 'Slots: Mutation: Change slot slot= attribute.'); | 507 }, 'Slots: Mutation: Change slot slot= attribute.'); |
508 </script> | 508 </script> |
OLD | NEW |