Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / navigation / forward-to-fragment-fires-onload.html
blob3b8f0cb3139fb5b736ed0a902235645356734d23
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../js-test-resources/js-test.js"></script>
5 </head>
6 <body>
7 <p id="description"></p>
8 <div id="console"></div>
10 <script>
11 description('Tests that loading is not stopped by going forward to a fragment.');
13 onload = function()
15 if (window.localStorage.stage == 'three') {
16 console.log('3. Got back to start. Going forward to page 2.');
17 window.localStorage.stage = 'four';
18 history.forward();
19 } else if (window.localStorage.stage == 'six') {
20 delete window.localStorage.stage;
21 finishJSTest();
22 } else {
23 // To make sure that we hit this branch, log this to the console so that
24 // it shows up in expected output (debug() will be blown away once we
25 // navigate out).
26 console.log('Starting test.');
27 window.localStorage.stage = 'one';
28 // Navigate in a timeout to make sure we create a history entry.
29 setTimeout(function() {
30 window.location.href = 'resources/forward-to-fragment-fires-onload-2.html';
31 }, 0);
35 var jsTestIsAsync = true;
36 </script>
38 </body>
39 </html>