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

Unified Diff: ui/events/cocoa/events_mac_unittest.mm

Issue 322893005: MacViews: Add WidgetEventGenerator to abstract platform-specific event generation for tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cull orthogonal stuff, add WidgetTest.MouseEventTypesViaGenerator Created 6 years, 6 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: ui/events/cocoa/events_mac_unittest.mm
diff --git a/ui/events/cocoa/events_mac_unittest.mm b/ui/events/cocoa/events_mac_unittest.mm
index adaafea1df397d907ebca93c1d1007d0afbebbfe..71b5b763ab4d3d97d3a95de68d57bf5659ef1417 100644
--- a/ui/events/cocoa/events_mac_unittest.mm
+++ b/ui/events/cocoa/events_mac_unittest.mm
@@ -288,4 +288,14 @@ TEST_F(EventsMacTest, NativeTitlebarEventLocation) {
ui::EventLocationFromNative(event));
}
+// Tests mouse movement events.
+TEST_F(EventsMacTest, MoveEvents) {
+ gfx::Point location(5, 10);
+
+ NSEvent* event = TestMouseEvent(NSMouseMoved, location, 0);
+ EXPECT_EQ(ui::ET_MOUSE_MOVED, ui::EventTypeFromNative(event));
+ EXPECT_EQ(ui::EF_NONE, ui::EventFlagsFromNative(event));
+ EXPECT_EQ(location, ui::EventLocationFromNative(event));
+}
+
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698