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

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

Issue 2439953005: Support NSFlagsChanged in ui::EventFromNative. (Closed)
Patch Set: Unify NSFlagsChanged handling between content and ui/events. Created 4 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/events/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/events/test/cocoa_test_event_utils.mm
diff --git a/ui/events/test/cocoa_test_event_utils.mm b/ui/events/test/cocoa_test_event_utils.mm
index c62c482f42bbb85a5330168ffff3b22cc2955a29..8bf1837edb4506a4e8ccec873494be411f5a5382 100644
--- a/ui/events/test/cocoa_test_event_utils.mm
+++ b/ui/events/test/cocoa_test_event_utils.mm
@@ -235,6 +235,20 @@ NSEvent* KeyEventWithKeyCode(unsigned short key_code,
keyCode:key_code];
}
+NSEvent* KeyEventWithModifierOnly(unsigned short key_code,
+ NSUInteger modifiers) {
+ return [NSEvent keyEventWithType:NSFlagsChanged
+ location:NSZeroPoint
+ modifierFlags:modifiers
+ timestamp:TimeIntervalSinceSystemStartup()
+ windowNumber:0
+ context:nil
+ characters:@""
+ charactersIgnoringModifiers:@""
+ isARepeat:NO
+ keyCode:key_code];
+}
+
static NSEvent* EnterExitEventWithType(NSEventType event_type) {
return [NSEvent enterExitEventWithType:event_type
location:NSZeroPoint
« no previous file with comments | « ui/events/test/cocoa_test_event_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698