diff options
Diffstat (limited to 'LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash.html')
-rw-r--r-- | LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash.html | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash.html b/LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash.html new file mode 100644 index 0000000..d8b535e --- /dev/null +++ b/LayoutTests/fast/dom/HTMLFormElement/document-deactivation-callback-crash.html @@ -0,0 +1,41 @@ +<p> + Test for a crash when deactivating a document that had adopted a <form> + element. +</p> +<p> + The test passed if it did not crash. +</p> +<iframe id="iframe"></iframe> +<script> + var iframe = document.getElementById("iframe"); + + onload = function() + { + if (window.layoutTestController) { + layoutTestController.dumpAsText(); + layoutTestController.waitUntilDone(); + } + + document.body.offsetTop; + var otherDocument = iframe.contentDocument; + var form = document.createElement("form"); + otherDocument.adoptNode(form); + form = null; + setTimeout(finish, 0); + } + + function finish() + { + if (window.GCController) + GCController.collect() + else { + for (var i = 0; i < 10000; i++) + var foo = { }; + } + + iframe.parentNode.removeChild(iframe); + + if (window.layoutTestController) + layoutTestController.notifyDone(); + } +</script> |