OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script src="../../js/resources/js-test-pre.js"></script> | |
5 <script src="resources/shadow-dom.js"></script> | |
6 </head> | |
7 <body> | |
8 <script> | |
9 description("Tests for node's insertionParent()."); | |
10 | |
11 var textNode = document.createTextNode('hello'); | |
12 | |
13 document.body.appendChild( | |
14 createDOM('div', {}, | |
15 createDOM('div', {'id': 'host-1'}, | |
16 createShadowRoot( | |
17 createDOM('content', {'id': 'content-1'})), | |
18 createDOM('div', {'id': 'child'})), | |
19 createDOM('div', {'id': 'host-2'}, | |
20 createShadowRoot( | |
21 createDOM('content', {'id': 'content-2', 'select': '
.cls'}), | |
22 createDOM('div', {'id': 'host-3'}, | |
23 createShadowRoot( | |
24 createDOM('content', {'id': 'content-3
'})), | |
25 createDOM('content'))), | |
26 createDOM('div', {'id': 'reprojected-child', 'class': 'c
ls'}), | |
27 textNode))); | |
28 | |
29 document.body.offsetLeft; | |
30 | |
31 shouldBeUndefined("document.webkitInsertionParent"); | |
32 shouldBeNull("document.getElementById('host-1').webkitInsertionParent"); | |
33 shouldBeEqualToString("document.getElementById('child').webkitInsertionParent.id
", "content-1"); | |
34 shouldBeEqualToString("document.getElementById('reprojected-child').webkitInsert
ionParent.id", "content-2"); | |
35 shouldBeEqualToString("textNode.webkitInsertionParent.id", "content-3"); | |
36 </script> | |
37 <script src="../../js/resources/js-test-post.js"></script> | |
38 </body> | |
39 </html> | |
OLD | NEW |