OLD | NEW |
1 <script> | 1 <script> |
2 if (window.layoutTestController) { | 2 if (window.layoutTestController) { |
3 layoutTestController.dumpBackForwardList(); | 3 layoutTestController.dumpBackForwardList(); |
4 layoutTestController.dumpAsText(); | 4 layoutTestController.dumpAsText(); |
5 layoutTestController.waitUntilDone(); | 5 layoutTestController.waitUntilDone(); |
6 } | 6 } |
7 onload = function() { | 7 onload = function() { |
8 window.location = 'resources/slow-resource.pl?delay=100'; | 8 window.location = 'resources/slow-resource.pl?delay=100'; |
9 setTimeout(function() {window.location = 'navigation-interrupted-by-fragment
.html#abc'}, 10); | 9 setTimeout(function() {window.location = 'navigation-interrupted-by-fragment
.html#abc'}, 10); |
10 } | 10 } |
11 | 11 |
12 onhashchange = function() { | 12 onhashchange = function() { |
13 setTimeout(done, 100); | 13 setTimeout(done, 100); |
14 } | 14 } |
15 | 15 |
16 function done() { | 16 function done() { |
17 console.log('Visited fragment and waited.'); | 17 console.log('Visited fragment and waited.'); |
18 if (window.layoutTestController) { | 18 if (window.layoutTestController) { |
19 layoutTestController.notifyDone(); | 19 layoutTestController.notifyDone(); |
20 } | 20 } |
21 } | 21 } |
22 | 22 |
23 console.log('First visit.'); | 23 console.log('First visit.'); |
24 | 24 |
25 </script> | 25 </script> |
26 <p>This test checks that interrupting a slow navigation with a fragment navigati
on will cancel the first navigation. | 26 <p>This test checks that interrupting a slow navigation with a fragment navigati
on will cancel the first navigation. |
OLD | NEW |