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

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

Issue 8332008: Cocoa: Support keyboard navigation in avatar menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 9 years, 2 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 | « ui/base/test/cocoa_test_event_utils.h ('k') | no next file » | 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 5fe5f9979164e83bc766737e991cf1217442f718..f9ef04f1a7c11a3821c819630489261828155dd1 100644
--- a/ui/base/test/cocoa_test_event_utils.mm
+++ b/ui/base/test/cocoa_test_event_utils.mm
@@ -83,4 +83,18 @@ std::pair<NSEvent*,NSEvent*> MouseClickInView(NSView* view,
return std::make_pair(down, up);
}
+NSEvent* KeyEventWithCharacter(unichar c) {
+ NSString* chars = [NSString stringWithCharacters:&c length:1];
+ return [NSEvent keyEventWithType:NSKeyDown
+ location:NSZeroPoint
+ modifierFlags:0
+ timestamp:0.0
+ windowNumber:0
+ context:nil
+ characters:chars
+ charactersIgnoringModifiers:chars
+ isARepeat:NO
+ keyCode:0];
+}
+
} // namespace cocoa_test_event_utils
« no previous file with comments | « ui/base/test/cocoa_test_event_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698