OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <p>This tests that when nodes are foster-parented after being adopted into
another document, | 4 <p>This tests that when nodes are foster-parented after being adopted into
another document, |
5 they are adopted back into the ownerDocument of their foster parent. <
/p> | 5 they are adopted back into the ownerDocument of their foster parent. <
/p> |
6 <table> | 6 <table> |
7 <tr> | 7 <tr> |
8 <script> | 8 <script> |
9 if (window.testRunner) | 9 if (window.testRunner) |
10 testRunner.dumpAsText(); | 10 testRunner.dumpAsText(); |
11 | 11 |
12 var doc = document.implementation.createHTMLDocument(); | 12 var doc = document.implementation.createHTMLDocument(); |
13 var div = document.createElement('div'); | 13 var div = document.createElement('div'); |
14 doc.adoptNode(div); | 14 doc.adoptNode(div); |
15 div.appendChild(document.querySelector('table')) | 15 div.appendChild(document.querySelector('table')) |
16 </script> | 16 </script> |
17 <div id=fosterChild></div> | 17 <div id=fosterChild></div> |
18 </tr> | 18 </tr> |
19 </table> | 19 </table> |
20 <script> | 20 <script> |
21 var fosterChild = div.querySelector('#fosterChild'); | 21 var fosterChild = div.querySelector('#fosterChild'); |
22 if (fosterChild.ownerDocument === fosterChild.parentNode.ownerDocument) | 22 if (fosterChild.ownerDocument === fosterChild.parentNode.ownerDocument) |
23 document.body.appendChild(document.createTextNode('PASS.')); | 23 document.body.appendChild(document.createTextNode('PASS.')); |
24 </script> | 24 </script> |
25 </body> | 25 </body> |
26 </html> | 26 </html> |
OLD | NEW |