OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script src="../../../resources/js-test.js"></script> | |
5 <script src="resources/shadow-dom.js"></script> | |
6 </head> | |
7 <body> | |
8 <script> | |
9 description("Tests for getDestinationInsertionPoints() which involves re-distrib
ution."); | |
10 | |
11 document.body.appendChild( | |
12 createDOM('div', {}, | |
13 createDOM('div', {'id': 'host-1'}, | |
14 createShadowRoot( | |
15 createDOM('div', {'id': 'host-2'}, | |
16 createShadowRoot( | |
17 createDOM('content', {'id': 'content-2
'})), | |
18 createDOM('content', {'id': 'content-1'}))
), | |
19 createDOM('div', {'id': 'child-1'})))); | |
20 | |
21 shouldBeEqualAsArray(document.getElementById('child-1').getDestinationInsertionP
oints(), | |
22 [getNodeInComposedTree('host-1/content-1'), getNodeInCompos
edTree('host-1/host-2/content-2')]); | |
23 | |
24 document.body.appendChild( | |
25 createDOM('div', {}, | |
26 createDOM('div', {'id': 'host-10'}, | |
27 createShadowRoot( | |
28 createDOM('div', {'id': 'host-20'}, | |
29 createShadowRoot( | |
30 {'mode': 'open'}, | |
31 createDOM('content', {'id': 'content-2
0'})), | |
32 createDOM('content', {'id': 'content-10'})
)), | |
33 createDOM('div', {'id': 'child-10'})))); | |
34 | |
35 shouldBeEqualAsArray(document.getElementById('child-10').getDestinationInsertion
Points(), | |
36 [getNodeInComposedTree('host-10/content-10')]); | |
37 | |
38 document.body.appendChild( | |
39 createDOM('div', {}, | |
40 createDOM('div', {'id': 'host-11'}, | |
41 createShadowRoot( | |
42 createDOM('div', {'id': 'host-21'}, | |
43 createShadowRoot( | |
44 {'mode': 'closed'}, | |
45 createDOM('content', {'id': 'content-2
1'})), | |
46 createDOM('content', {'id': 'content-11'})
)), | |
47 createDOM('div', {'id': 'child-11'})))); | |
48 | |
49 shouldBeEqualAsArray(document.getElementById('child-11').getDestinationInsertion
Points(), | |
50 [getNodeInComposedTree('host-11/content-11')]); | |
51 | |
52 document.body.appendChild( | |
53 createDOM('div', {}, | |
54 createDOM('div', {'id': 'host-12'}, | |
55 createShadowRoot( | |
56 {'mode': 'closed'}, | |
57 createDOM('div', {'id': 'host-22'}, | |
58 createShadowRoot( | |
59 createDOM('content', {'id': 'content-2
2'})), | |
60 createDOM('content', {'id': 'content-12'})
)), | |
61 createDOM('div', {'id': 'child-12'})))); | |
62 | |
63 shouldBe('document.getElementById("child-12").getDestinationInsertionPoints().le
ngth', '0'); | |
64 </script> | |
65 </body> | |
66 </html> | |
OLD | NEW |