blob: fcfef79859bb30f840519d342c94fece964af124 [file] [log] [blame]
<!DOCTYPE html>
<html>
Test passes if it does not crash.
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
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);
if (window.testRunner) {
document.body.innerHTML = 'Test passes if it does not crash.';
testRunner.notifyDone();
}
}
document.addEventListener("DOMContentLoaded", crash, false);
</script>
</html>