Chromium Code Reviews| 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 9810d589419b6f6a1f2ebd1b6d01313e80cef5c5..5cd47568403b1d8e37da249f556228206d5e2ce6 100644 |
| --- a/ui/events/test/cocoa_test_event_utils.mm |
| +++ b/ui/events/test/cocoa_test_event_utils.mm |
| @@ -203,6 +203,12 @@ NSEvent* SynthesizeKeyEvent(NSWindow* window, |
| // logic to support it. |
| flags &= ~NSAlphaShiftKeyMask; |
| + // Call sites may generate unicode character events with an undefined |
| + // keycode. Since it's not feasible to determine the correct keycode for |
| + // each unicode character, we use a dummy keycode corresponding to key 'A'. |
|
tapted
2016/06/29 07:21:39
(also this probably only really matters for things
karandeepb
2016/06/29 07:54:07
I didn't get the bit about NSCommandKeyMask. This
|
| + if (dom_key.IsCharacter() && keycode == ui::VKEY_UNKNOWN) |
| + keycode = ui::VKEY_A; |
| + |
| unichar character; |
| unichar shifted_character; |
| int macKeycode = ui::MacKeyCodeForWindowsKeyCode( |