blob: 3d49e31c896ffb21f8e5e9f25ea9e7e3c1cdaf12 [file] [log] [blame]
<!DOCTYPE html>
<html>
Test passes if it does not crash.
<script>
if (window.testRunner)
testRunner.dumpAsText();
var docElement = document.documentElement;
function crash() {
iframe1 = document.createElementNS("http://www.w3.org/1999/xhtml", "iframe");
iframe1.setAttribute("srcdoc", "ABC");
docElement.appendChild(iframe1);
document1 = document.implementation.createDocument("", null);
iframe1.addEventListener("DOMFocusOut", function () { document1.adoptNode(iframe1); }, false);
iframe1.focus();
setTimeout("finish();", 0);
}
function finish() {
document.designMode = "on";
range1 = document.createRange();
range1.selectNodeContents(iframe1.contentDocument);
window.getSelection().addRange(range1);
}
document.addEventListener("DOMContentLoaded", crash, false);
</script>
</html>