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

Side by Side Diff: chrome/browser/global_keyboard_shortcuts_mac_unittest.mm

Issue 78783006: [osx] Adapt mirrored-shortcut handling to 10.9 differences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/global_keyboard_shortcuts_mac.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/global_keyboard_shortcuts_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698