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

Unified Diff: content/common/input/event_with_latency_info_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/common/input/event_with_latency_info_unittest.cc
diff --git a/content/common/input/event_with_latency_info_unittest.cc b/content/common/input/event_with_latency_info_unittest.cc
index 7afd3a3c29eebb41f41f685beb270e524c4f6623..cf5261fcaf03f6940b1dd28084e3dfd74040d011 100644
--- a/content/common/input/event_with_latency_info_unittest.cc
+++ b/content/common/input/event_with_latency_info_unittest.cc
@@ -310,11 +310,9 @@ TEST_F(EventWithLatencyInfoTest, WebMouseWheelEventCoalescing) {
// Coalesce old and new events.
mouse_wheel_0 = CreateMouseWheel(1, 1);
- mouse_wheel_0.event.x = 1;
- mouse_wheel_0.event.y = 1;
+ mouse_wheel_0.event.setPositionInWidget(1, 1);
mouse_wheel_1 = CreateMouseWheel(2, 2);
- mouse_wheel_1.event.x = 2;
- mouse_wheel_1.event.y = 2;
+ mouse_wheel_1.event.setPositionInWidget(2, 2);
MouseWheelEventWithLatencyInfo mouse_wheel_1_copy = mouse_wheel_1;
EXPECT_TRUE(CanCoalesce(mouse_wheel_0, mouse_wheel_1));
EXPECT_EQ(mouse_wheel_0.event.modifiers(), mouse_wheel_1.event.modifiers());
@@ -327,8 +325,8 @@ TEST_F(EventWithLatencyInfoTest, WebMouseWheelEventCoalescing) {
Coalesce(mouse_wheel_0, &mouse_wheel_1);
// Coalesced event has the position of the most recent event.
- EXPECT_EQ(1, mouse_wheel_1.event.x);
- EXPECT_EQ(1, mouse_wheel_1.event.y);
+ EXPECT_EQ(1, mouse_wheel_1.event.positionInWidget().x);
+ EXPECT_EQ(1, mouse_wheel_1.event.positionInWidget().y);
// deltaX/Y, wheelTicksX/Y, and movementX/Y of the coalesced event are
// calculated properly.
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/common/input/input_param_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698