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

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

Issue 2539283002: Remove PlatformGestureEvent in favour of using WebGestureEvent (Closed)
Patch Set: Add missing copyright on new file 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
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1c08802367dc43495e8946fc75e12b608734a14f..4d3d200eac3839b681b671d2ff9a50dd26c3f10c 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"
@@ -1865,13 +1864,15 @@ TEST_P(VisualViewportTest, SlowScrollAfterImplScroll) {
EXPECT_SIZE_EQ(FloatSize(300, 200), visualViewport.getScrollOffset());
// Send a scroll event on the main thread path.
- PlatformGestureEvent gsu(PlatformEvent::GestureScrollUpdate, IntPoint(0, 0),
- IntPoint(0, 0), IntSize(5, 5), TimeTicks(),
- PlatformEvent::NoModifiers,
- PlatformGestureSourceTouchpad);
- gsu.setScrollGestureData(-50, -60, ScrollByPrecisePixel, 1, 1,
- ScrollInertialPhaseUnknown, false,
- -1 /* null plugin id */);
+ WebGestureEvent gsu;
+ gsu.setFrameScale(1);
+ 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);
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698