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

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

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)
Patch Set: Fix mouse up event sender not modifying modifiers 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/WebFrameTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
index 1a5df9e1694116fe3d7a8000063f7a83cc057b89..8bbfebddb32dc8c017190f32e711a721f07ef81a 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -5879,8 +5879,8 @@ class DisambiguationPopupTestWebViewClient
};
static WebGestureEvent fatTap(int x, int y) {
- WebGestureEvent event;
- event.type = WebInputEvent::GestureTap;
+ WebGestureEvent event(WebInputEvent::GestureTap, WebInputEvent::NoModifiers,
+ WebInputEvent::TimeStampForTesting);
event.sourceDevice = WebGestureDeviceTouchscreen;
event.x = x;
event.y = y;
@@ -9726,8 +9726,8 @@ class WebFrameOverscrollTest
WebGestureEvent generateEvent(WebInputEvent::Type type,
float deltaX = 0.0,
float deltaY = 0.0) {
- WebGestureEvent event;
- event.type = type;
+ WebGestureEvent event(type, WebInputEvent::NoModifiers,
+ WebInputEvent::TimeStampForTesting);
// TODO(wjmaclean): Make sure that touchpad device is only ever used for
// gesture scrolling event types.
event.sourceDevice = GetParam();
@@ -10666,14 +10666,17 @@ TEST_F(WebFrameTest, ScrollBeforeLayoutDoesntCrash) {
Document* document = webView->mainFrameImpl()->frame()->document();
document->documentElement()->setLayoutObject(nullptr);
- WebGestureEvent beginEvent;
- beginEvent.type = WebInputEvent::GestureScrollEnd;
+ WebGestureEvent beginEvent(WebInputEvent::GestureScrollBegin,
+ WebInputEvent::NoModifiers,
+ WebInputEvent::TimeStampForTesting);
beginEvent.sourceDevice = WebGestureDeviceTouchpad;
- WebGestureEvent updateEvent;
- updateEvent.type = WebInputEvent::GestureScrollEnd;
+ WebGestureEvent updateEvent(WebInputEvent::GestureScrollUpdate,
+ WebInputEvent::NoModifiers,
+ WebInputEvent::TimeStampForTesting);
updateEvent.sourceDevice = WebGestureDeviceTouchpad;
- WebGestureEvent endEvent;
- endEvent.type = WebInputEvent::GestureScrollEnd;
+ WebGestureEvent endEvent(WebInputEvent::GestureScrollEnd,
+ WebInputEvent::NoModifiers,
+ WebInputEvent::TimeStampForTesting);
endEvent.sourceDevice = WebGestureDeviceTouchpad;
// Try GestureScrollEnd and GestureScrollUpdate first to make sure that not

Powered by Google App Engine
This is Rietveld 408576698