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

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: Support Widget MouseWheelEvent conversion 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
« no previous file with comments | « no previous file | ui/events/cocoa/events_mac.mm » ('j') | ui/events/cocoa/events_mac_unittest.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7b912c310192a5875bad89a219f7ec371fc1373e 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(123, [mac_event deltaX]);
sky 2016/09/23 17:47:08 123->delta_x and next line 321->delta_y?
tapted 2016/09/26 11:12:20 Done.
+ EXPECT_EQ(321, [mac_event deltaY]);
blink::WebMouseWheelEvent web_event =
content::WebMouseWheelEventBuilder::Build(mac_event,
« no previous file with comments | « no previous file | ui/events/cocoa/events_mac.mm » ('j') | ui/events/cocoa/events_mac_unittest.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698