tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / history / history-back-initial-vs-final-url.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4
5 <p>Checks that when going back to a page that frames that were navigated, that the final URL of the frames is loaded directly, instead the initial URL. Four alerts should appear, in this order:</p>
6
7 <ol>
8     <li>Initial URL loaded.</li>
9     <li>Final URL loaded.</li>
10     <li>Going back.</li>
11     <li>Final URL loaded.</li>
12 </ol>
13
14 <iframe a width="200" height="200" onunload="" src="resources/frame-initial-url.html"></iframe>
15
16 <script>
17 if (window.layoutTestController) {
18     layoutTestController.dumpAsText();
19     layoutTestController.dumpChildFramesAsText();
20     layoutTestController.waitUntilDone();
21     layoutTestController.dumpBackForwardList();
22 } else {
23     // Disable page cache when not running under the DRT.
24     onunload = function() {};
25 }
26
27 function runTest() 
28 {
29     if (sessionStorage.didNav) {
30         delete sessionStorage.didNav;
31         if (window.layoutTestController)
32             layoutTestController.notifyDone();
33     } else {
34         // Navigate a timeout to make sure we generate a history entry that we can go back to.
35         setTimeout(function() {location.href = 'data:text/html,<script>alert("Going back.");history.back();</' + 'script>';}, 0);
36         sessionStorage.didNav = true;
37     }
38 };
39 </script>
40 </body>
41 </html>