blob: 13e04c8b38a64cdce06e14d61e89a0f061efa315 [file] [log] [blame]
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
}
function unloadHandler() {
document.getElementById('result').innerHTML = "PASS";
}
function loadHandler() {
document.getElementById('result').innerHTML = "FAIL - load event should not fire if security check failed.";
}
function test()
{
var w = window.open('http://localhost:8000/security/resources/has-window-events.html');
w.addEventListener('unload', unloadHandler, false);
w.addEventListener('load', loadHandler, false);
}
</script>
<body onload='test()'>
Test that window event handlers set for initial document are reset upon navigation if security check failed. There will be 'PASS' below if the test passes:<br>
<div id='result'>FAIL - nothing happened</div>