OLD | NEW |
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 Loading... |
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> |
OLD | NEW |