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

Unified Diff: content/browser/renderer_host/input/input_router_impl_unittest.cc

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: content/browser/renderer_host/input/input_router_impl_unittest.cc
diff --git a/content/browser/renderer_host/input/input_router_impl_unittest.cc b/content/browser/renderer_host/input/input_router_impl_unittest.cc
index 02d435f1bd627ae6365fce11a2bdd7aac188113f..9beba617a05fc79cb272871bf64a2578042392bd 100644
--- a/content/browser/renderer_host/input/input_router_impl_unittest.cc
+++ b/content/browser/renderer_host/input/input_router_impl_unittest.cc
@@ -2092,12 +2092,12 @@ class InputRouterImplScaleMouseEventTest
SCOPED_TRACE(name);
SimulateMouseEvent(type, 10, 10);
const WebMouseEvent* sent_event = GetSentWebInputEvent<WebMouseEvent>();
- EXPECT_EQ(20, sent_event->x);
- EXPECT_EQ(20, sent_event->y);
+ EXPECT_EQ(20, sent_event->positionInWidget().x);
+ EXPECT_EQ(20, sent_event->positionInWidget().y);
const WebMouseEvent* filter_event = GetFilterWebInputEvent<WebMouseEvent>();
- EXPECT_EQ(10, filter_event->x);
- EXPECT_EQ(10, filter_event->y);
+ EXPECT_EQ(10, filter_event->positionInWidget().x);
+ EXPECT_EQ(10, filter_event->positionInWidget().y);
process_->sink().ClearMessages();
}
@@ -2122,8 +2122,8 @@ TEST_F(InputRouterImplScaleEventTest, ScaleMouseWheelEventTest) {
const WebMouseWheelEvent* sent_event =
GetSentWebInputEvent<WebMouseWheelEvent>();
- EXPECT_EQ(10, sent_event->x);
- EXPECT_EQ(10, sent_event->y);
+ EXPECT_EQ(10, sent_event->positionInWidget().x);
+ EXPECT_EQ(10, sent_event->positionInWidget().y);
EXPECT_EQ(20, sent_event->deltaX);
EXPECT_EQ(20, sent_event->deltaY);
EXPECT_EQ(2, sent_event->wheelTicksX);
@@ -2131,8 +2131,8 @@ TEST_F(InputRouterImplScaleEventTest, ScaleMouseWheelEventTest) {
const WebMouseWheelEvent* filter_event =
GetFilterWebInputEvent<WebMouseWheelEvent>();
- EXPECT_EQ(5, filter_event->x);
- EXPECT_EQ(5, filter_event->y);
+ EXPECT_EQ(5, filter_event->positionInWidget().x);
+ EXPECT_EQ(5, filter_event->positionInWidget().y);
EXPECT_EQ(10, filter_event->deltaX);
EXPECT_EQ(10, filter_event->deltaY);
EXPECT_EQ(1, filter_event->wheelTicksX);
« no previous file with comments | « content/browser/pointer_lock_browsertest.cc ('k') | content/browser/renderer_host/input/mouse_wheel_event_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698