blob: 9c12ee3d2f97a0e8591f438077393b7a460f30b2 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<p>This tests that when nodes are foster-parented after being adopted into another document,
they are adopted back into the ownerDocument of their foster parent. </p>
<table>
<tr>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var tr = document.querySelector('tr');
var doc = document.implementation.createHTMLDocument();
doc.adoptNode(tr);
</script>
<div></div>
</tr>
</table>
<script>
var div = document.querySelector('div');
if (div.ownerDocument === div.parentNode.ownerDocument)
document.body.appendChild(document.createTextNode('PASS.'));
</script>
</body>
</html>