| 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 6c7819f8f1a486809f3f04c43479d235949cc249..9810d589419b6f6a1f2ebd1b6d01313e80cef5c5 100644
|
| --- a/ui/events/test/cocoa_test_event_utils.mm
|
| +++ b/ui/events/test/cocoa_test_event_utils.mm
|
| @@ -190,7 +190,8 @@ NSTimeInterval TimeIntervalSinceSystemStartup() {
|
| NSEvent* SynthesizeKeyEvent(NSWindow* window,
|
| bool keyDown,
|
| ui::KeyboardCode keycode,
|
| - NSUInteger flags) {
|
| + NSUInteger flags,
|
| + ui::DomKey dom_key) {
|
| // If caps lock is set for an alpha keycode, treat it as if shift was pressed.
|
| // Note on Mac (unlike other platforms) shift while caps is down does not go
|
| // back to lowercase.
|
| @@ -210,6 +211,11 @@ NSEvent* SynthesizeKeyEvent(NSWindow* window,
|
| if (macKeycode < 0)
|
| return nil;
|
|
|
| + // If an explicit unicode character is provided, use that instead of the one
|
| + // derived from the keycode.
|
| + if (dom_key.IsCharacter())
|
| + shifted_character = dom_key.ToCharacter();
|
| +
|
| // Note that, in line with AppKit's documentation (and tracing "real" events),
|
| // -[NSEvent charactersIngoringModifiers]" are "the characters generated by
|
| // the receiving key event as if no modifier key (except for Shift)".
|
|
|