Regression(r129406): Fix the scope of the WidgetHierarchyUpdateSuspensionScope in...
[WebKit-https.git] / LayoutTests / fast / dom / adopt-node-crash-2.html
1 <!DOCTYPE html>
2 <html>
3 <div>Tests for a crash due to adopting a DOM node during DOMFocusOut event. Test passes if it doesn't crash.</div>
4 <script>
5 if (window.testRunner) {
6     testRunner.dumpAsText();
7     testRunner.waitUntilDone();
8 }
9 </script>
10 <div id="div1"></div>
11 <div id="div2">
12   <applet>
13     <iframe srcdoc="<iframe srcdoc=''>">
14     </iframe>
15   </applet>
16   <header id="header1">
17     <keygen autofocus>
18   </header>
19 </div>
20 <script>
21 function doit()
22 {
23     div2.addEventListener("DOMFocusOut", function () { document.implementation.createDocument("", "", null).adoptNode(div2); }, false);
24     div1.outerHTML = header1.outerHTML;
25     if (window.testRunner)
26         testRunner.notifyDone();
27 }
28 document.addEventListener("DOMContentLoaded", setTimeout("doit()", 1), false);
29 </script>
30 </html>