tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / history / history-replace-updates-current-item.html
1 <script>
2 if (window.layoutTestController) {
3     layoutTestController.dumpAsText();
4     layoutTestController.dumpBackForwardList();
5     layoutTestController.waitUntilDone();
6 }
7
8 onunload = function() {
9     // no page cache
10 }
11
12 onload = 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.
19         // 
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.
24
25         history.replaceState(null, null, 'resources/history-replace-updates-current-item-done.html');
26         
27         history.pushState(null, null, '?dummystate');
28         location.replace('history-replace-updates-current-item-goback.html');
29     }, 0);
30 }
31 </script>
32 <body>history-replace-updates-current-item.html: You should not see this text!</body>