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

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: Rebase Created 3 years, 12 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 0379b0d39c62228f1c193f68673a0b54c7ac4631..03cfc96cb8a56f8ae39f3c3f73c5e8fbb72c7a10 100644
--- a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
+++ b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
@@ -1144,8 +1144,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;
@@ -1157,7 +1158,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;
@@ -2004,8 +2005,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