2 if (window.layoutTestController) {
3 layoutTestController.dumpAsText();
4 layoutTestController.dumpBackForwardList();
5 layoutTestController.waitUntilDone();
8 onunload = function() {
13 setTimeout(function() {
14 // This code inserts a new history item using pushState, and then it
15 // replaces that history item with a navigation to a page that just
16 // navigates us back to this page. However, before that, we replace
17 // the URL of the initial page to point at the "done" page such that
18 // navigating back takes us to that document instead.
20 // This test ensures that we do not treat the initial document and the
21 // document created by the location.replace command as the same
22 // document when navigating back. If we treat them the same, then we
23 // will fail to load the "done" page.
25 history.replaceState(null, null, 'resources/history-replace-updates-current-item-done.html');
27 history.pushState(null, null, '?dummystate');
28 location.replace('history-replace-updates-current-item-goback.html');
32 <body>history-replace-updates-current-item.html: You should not see this text!</body>