blob: 852612746e0965f3b355c8acf5d322f7be8a41b9 [file] [log] [blame]
<html>
<body>
Tests that popstate events do not fire when reloading.<br>
<div id="console"></div>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
popStateCalled = false;
onpopstate = function(event)
{
if (event.state)
popStateCalled = true;
}
function finish() {
document.getElementById("console").appendChild(document.createTextNode(popStateCalled ? "FAIL" : "PASS"));
if (window.testRunner)
testRunner.notifyDone();
}
onload = function() {
if (location.hash != "") {
setTimeout(finish, 0);
return;
}
history.pushState('newState1', null, '#newState1');
location.reload();
}
</script>
</body>
</html>