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

Unified Diff: ui/base/test/cocoa_test_event_utils.mm

Issue 8953037: Aura needs event translation for Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Nico's comment #5. Created 9 years 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/base/test/cocoa_test_event_utils.h ('k') | ui/ui.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/test/cocoa_test_event_utils.mm
diff --git a/ui/base/test/cocoa_test_event_utils.mm b/ui/base/test/cocoa_test_event_utils.mm
index f9ef04f1a7c11a3821c819630489261828155dd1..cea886cccbf1a87f0065750922631e9fa4e931ff 100644
--- a/ui/base/test/cocoa_test_event_utils.mm
+++ b/ui/base/test/cocoa_test_event_utils.mm
@@ -45,7 +45,7 @@ NSEvent* MouseEventAtPoint(NSPoint point, NSEventType type,
pressure:1.0];
}
-NSEvent* MakeMouseEvent(NSEventType type, NSUInteger modifiers) {
+NSEvent* MouseEventWithType(NSEventType type, NSUInteger modifiers) {
return MouseEventAtPoint(NSMakePoint(0, 0), type, modifiers);
}
@@ -97,4 +97,41 @@ NSEvent* KeyEventWithCharacter(unichar c) {
keyCode:0];
}
+NSEvent* KeyEventWithType(NSEventType event_type, NSUInteger modifiers) {
+ return [NSEvent keyEventWithType:event_type
+ location:NSZeroPoint
+ modifierFlags:modifiers
+ timestamp:0
+ windowNumber:0
+ context:nil
+ characters:@"x"
+ charactersIgnoringModifiers:@"x"
+ isARepeat:NO
+ keyCode:0x78];
+}
+
+NSEvent* EnterExitEventWithType(NSEventType event_type) {
+ return [NSEvent enterExitEventWithType:event_type
+ location:NSZeroPoint
+ modifierFlags:0
+ timestamp:0
+ windowNumber:0
+ context:nil
+ eventNumber:0
+ trackingNumber:0
+ userData:NULL];
+}
+
+NSEvent* OtherEventWithType(NSEventType event_type) {
+ return [NSEvent otherEventWithType:event_type
+ location:NSZeroPoint
+ modifierFlags:0
+ timestamp:0
+ windowNumber:0
+ context:nil
+ subtype:0
+ data1:0
+ data2:0];
+}
+
} // namespace cocoa_test_event_utils
« no previous file with comments | « ui/base/test/cocoa_test_event_utils.h ('k') | ui/ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698