Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / parser / foster-parent-adopted.html
blob9c12ee3d2f97a0e8591f438077393b7a460f30b2
1 <!DOCTYPE html>
2 <html>
3 <body>
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>
6 <table>
7 <tr>
8 <script>
9 if (window.testRunner)
10 testRunner.dumpAsText();
12 var tr = document.querySelector('tr');
13 var doc = document.implementation.createHTMLDocument();
14 doc.adoptNode(tr);
15 </script>
16 <div></div>
17 </tr>
18 </table>
19 <script>
20 var div = document.querySelector('div');
21 if (div.ownerDocument === div.parentNode.ownerDocument)
22 document.body.appendChild(document.createTextNode('PASS.'));
23 </script>
24 </body>
25 </html>