blob: 8787b02b6cda2b91c711b323755900bbd6453d9a [file] [log] [blame]
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
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>