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

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

Issue 2907053004: GSB uses delta_hints to calculate scrolling chain. (Closed)
Patch Set: Merged with master. 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 324dba7ebe6e7b28be8cb55e9c74568bb0c4cc61..ff37adf53496a6969e883f426c141010511a5425 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