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

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

Issue 2907053004: GSB uses delta_hints to calculate scrolling chain. (Closed)
Patch Set: review comments addressed. Created 3 years, 6 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
Index: third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
index 76963e39c21f39fe63df28043828d31e3d016f8d..4b96ffb0ff2e592b977ef3691b2e7951a2b39d6b 100644
--- a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
+++ b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
@@ -1845,6 +1845,16 @@ TEST_P(VisualViewportTest, SlowScrollAfterImplScroll) {
EXPECT_SIZE_EQ(FloatSize(300, 200), visual_viewport.GetScrollOffset());
// Send a scroll event on the main thread path.
+ WebGestureEvent gsb(WebInputEvent::kGestureScrollBegin,
+ WebInputEvent::kNoModifiers,
+ WebInputEvent::kTimeStampForTesting);
+ gsb.SetFrameScale(1);
+ gsb.source_device = kWebGestureDeviceTouchpad;
+ gsb.data.scroll_begin.delta_x_hint = -50;
+ gsb.data.scroll_begin.delta_x_hint = -60;
+ gsb.data.scroll_begin.delta_hint_units = WebGestureEvent::kPrecisePixels;
+ GetFrame()->GetEventHandler().HandleGestureEvent(gsb);
+
WebGestureEvent gsu(WebInputEvent::kGestureScrollUpdate,
WebInputEvent::kNoModifiers,
WebInputEvent::kTimeStampForTesting);

Powered by Google App Engine
This is Rietveld 408576698