Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Side by Side Diff: LayoutTests/http/tests/history/resources/back-with-fragment-change-target.html

Issue 7983013: Merge 95259 - Fragment navigations should interrupt a provisional load of a different document (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <script> 1 <script>
2 onload = function() { 2 onload = function() {
3 setTimeout(function() { 3 setTimeout(function() {
4 // Start to go back (runs asynchonously) 4 // Start to go back (runs asynchonously)
5 history.back(); 5 history.back();
6 // But immediately cancel that load of a history item and navigate to 6 // But immediately cancel that load of a history item and navigate to
7 // a fragment on the page instead. We should remain on this page and 7 // a fragment on the page instead. We should remain on this page and
8 // a history item should be added (with past ones not being affected) 8 // a history item should be added (with past ones not being affected)
9 setTimeout(function(){window.location = '#foo'}, 0); 9 setTimeout(function(){window.location = '#foo'}, 0);
10 }, 0); 10 }, 0);
11 } 11 }
12 12
13 onhashchange = function() { 13 onhashchange = function() {
14 setTimeout(done, 100); 14 setTimeout(done, 100);
15 } 15 }
16 16
17 function done() { 17 function done() {
18 delete sessionStorage.didNavigate; 18 delete sessionStorage.didNavigate;
19 console.log('Visited fragment and waited.'); 19 console.log('Visited fragment and waited.');
20 if (window.layoutTestController) { 20 if (window.layoutTestController) {
21 layoutTestController.notifyDone(); 21 layoutTestController.notifyDone();
22 } 22 }
23 } 23 }
24 </script> 24 </script>
25 PASS 25 PASS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698