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

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

Issue 2016383002: Set PointerType of pointer event on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 7 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/web_input_event_unittest.cc
diff --git a/content/browser/renderer_host/input/web_input_event_unittest.cc b/content/browser/renderer_host/input/web_input_event_unittest.cc
index 57d03a1387aef347a3f5278dcafafd0782117968..f1cbb0e98301adbff5d7a5cfc76a544644b6e0dd 100644
--- a/content/browser/renderer_host/input/web_input_event_unittest.cc
+++ b/content/browser/renderer_host/input/web_input_event_unittest.cc
@@ -33,9 +33,9 @@ TEST(WebInputEventBuilderTest, TestMouseEventScale) {
command_line->AppendSwitchASCII(switches::kForceDeviceScaleFactor, "2");
// Synthesize a mouse move with x = 300 and y = 200.
- WebMouseEvent mouse_move =
- WebMouseEventBuilder::Build(::GetDesktopWindow(), WM_MOUSEMOVE, 0,
- MAKELPARAM(300, 200), 100);
+ WebMouseEvent mouse_move = WebMouseEventBuilder::Build(
+ ::GetDesktopWindow(), WM_MOUSEMOVE, 0, MAKELPARAM(300, 200), 100,
+ blink::WebPointerProperties::PointerType::Mouse);
// The WebMouseEvent.x, WebMouseEvent.y, WebMouseEvent.windowX and
// WebMouseEvent.windowY fields should be in pixels on return and hence
@@ -51,6 +51,9 @@ TEST(WebInputEventBuilderTest, TestMouseEventScale) {
EXPECT_EQ(150, mouse_move.globalX);
EXPECT_EQ(100, mouse_move.globalY);
+ EXPECT_EQ(blink::WebPointerProperties::PointerType::Mouse,
+ mouse_move.pointerType);
+
command_line->AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1");
display::Display::ResetForceDeviceScaleFactorForTesting();
}

Powered by Google App Engine
This is Rietveld 408576698