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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 KeyEvent(false, false, false, false, @"8", @"8"))); | 175 KeyEvent(false, false, false, false, @"8", @"8"))); |
176 // '{' / alt-'8' on german | 176 // '{' / alt-'8' on german |
177 EXPECT_EQ('{', KeyCharacterForEvent( | 177 EXPECT_EQ('{', KeyCharacterForEvent( |
178 KeyEvent(false, false, false, true, @"{", @"8"))); | 178 KeyEvent(false, false, false, true, @"{", @"8"))); |
179 // cmd-'{' / cmd-shift-'[' on ansi | 179 // cmd-'{' / cmd-shift-'[' on ansi |
180 EXPECT_EQ('{', KeyCharacterForEvent( | 180 EXPECT_EQ('{', KeyCharacterForEvent( |
181 KeyEvent(true, true, false, false, @"[", @"{"))); | 181 KeyEvent(true, true, false, false, @"[", @"{"))); |
182 // cmd-'z' / cmd-shift-';' on dvorak-qwerty | 182 // cmd-'z' / cmd-shift-';' on dvorak-qwerty |
183 EXPECT_EQ('z', KeyCharacterForEvent( | 183 EXPECT_EQ('z', KeyCharacterForEvent( |
184 KeyEvent(true, true, false, false, @"z", @":"))); | 184 KeyEvent(true, true, false, false, @"z", @":"))); |
185 // cmd-shift-'[' in an RTL context. | 185 // cmd-shift-'[' in an RTL context pre 10.9. |
186 EXPECT_EQ('{', KeyCharacterForEvent( | 186 EXPECT_EQ('{', KeyCharacterForEvent( |
187 KeyEvent(true, true, false, false, @"{", @"}"))); | 187 KeyEvent(true, true, false, false, @"{", @"}"))); |
| 188 // cmd-shift-'[' in an RTL context on 10.9. |
| 189 EXPECT_EQ('{', KeyCharacterForEvent( |
| 190 KeyEvent(true, true, false, false, @"[", @"}"))); |
188 // Test if getting dead-key events return 0 and do not hang. | 191 // Test if getting dead-key events return 0 and do not hang. |
189 EXPECT_EQ(0, KeyCharacterForEvent( | 192 EXPECT_EQ(0, KeyCharacterForEvent( |
190 KeyEvent(false, false, false, false, @"", @""))); | 193 KeyEvent(false, false, false, false, @"", @""))); |
191 } | 194 } |
OLD | NEW |