| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/common/accelerators/accelerator_controller.h" | 5 #include "ash/common/accelerators/accelerator_controller.h" |
| 6 | 6 |
| 7 #include "ash/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
| 8 #include "ash/common/accelerators/accelerator_table.h" | 8 #include "ash/common/accelerators/accelerator_table.h" |
| 9 #include "ash/common/accessibility_delegate.h" | 9 #include "ash/common/accessibility_delegate.h" |
| 10 #include "ash/common/accessibility_types.h" | 10 #include "ash/common/accessibility_types.h" |
| (...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 | 934 |
| 935 #if defined(OS_CHROMEOS) | 935 #if defined(OS_CHROMEOS) |
| 936 // Open file manager | 936 // Open file manager |
| 937 EXPECT_TRUE(ProcessInController( | 937 EXPECT_TRUE(ProcessInController( |
| 938 ui::Accelerator(ui::VKEY_M, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN))); | 938 ui::Accelerator(ui::VKEY_M, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN))); |
| 939 | 939 |
| 940 // Lock screen | 940 // Lock screen |
| 941 // NOTE: Accelerators that do not work on the lock screen need to be | 941 // NOTE: Accelerators that do not work on the lock screen need to be |
| 942 // tested before the sequence below is invoked because it causes a side | 942 // tested before the sequence below is invoked because it causes a side |
| 943 // effect of locking the screen. | 943 // effect of locking the screen. |
| 944 EXPECT_TRUE(ProcessInController( | 944 EXPECT_TRUE( |
| 945 ui::Accelerator(ui::VKEY_L, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN))); | 945 ProcessInController(ui::Accelerator(ui::VKEY_L, ui::EF_COMMAND_DOWN))); |
| 946 #endif | 946 #endif |
| 947 } | 947 } |
| 948 | 948 |
| 949 TEST_F(AcceleratorControllerTest, GlobalAcceleratorsToggleAppList) { | 949 TEST_F(AcceleratorControllerTest, GlobalAcceleratorsToggleAppList) { |
| 950 AccessibilityDelegate* delegate = WmShell::Get()->accessibility_delegate(); | 950 AccessibilityDelegate* delegate = WmShell::Get()->accessibility_delegate(); |
| 951 EXPECT_FALSE(WmShell::Get()->GetAppListTargetVisibility()); | 951 EXPECT_FALSE(WmShell::Get()->GetAppListTargetVisibility()); |
| 952 | 952 |
| 953 // The press event should not open the AppList, the release should instead. | 953 // The press event should not open the AppList, the release should instead. |
| 954 EXPECT_FALSE( | 954 EXPECT_FALSE( |
| 955 ProcessInController(ui::Accelerator(ui::VKEY_LWIN, ui::EF_NONE))); | 955 ProcessInController(ui::Accelerator(ui::VKEY_LWIN, ui::EF_NONE))); |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 EXPECT_TRUE(IsMessageCenterEmpty()); | 1411 EXPECT_TRUE(IsMessageCenterEmpty()); |
| 1412 | 1412 |
| 1413 // If the action is LOCK_SCREEN, we must reset the state by unlocking the | 1413 // If the action is LOCK_SCREEN, we must reset the state by unlocking the |
| 1414 // screen before we proceed testing the rest of accelerators. | 1414 // screen before we proceed testing the rest of accelerators. |
| 1415 ResetStateIfNeeded(); | 1415 ResetStateIfNeeded(); |
| 1416 } | 1416 } |
| 1417 } | 1417 } |
| 1418 #endif // defined(OS_CHROMEOS) | 1418 #endif // defined(OS_CHROMEOS) |
| 1419 | 1419 |
| 1420 } // namespace ash | 1420 } // namespace ash |
| OLD | NEW |