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

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

Issue 4987002: Mac: Fix for crbug.com/42517 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 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
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698