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

Unified Diff: ui/events/blink/web_input_event_builders_win_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
« no previous file with comments | « ui/events/blink/web_input_event_builders_win.cc ('k') | ui/events/blink/web_input_event_traits.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/blink/web_input_event_builders_win_unittest.cc
diff --git a/ui/events/blink/web_input_event_builders_win_unittest.cc b/ui/events/blink/web_input_event_builders_win_unittest.cc
index a9b92cb6549b5262a076d20a02fa67d54f82dc10..065c49ba5617aad411dcbc6007a410cfe379770d 100644
--- a/ui/events/blink/web_input_event_builders_win_unittest.cc
+++ b/ui/events/blink/web_input_event_builders_win_unittest.cc
@@ -33,15 +33,15 @@ TEST(WebInputEventBuilderTest, TestMouseEventScale) {
::GetDesktopWindow(), WM_MOUSEMOVE, 0, MAKELPARAM(300, 200), 100,
blink::WebPointerProperties::PointerType::Mouse);
- // The WebMouseEvent.x, WebMouseEvent.y fields should be in pixels
- // on return and hence should be the same value as the x and y coordinates
- // passed in to the WebMouseEventBuilder::Build function.
- EXPECT_EQ(300, mouse_move.x);
- EXPECT_EQ(200, mouse_move.y);
-
- // WebMouseEvent.globalX and WebMouseEvent.globalY are calculated in DIPs.
- EXPECT_EQ(150, mouse_move.globalX);
- EXPECT_EQ(100, mouse_move.globalY);
+ // The WebMouseEvent.position field should be in pixels on return and hence
+ // should be the same value as the x and y coordinates passed in to the
+ // WebMouseEventBuilder::Build function.
+ EXPECT_EQ(300, mouse_move.positionInWidget().x);
+ EXPECT_EQ(200, mouse_move.positionInWidget().y);
+
+ // WebMouseEvent.positionInScreen is calculated in DIPs.
+ EXPECT_EQ(150, mouse_move.positionInScreen().x);
+ EXPECT_EQ(100, mouse_move.positionInScreen().y);
EXPECT_EQ(blink::WebPointerProperties::PointerType::Mouse,
mouse_move.pointerType);
« no previous file with comments | « ui/events/blink/web_input_event_builders_win.cc ('k') | ui/events/blink/web_input_event_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698