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

Unified Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 1879103002: Convert main-thread overscroll parameters into viewport space. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Majid's review Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.cpp ('k') | third_party/WebKit/public/web/WebWidgetClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/WebFrameTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
index b955561496e1a1fc1f40f8a606015b3fd8332391..36347d45982225d9026dff4015c49325ba3fa8ec 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -8250,21 +8250,22 @@ TEST_P(WebFrameOverscrollTest, ScaledPageRootLayerOverscrolled)
webViewHelper.resize(WebSize(200, 200));
webViewImpl->setPageScaleFactor(3.0);
- // Calculation of accumulatedRootOverscroll and unusedDelta on scaled page.
+ // Calculation of accumulatedRootOverscroll and unusedDelta on scaled page. The point is (99, 99) because we clamp
+ // in the division by 3 to 33 so when we go back to viewport coordinates it becomes (99, 99).
ScrollBegin(&webViewHelper);
- EXPECT_CALL(client, didOverscroll(WebFloatSize(0, -10), WebFloatSize(0, -10), WebFloatPoint(33, 33), WebFloatSize()));
+ EXPECT_CALL(client, didOverscroll(WebFloatSize(0, -30), WebFloatSize(0, -30), WebFloatPoint(99, 99), WebFloatSize()));
ScrollUpdate(&webViewHelper, 0, 30);
Mock::VerifyAndClearExpectations(&client);
- EXPECT_CALL(client, didOverscroll(WebFloatSize(0, -10), WebFloatSize(0, -20), WebFloatPoint(33, 33), WebFloatSize()));
+ EXPECT_CALL(client, didOverscroll(WebFloatSize(0, -30), WebFloatSize(0, -60), WebFloatPoint(99, 99), WebFloatSize()));
ScrollUpdate(&webViewHelper, 0, 30);
Mock::VerifyAndClearExpectations(&client);
- EXPECT_CALL(client, didOverscroll(WebFloatSize(-10, -10), WebFloatSize(-10, -30), WebFloatPoint(33, 33), WebFloatSize()));
+ EXPECT_CALL(client, didOverscroll(WebFloatSize(-30, -30), WebFloatSize(-30, -90), WebFloatPoint(99, 99), WebFloatSize()));
ScrollUpdate(&webViewHelper, 30, 30);
Mock::VerifyAndClearExpectations(&client);
- EXPECT_CALL(client, didOverscroll(WebFloatSize(-10, 0), WebFloatSize(-20, -30), WebFloatPoint(33, 33), WebFloatSize()));
+ EXPECT_CALL(client, didOverscroll(WebFloatSize(-30, 0), WebFloatSize(-60, -90), WebFloatPoint(99, 99), WebFloatSize()));
ScrollUpdate(&webViewHelper, 30, 0);
Mock::VerifyAndClearExpectations(&client);
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.cpp ('k') | third_party/WebKit/public/web/WebWidgetClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698