| Index: chrome/browser/global_keyboard_shortcuts_mac_unittest.cc
|
| ===================================================================
|
| --- chrome/browser/global_keyboard_shortcuts_mac_unittest.cc (revision 34671)
|
| +++ chrome/browser/global_keyboard_shortcuts_mac_unittest.cc (working copy)
|
| @@ -34,6 +34,24 @@
|
| false, false, false, false, kVK_Delete));
|
| }
|
|
|
| +TEST(GlobalKeyboardShortcuts, ShortcutsToDelayedWindowCommand) {
|
| + // Test that an invalid shortcut translates into an invalid command id.
|
| + ASSERT_EQ(-1,
|
| + CommandForDelayedWindowKeyboardShortcut(false, false, false, false, 0));
|
| +
|
| + // Check that all known keyboard shortcuts return valid results.
|
| + size_t num_shortcuts = 0;
|
| + const KeyboardShortcutData *it =
|
| + GetDelayedWindowKeyboardShortcutTable(&num_shortcuts);
|
| + ASSERT_GT(num_shortcuts, 0U);
|
| + for (size_t i = 0; i < num_shortcuts; ++i, ++it) {
|
| + int cmd_num = CommandForDelayedWindowKeyboardShortcut(
|
| + it->command_key, it->shift_key, it->cntrl_key, it->opt_key,
|
| + it->vkey_code);
|
| + ASSERT_EQ(cmd_num, it->chrome_command);
|
| + }
|
| +}
|
| +
|
| TEST(GlobalKeyboardShortcuts, ShortcutsToBrowserCommand) {
|
| // Test that an invalid shortcut translates into an invalid command id.
|
| ASSERT_EQ(
|
|
|