Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / selection-in-iframe-removed-crash.html
blob3d49e31c896ffb21f8e5e9f25ea9e7e3c1cdaf12
1 <!DOCTYPE html>
2 <html>
3 Test passes if it does not crash.
4 <script>
5 if (window.testRunner)
6 testRunner.dumpAsText();
8 var docElement = document.documentElement;
9 function crash() {
10 iframe1 = document.createElementNS("http://www.w3.org/1999/xhtml", "iframe");
11 iframe1.setAttribute("srcdoc", "ABC");
12 docElement.appendChild(iframe1);
13 document1 = document.implementation.createDocument("", null);
14 iframe1.addEventListener("DOMFocusOut", function () { document1.adoptNode(iframe1); }, false);
15 iframe1.focus();
16 setTimeout("finish();", 0);
19 function finish() {
20 document.designMode = "on";
21 range1 = document.createRange();
22 range1.selectNodeContents(iframe1.contentDocument);
23 window.getSelection().addRange(range1);
26 document.addEventListener("DOMContentLoaded", crash, false);
27 </script>
28 </html>