OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <AppKit/NSEvent.h> | 5 #include <AppKit/NSEvent.h> |
6 #include <Carbon/Carbon.h> | 6 #include <Carbon/Carbon.h> |
7 | 7 |
8 #include "chrome/browser/global_keyboard_shortcuts_mac.h" | 8 #include "chrome/browser/global_keyboard_shortcuts_mac.h" |
9 | 9 |
10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 KeyEvent(false, false, false, false, @"8", @"8"))); | 121 KeyEvent(false, false, false, false, @"8", @"8"))); |
122 // '{' / alt-'8' on german | 122 // '{' / alt-'8' on german |
123 ASSERT_EQ('{', KeyCharacterForEvent( | 123 ASSERT_EQ('{', KeyCharacterForEvent( |
124 KeyEvent(false, false, false, true, @"{", @"8"))); | 124 KeyEvent(false, false, false, true, @"{", @"8"))); |
125 // cmd-'{' / cmd-shift-'[' on ansi | 125 // cmd-'{' / cmd-shift-'[' on ansi |
126 ASSERT_EQ('{', KeyCharacterForEvent( | 126 ASSERT_EQ('{', KeyCharacterForEvent( |
127 KeyEvent(true, true, false, false, @"[", @"{"))); | 127 KeyEvent(true, true, false, false, @"[", @"{"))); |
128 // cmd-'z' / cmd-shift-';' on dvorak-qwerty | 128 // cmd-'z' / cmd-shift-';' on dvorak-qwerty |
129 ASSERT_EQ('z', KeyCharacterForEvent( | 129 ASSERT_EQ('z', KeyCharacterForEvent( |
130 KeyEvent(true, true, false, false, @"z", @":"))); | 130 KeyEvent(true, true, false, false, @"z", @":"))); |
| 131 // cmd-shift-'[' in an RTL context. |
| 132 ASSERT_EQ('{', KeyCharacterForEvent( |
| 133 KeyEvent(true, true, false, false, @"{", @"}"))); |
131 // Test if getting dead-key events return 0 and do not hang. | 134 // Test if getting dead-key events return 0 and do not hang. |
132 ASSERT_EQ(0, KeyCharacterForEvent( | 135 ASSERT_EQ(0, KeyCharacterForEvent( |
133 KeyEvent(false, false, false, false, @"", @""))); | 136 KeyEvent(false, false, false, false, @"", @""))); |
134 } | 137 } |
OLD | NEW |