| OLD | NEW |
| (Empty) |
| 1 <?php | |
| 2 // We intentionally want the page to load slowly (every time, hence no caching),
| |
| 3 // so that when back-with-fragment-change-target.html calls history.back(), the | |
| 4 // load is provisional for a while (long enough for the window.location = '#foo' | |
| 5 // script to run and stop that load). | |
| 6 sleep(2); | |
| 7 | |
| 8 header("Cache-control: no-cache, no-store"); | |
| 9 header("Pragma: no-cache"); | |
| 10 ?> | |
| 11 | |
| 12 <script> | |
| 13 if (window.testRunner) { | |
| 14 testRunner.dumpBackForwardList(); | |
| 15 testRunner.dumpAsText(); | |
| 16 testRunner.waitUntilDone(); | |
| 17 } | |
| 18 | |
| 19 onload = function() { | |
| 20 if (sessionStorage.didNavigate) { | |
| 21 console.log('Should not have ended up back at the test start page'); | |
| 22 delete sessionStorage.didNavigate; | |
| 23 if (window.testRunner) | |
| 24 testRunner.notifyDone(); | |
| 25 return; | |
| 26 } | |
| 27 | |
| 28 // Change the location in a timeout to make sure it generates a history entr
y | |
| 29 setTimeout(function() { | |
| 30 window.location = 'resources/back-with-fragment-change-target.html' | |
| 31 sessionStorage.didNavigate = true; | |
| 32 }, 0); | |
| 33 } | |
| 34 | |
| 35 // Make sure there's no page cache. | |
| 36 onunload = function() { }; | |
| 37 </script> | |
| 38 <p> | |
| 39 Tests that a history navigation that is aborted by a fragment change doesn't | |
| 40 update the provisional history item. This test relies on | |
| 41 <code>testRunner.dumpBackForwardList</code> to verify correctness | |
| 42 and thus can only be run via DumpRenderTree.</p> | |
| OLD | NEW |