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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/scrolling/same-page-navigate.html

Issue 2320303002: Reset VisualViewport position after same page navigation (Closed)
Patch Set: update comment Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/page/Page.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2
3 <a href="./same-page-navigate.html" id="same-page" style="position: absolute; to p: 2000px">link to self</a>
4
5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script>
7
8 <script>
9 var same_page_navigate_test = async_test("Ensure that the scroll position is cor rect when we navigate to same page after scale(zoom-in/zoom-out)");
10
11 same_page_navigate_test.step(function(){
12 // exit in second load, using scale to detect
13 if (internals.pageScaleFactor() == 2) {
14 assert_equals(scrollX, 0);
15 assert_equals(scrollY, 0);
16 same_page_navigate_test.done();
17 return;
18 }
19
20 internals.setPageScaleFactor(2);
21 scrollTo(0, 10000);
22
23 var atag = document.getElementById('same-page');
24 var x = (atag.offsetLeft - scrollX + 1) * 2;
25 var y = (atag.offsetTop - scrollY + 1) * 2;
26
27 // this clicks on the link which causes a reload of this page.
28 eventSender.mouseMoveTo(x, y);
29 eventSender.mouseDown();
30 eventSender.mouseUp();
31 });
32 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/page/Page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698