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

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

Issue 1550593002: Switch to standard integer types in chrome/browser/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months 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
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 #include <stddef.h>
7 8
8 #include "chrome/browser/global_keyboard_shortcuts_mac.h" 9 #include "chrome/browser/global_keyboard_shortcuts_mac.h"
9 10
11 #include "base/macros.h"
10 #include "chrome/app/chrome_command_ids.h" 12 #include "chrome/app/chrome_command_ids.h"
11 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
12 14
13 TEST(GlobalKeyboardShortcuts, ShortcutsToWindowCommand) { 15 TEST(GlobalKeyboardShortcuts, ShortcutsToWindowCommand) {
14 // Test that an invalid shortcut translates into an invalid command id. 16 // Test that an invalid shortcut translates into an invalid command id.
15 EXPECT_EQ( 17 EXPECT_EQ(
16 -1, CommandForWindowKeyboardShortcut(false, false, false, false, 0, 0)); 18 -1, CommandForWindowKeyboardShortcut(false, false, false, false, 0, 0));
17 19
18 // Check that all known keyboard shortcuts return valid results. 20 // Check that all known keyboard shortcuts return valid results.
19 size_t num_shortcuts = 0; 21 size_t num_shortcuts = 0;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // cmd-shift-'[' in an RTL context pre 10.9. 187 // cmd-shift-'[' in an RTL context pre 10.9.
186 EXPECT_EQ('{', KeyCharacterForEvent( 188 EXPECT_EQ('{', KeyCharacterForEvent(
187 KeyEvent(true, true, false, false, @"{", @"}"))); 189 KeyEvent(true, true, false, false, @"{", @"}")));
188 // cmd-shift-'[' in an RTL context on 10.9. 190 // cmd-shift-'[' in an RTL context on 10.9.
189 EXPECT_EQ('{', KeyCharacterForEvent( 191 EXPECT_EQ('{', KeyCharacterForEvent(
190 KeyEvent(true, true, false, false, @"[", @"}"))); 192 KeyEvent(true, true, false, false, @"[", @"}")));
191 // Test if getting dead-key events return 0 and do not hang. 193 // Test if getting dead-key events return 0 and do not hang.
192 EXPECT_EQ(0, KeyCharacterForEvent( 194 EXPECT_EQ(0, KeyCharacterForEvent(
193 KeyEvent(false, false, false, false, @"", @""))); 195 KeyEvent(false, false, false, false, @"", @"")));
194 } 196 }
OLDNEW
« no previous file with comments | « chrome/browser/global_keyboard_shortcuts_mac.mm ('k') | chrome/browser/google/chrome_google_url_tracker_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698