blob: 3644877b5e9b28debc459c429f7d12ce1e6f3eed [file] [log] [blame]
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
</script>
<meta http-equiv="refresh" content="0;url=data:text/plain,You should not have been redirected here.">
</head>
<body>
<iframe id="ifrm" src="about:blank"></iframe>
<script>
document.body.onload = function() {
if (window.testRunner)
document.write('<p>FAIL: onload</p>');
else
alert('FAIL: onload');
}
// Having a subframe open should prevent refresh.
document.getElementById("ifrm").contentDocument.open();
setTimeout(function () {
// Test succeeded, now remove traps and return to a state that won't confuse our test runner.
document.body.onload = function() {};
if (window.stop)
stop();
document.getElementById("ifrm").contentDocument.close();
if (window.testRunner)
testRunner.notifyDone();
}, 500);
</script>
<p>SUCCESS - shouldn't refresh or invoke onload.</p>
</body>
</html>