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

Unified Diff: chrome/browser/global_keyboard_shortcuts_mac_unittest.cc

Issue 313004: Fix cmd-opt-left/right. (Closed)
Patch Set: Rebase ToT Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/global_keyboard_shortcuts_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/global_keyboard_shortcuts_mac_unittest.cc
diff --git a/chrome/browser/global_keyboard_shortcuts_mac_unittest.cc b/chrome/browser/global_keyboard_shortcuts_mac_unittest.cc
index 8ab7237dce67ef021f4cdff3efce59c33748f3a4..39199bb73a6cbef7f6e80580b9e0acdead97f4a4 100644
--- a/chrome/browser/global_keyboard_shortcuts_mac_unittest.cc
+++ b/chrome/browser/global_keyboard_shortcuts_mac_unittest.cc
@@ -10,7 +10,8 @@
TEST(GlobalKeyboardShortcuts, ShortcutsToWindowCommand) {
// Test that an invalid shortcut translates into an invalid command id.
- ASSERT_EQ(-1, CommandForWindowKeyboardShortcut(false, false, false, 0));
+ ASSERT_EQ(
+ -1, CommandForWindowKeyboardShortcut(false, false, false, false, 0));
// Check that all known keyboard shortcuts return valid results.
size_t num_shortcuts = 0;
@@ -19,7 +20,8 @@ TEST(GlobalKeyboardShortcuts, ShortcutsToWindowCommand) {
ASSERT_GT(num_shortcuts, 0U);
for (size_t i = 0; i < num_shortcuts; ++i, ++it) {
int cmd_num = CommandForWindowKeyboardShortcut(
- it->command_key, it->shift_key, it->cntrl_key, it->vkey_code);
+ it->command_key, it->shift_key, it->cntrl_key, it->opt_key,
+ it->vkey_code);
ASSERT_EQ(cmd_num, it->chrome_command);
}
@@ -27,14 +29,15 @@ TEST(GlobalKeyboardShortcuts, ShortcutsToWindowCommand) {
// would be invoked even if e.g. the omnibox had focus, where they really
// should have text editing functionality).
ASSERT_EQ(-1, CommandForWindowKeyboardShortcut(
- true, false, false, kVK_LeftArrow));
+ true, false, false, false, kVK_LeftArrow));
ASSERT_EQ(-1, CommandForWindowKeyboardShortcut(
- false, false, false, kVK_Delete));
+ false, false, false, false, kVK_Delete));
}
TEST(GlobalKeyboardShortcuts, ShortcutsToBrowserCommand) {
// Test that an invalid shortcut translates into an invalid command id.
- ASSERT_EQ(-1, CommandForBrowserKeyboardShortcut(false, false, false, 0));
+ ASSERT_EQ(
+ -1, CommandForBrowserKeyboardShortcut(false, false, false, false, 0));
// Check that all known keyboard shortcuts return valid results.
size_t num_shortcuts = 0;
@@ -43,7 +46,7 @@ TEST(GlobalKeyboardShortcuts, ShortcutsToBrowserCommand) {
ASSERT_GT(num_shortcuts, 0U);
for (size_t i = 0; i < num_shortcuts; ++i, ++it) {
int cmd_num = CommandForBrowserKeyboardShortcut(
- it->command_key, it->shift_key, it->cntrl_key, it->vkey_code);
- ASSERT_EQ(cmd_num, it->chrome_command);
+ it->command_key, it->shift_key, it->cntrl_key, it->opt_key,
+ it->vkey_code); ASSERT_EQ(cmd_num, it->chrome_command);
}
}
« 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