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

Unified Diff: third_party/WebKit/Source/web/tests/VisualViewportTest.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/VisualViewportTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
index 1c08802367dc43495e8946fc75e12b608734a14f..89b9aef8a73c0bf8ed7c5d1f2b377af5abd9cdbd 100644
--- a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
+++ b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
@@ -1145,8 +1145,9 @@ TEST_P(VisualViewportTest, TestContextMenuShownInCorrectLocation) {
registerMockedHttpURLLoad("200-by-300.html");
navigateTo(m_baseURL + "200-by-300.html");
- WebMouseEvent mouseDownEvent;
- mouseDownEvent.type = WebInputEvent::MouseDown;
+ WebMouseEvent mouseDownEvent(WebInputEvent::MouseDown,
+ WebInputEvent::NoModifiers,
+ WebInputEvent::TimeStampForTesting);
mouseDownEvent.x = 10;
mouseDownEvent.y = 10;
mouseDownEvent.windowX = 10;
@@ -1158,7 +1159,7 @@ TEST_P(VisualViewportTest, TestContextMenuShownInCorrectLocation) {
// Corresponding release event (Windows shows context menu on release).
WebMouseEvent mouseUpEvent(mouseDownEvent);
- mouseUpEvent.type = WebInputEvent::MouseUp;
+ mouseUpEvent.setType(WebInputEvent::MouseUp);
WebFrameClient* oldClient = webViewImpl()->mainFrameImpl()->client();
MockWebFrameClient mockWebFrameClient;
@@ -2003,8 +2004,9 @@ TEST_P(VisualViewportTest, PinchZoomGestureScrollsVisualViewportOnly) {
registerMockedHttpURLLoad("200-by-800-viewport.html");
navigateTo(m_baseURL + "200-by-800-viewport.html");
- WebGestureEvent pinchUpdate;
- pinchUpdate.type = WebInputEvent::GesturePinchUpdate;
+ WebGestureEvent pinchUpdate(WebInputEvent::GesturePinchUpdate,
+ WebInputEvent::NoModifiers,
+ WebInputEvent::TimeStampForTesting);
pinchUpdate.sourceDevice = WebGestureDeviceTouchpad;
pinchUpdate.x = 100;
pinchUpdate.y = 100;

Powered by Google App Engine
This is Rietveld 408576698