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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/history/scroll-restoration/scroll-restoration-scale-not-impacted.html

Issue 2702503002: Block renderer-initiated main frame navigations to data URLs (Closed)
Patch Set: Fix Android PDF tests where PDFs should be downloaded Created 3 years, 8 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <style> 2 <style>
3 body { 3 body {
4 height: 10000px; 4 height: 10000px;
5 width: 10000px; 5 width: 10000px;
6 } 6 }
7 </style> 7 </style>
8 8
9 <body></body> 9 <body></body>
10 10
(...skipping 11 matching lines...) Expand all
22 assert_array_equals([internals.visualViewportWidth(), internals.visual ViewportHeight()], [400, 300], 'page is scaled'); 22 assert_array_equals([internals.visualViewportWidth(), internals.visual ViewportHeight()], [400, 300], 'page is scaled');
23 } 23 }
24 24
25 history.scrollRestoration = 'manual'; 25 history.scrollRestoration = 'manual';
26 window.scrollTo(100, 200); 26 window.scrollTo(100, 200);
27 assert_equals(history.scrollRestoration, 'manual'); 27 assert_equals(history.scrollRestoration, 'manual');
28 assert_array_equals([window.scrollX, window.scrollY], [100, 200]); 28 assert_array_equals([window.scrollX, window.scrollY], [100, 200]);
29 29
30 setTimeout(function() { 30 setTimeout(function() {
31 window.name = 'verification'; 31 window.name = 'verification';
32 window.location = "data:text/html,<script>history.back();</scr" + "ipt >"; 32 window.location = "../../../resources/back.html";
33 }, 0); 33 }, 0);
34 } else { 34 } else {
35 assert_array_equals([internals.visualViewportWidth(), internals.visualVi ewportHeight()], [400, 300], 'page scale is restored'); 35 assert_array_equals([internals.visualViewportWidth(), internals.visualVi ewportHeight()], [400, 300], 'page scale is restored');
36 assert_array_equals([window.scrollX, window.scrollY], [0, 0], 'scroll po sition is not restored'); 36 assert_array_equals([window.scrollX, window.scrollY], [0, 0], 'scroll po sition is not restored');
37 // clean up 37 // clean up
38 window.name = ''; 38 window.name = '';
39 if (window.internals) 39 if (window.internals)
40 setTimeout(function() {window.internals.setPageScaleFactor(1);}, 0); 40 setTimeout(function() {window.internals.setPageScaleFactor(1);}, 0);
41 t.done(); 41 t.done();
42 } 42 }
43 })); 43 }));
44 }, 'Setting scrollRestoration to manual should not affect scale restoration'); 44 }, 'Setting scrollRestoration to manual should not affect scale restoration');
45 </script> 45 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698