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

Unified Diff: content/browser/renderer_host/input/web_input_event_builders_mac_unittest.mm

Issue 2193153002: MacViews: Send Mac scrollWheel NSEvents as ui::ET_SCROLL (ui::ScrollEvent). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-ScrollLayers
Patch Set: More idiomatic ObjC Created 4 years, 3 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_builders_mac_unittest.mm
diff --git a/content/browser/renderer_host/input/web_input_event_builders_mac_unittest.mm b/content/browser/renderer_host/input/web_input_event_builders_mac_unittest.mm
index 0a0114551ae2901fcb28b2170be6297071b6dc93..73eeb76f47e20517a42735421c938fa03dfce3e0 100644
--- a/content/browser/renderer_host/input/web_input_event_builders_mac_unittest.mm
+++ b/content/browser/renderer_host/input/web_input_event_builders_mac_unittest.mm
@@ -576,10 +576,10 @@ TEST(WebInputEventBuilderMacTest, ContextMenuKey) {
}
}
-// Flaky - https://crbug.com/640457
// Test that a ui::Event and blink::WebInputEvent made from the same NSEvent
// have the same values for comparable fields.
-TEST(WebInputEventBuilderMacTest, DISABLED_ScrollWheelMatchesUIEvent) {
+TEST(WebInputEventBuilderMacTest, ScrollWheelMatchesUIEvent) {
+ bool precise = false;
CGFloat delta_x = 123;
CGFloat delta_y = 321;
NSPoint location = NSMakePoint(11, 22);
@@ -593,7 +593,10 @@ TEST(WebInputEventBuilderMacTest, DISABLED_ScrollWheelMatchesUIEvent) {
defer:NO];
NSEvent* mac_event = cocoa_test_event_utils::TestScrollEvent(
- location, window, delta_x, delta_y);
+ location, window, delta_x, delta_y, precise, NSEventPhaseNone,
+ NSEventPhaseNone);
+ EXPECT_EQ(delta_x, [mac_event deltaX]);
+ EXPECT_EQ(delta_y, [mac_event deltaY]);
blink::WebMouseWheelEvent web_event =
content::WebMouseWheelEventBuilder::Build(mac_event,

Powered by Google App Engine
This is Rietveld 408576698