blob: 1239e922c0b6401303206790ec9d3ac6d0f772d1 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<iframe id="aframe"></iframe>
<script>
description("Test that explicitly closing the document while it is already closing doesn't result in running the end twice.");
var frameDocument = document.getElementById("aframe").contentDocument;
frameDocument.open();
frameDocument.onreadystatechange = function()
{
debug(frameDocument.readyState);
frameDocument.close();
};
frameDocument.write("<script>document.close()</scr"+"ipt>");
</script>
</body>
</html>