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

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

Issue 2539283002: Remove PlatformGestureEvent in favour of using WebGestureEvent (Closed)
Patch Set: Created 4 years 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 e4a053f405b3c937a376a1e2f1a051e88365ca01..343100209ac4d7f93e55a773c2af23465e7fcfcb 100644
--- a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
+++ b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
@@ -17,7 +17,6 @@
#include "core/layout/compositing/PaintLayerCompositor.h"
#include "core/page/Page.h"
#include "core/paint/PaintLayer.h"
-#include "platform/PlatformGestureEvent.h"
#include "platform/geometry/DoublePoint.h"
#include "platform/geometry/DoubleRect.h"
#include "platform/graphics/CompositorElementId.h"
@@ -1859,13 +1858,14 @@ TEST_P(VisualViewportTest, SlowScrollAfterImplScroll) {
EXPECT_SIZE_EQ(FloatSize(300, 200), visualViewport.scrollOffset());
// Send a scroll event on the main thread path.
- PlatformGestureEvent gsu(PlatformEvent::GestureScrollUpdate, IntPoint(0, 0),
- IntPoint(0, 0), IntSize(5, 5), 0,
- PlatformEvent::NoModifiers,
- PlatformGestureSourceTouchpad);
- gsu.setScrollGestureData(-50, -60, ScrollByPrecisePixel, 1, 1,
- ScrollInertialPhaseUnknown, false,
- -1 /* null plugin id */);
+ WebGestureEvent gsu;
+ gsu.type = WebInputEvent::GestureScrollUpdate;
+ gsu.sourceDevice = WebGestureDeviceTouchpad;
+ gsu.data.scrollUpdate.deltaX = -50;
+ gsu.data.scrollUpdate.deltaY = -60;
+ gsu.data.scrollUpdate.deltaUnits = WebGestureEvent::PrecisePixels;
+ gsu.data.scrollUpdate.velocityX = 1;
+ gsu.data.scrollUpdate.velocityY = 1;
frame()->eventHandler().handleGestureEvent(gsu);

Powered by Google App Engine
This is Rietveld 408576698