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

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

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Rebased, fixed a comment in web_input_event_builders_mac.mm Created 3 years, 8 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 d08b52bc0deda7dbcadede48f0073fb636a3f52d..adecfe970205ab69c74d5b2ede3e02ffa995b5b2 100644
--- a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
+++ b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp
@@ -1138,10 +1138,8 @@ 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.setPositionInWidget(10, 10);
+ mouseDownEvent.setPositionInScreen(110, 210);
mouseDownEvent.clickCount = 1;
mouseDownEvent.button = WebMouseEvent::Button::Right;
@@ -1152,7 +1150,8 @@ TEST_P(VisualViewportTest, TestContextMenuShownInCorrectLocation) {
WebFrameClient* oldClient = webViewImpl()->mainFrameImpl()->client();
MockWebFrameClient mockWebFrameClient;
EXPECT_CALL(mockWebFrameClient, showContextMenu(ContextMenuAtLocation(
- mouseDownEvent.x, mouseDownEvent.y)));
+ mouseDownEvent.positionInWidget().x,
+ mouseDownEvent.positionInWidget().y)));
// Do a sanity check with no scale applied.
webViewImpl()->mainFrameImpl()->setClient(&mockWebFrameClient);
@@ -1170,7 +1169,8 @@ TEST_P(VisualViewportTest, TestContextMenuShownInCorrectLocation) {
EXPECT_CALL(mockWebFrameClient, didChangeScrollOffset(_));
visualViewport.setLocation(FloatPoint(60, 80));
EXPECT_CALL(mockWebFrameClient, showContextMenu(ContextMenuAtLocation(
- mouseDownEvent.x, mouseDownEvent.y)));
+ mouseDownEvent.positionInWidget().x,
+ mouseDownEvent.positionInWidget().y)));
mouseDownEvent.button = WebMouseEvent::Button::Right;
webViewImpl()->handleInputEvent(WebCoalescedInputEvent(mouseDownEvent));
« no previous file with comments | « third_party/WebKit/Source/web/tests/FrameTestHelpers.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