remove-and-adopt-thcrash.html (743B)
1 <!doctype html> 2 <title>Test for a Chrome crash when adopting a node into another document</title> 3 <link rel="help" href="https://crbug.com/981384"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <div id="d1"></div> 7 <div id="d2"></div> 8 <script> 9 test(() => { 10 d1.appendChild(document.createElement("iframe")); 11 d2.remove(); 12 const adopted_div = d1; 13 const popup = window.open(); 14 assert_equals(adopted_div.ownerDocument, document); 15 popup.document.body.appendChild(document.body); 16 assert_equals(adopted_div.ownerDocument, popup.document); 17 }, "Check that removing a node and then adopting its parent into a different window/document doesn't crash."); 18 </script>