| <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> |