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

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

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Fixed compile failures. Created 3 years, 9 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 0a06097b68e304863759dfb958ab4e001336fdb2..fc830a165e79392fc1ad819e899147053b49d06d 100644
--- a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
+++ b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
@@ -1126,10 +1126,10 @@ TEST_P(VisualViewportTest, TestContextMenuShownInCorrectLocation) {
WebMouseEvent mouseDownEvent(WebInputEvent::MouseDown,
WebInputEvent::NoModifiers,
WebInputEvent::TimeStampForTesting);
- mouseDownEvent.x = 10;
- mouseDownEvent.y = 10;
- mouseDownEvent.globalX = 110;
- mouseDownEvent.globalY = 210;
+ mouseDownEvent.position.x = 10;
+ mouseDownEvent.position.y = 10;
+ mouseDownEvent.screenPosition.x = 110;
+ mouseDownEvent.screenPosition.y = 210;
mouseDownEvent.clickCount = 1;
mouseDownEvent.button = WebMouseEvent::Button::Right;
@@ -1139,8 +1139,9 @@ TEST_P(VisualViewportTest, TestContextMenuShownInCorrectLocation) {
WebFrameClient* oldClient = webViewImpl()->mainFrameImpl()->client();
MockWebFrameClient mockWebFrameClient;
- EXPECT_CALL(mockWebFrameClient, showContextMenu(ContextMenuAtLocation(
- mouseDownEvent.x, mouseDownEvent.y)));
+ EXPECT_CALL(mockWebFrameClient,
+ showContextMenu(ContextMenuAtLocation(
+ mouseDownEvent.position.x, mouseDownEvent.position.y)));
// Do a sanity check with no scale applied.
webViewImpl()->mainFrameImpl()->setClient(&mockWebFrameClient);
@@ -1157,8 +1158,9 @@ TEST_P(VisualViewportTest, TestContextMenuShownInCorrectLocation) {
webViewImpl()->setPageScaleFactor(2);
EXPECT_CALL(mockWebFrameClient, didChangeScrollOffset(_));
visualViewport.setLocation(FloatPoint(60, 80));
- EXPECT_CALL(mockWebFrameClient, showContextMenu(ContextMenuAtLocation(
- mouseDownEvent.x, mouseDownEvent.y)));
+ EXPECT_CALL(mockWebFrameClient,
+ showContextMenu(ContextMenuAtLocation(
+ mouseDownEvent.position.x, mouseDownEvent.position.y)));
mouseDownEvent.button = WebMouseEvent::Button::Right;
webViewImpl()->handleInputEvent(WebCoalescedInputEvent(mouseDownEvent));

Powered by Google App Engine
This is Rietveld 408576698