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

Side by Side Diff: LayoutTests/fast/history/scroll-restoration/scroll-restoration-push-replace.html

Issue 1288693003: Fix scroll-restoration-push-replace.html test to support scrollTopLeftInterop mode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix whitespace Created 5 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <style> 2 <style>
3 body { 3 body {
4 height: 2000px; 4 height: 2000px;
5 width: 2000px; 5 width: 2000px;
6 } 6 }
7 </style> 7 </style>
8 8
9 <body></body> 9 <body></body>
10 <script src="../../../resources/testharness.js"></script> 10 <script src="../../../resources/testharness.js"></script>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 window.addEventListener('hashchange', t.step_func(function() { 51 window.addEventListener('hashchange', t.step_func(function() {
52 var key = location.hash, 52 var key = location.hash,
53 entry = entries[key]; 53 entry = entries[key];
54 54
55 if (key === '') { 55 if (key === '') {
56 t.done(); 56 t.done();
57 return; 57 return;
58 } 58 }
59 console.log(`verifying ${key}`); 59 console.log(`verifying ${key}`);
60 assert_equals(history.state.key, key, `state should have key: ${key}`); 60 assert_equals(history.state.key, key, `state should have key: ${key}`);
61 assert_equals(document.body.scrollLeft, entry.expectedScroll[0], `scrollLe ft is correct for ${key}`); 61 assert_equals(document.scrollingElement.scrollLeft, entry.expectedScroll[0 ], `scrollLeft is correct for ${key}`);
62 assert_equals(document.body.scrollTop, entry.expectedScroll[1], `scrollTop is correct ${key}`); 62 assert_equals(document.scrollingElement.scrollTop, entry.expectedScroll[1] , `scrollTop is correct ${key}`);
63 63
64 window.history.back(); 64 window.history.back();
65 })); 65 }));
66 66
67 // Reset the scroll and kick off the verification 67 // Reset the scroll and kick off the verification
68 setTimeout(function() { 68 setTimeout(function() {
69 history.pushState(null, null, '#done'); 69 history.pushState(null, null, '#done');
70 window.scrollTo(555, 555); 70 window.scrollTo(555, 555);
71 window.history.back(); 71 window.history.back();
72 }, 0); 72 }, 0);
73 73
74 }, 'history.{push,replace}State retain and respect history.scrollRestoration') ; 74 }, 'history.{push,replace}State retain and respect history.scrollRestoration') ;
75 </script> 75 </script>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698