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).
8 header("Cache-control: no-cache, no-store");
9 header("Pragma: no-cache");
13 if (window.layoutTestController) {
14 layoutTestController.dumpBackForwardList();
15 layoutTestController.dumpAsText();
16 layoutTestController.waitUntilDone();
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.layoutTestController)
24 layoutTestController.notifyDone();
28 // Change the location in a timeout to make sure it generates a history entry
29 setTimeout(function() {
30 window.location = 'resources/back-with-fragment-change-target.html'
31 sessionStorage.didNavigate = true;
35 // Make sure there's no page cache.
36 onunload = function() { };
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>layoutTestController.dumpBackForwardList</code> to verify correctness
42 and thus can only be run via DumpRenderTree.</p>