blob: a23ff24c4a5e8d48d3c60cda26e319f2113a7f1e [file] [log] [blame]
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
</script>
<body>
This tests that calling document.open on a document that has a pending load correctly cancels the load and does not crash even if the frame is removed.
<script>
const div = document.body.appendChild(document.createElement("div"));
div.innerHTML = "<iframe src='data:text/html,'></iframe>";
const frame = div.childNodes[0];
const client = new frame.contentWindow.XMLHttpRequest();
client.open("GET", "data:text/html,");
client.onabort = e => {
div.remove();
testRunner.notifyDone();
};
client.send();
frame.contentWindow.document.open();
</script>
</body>