1 <p> 2 Test for a crash when deactivating a document that had adopted a <form> 3 element. 4 </p> 5 <p> 6 The test passed if it did not crash. 7 </p> 8 <iframe id="iframe"></iframe> 9 <script> 10 var iframe = document.getElementById("iframe"); 11 12 onload = function() 13 { 14 if (window.layoutTestController) { 15 layoutTestController.dumpAsText(); 16 layoutTestController.waitUntilDone(); 17 } 18 19 document.body.offsetTop; 20 var otherDocument = iframe.contentDocument; 21 var form = document.createElement("form"); 22 otherDocument.adoptNode(form); 23 form = null; 24 setTimeout(finish, 0); 25 } 26 27 function finish() 28 { 29 if (window.GCController) 30 GCController.collect() 31 else { 32 for (var i = 0; i < 10000; i++) 33 var foo = { }; 34 } 35 36 iframe.parentNode.removeChild(iframe); 37 38 if (window.layoutTestController) 39 layoutTestController.notifyDone(); 40 } 41 </script> 42