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

Side by Side Diff: ash/mus/accelerators/accelerator_controller_unittest.cc

Issue 2652093002: mash: Make the power button shut the system down. (Closed)
Patch Set: add comment about CursorManager Created 3 years, 11 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
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/mus/bridge/wm_shell_mus.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/common/accelerators/accelerator_table.h" 7 #include "ash/common/accelerators/accelerator_table.h"
8 #include "ash/common/accessibility_delegate.h" 8 #include "ash/common/accessibility_delegate.h"
9 #include "ash/common/accessibility_types.h" 9 #include "ash/common/accessibility_types.h"
10 #include "ash/common/ash_switches.h" 10 #include "ash/common/ash_switches.h"
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 // Show task manager 965 // Show task manager
966 EXPECT_TRUE( 966 EXPECT_TRUE(
967 ProcessInController(ui::Accelerator(ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN))); 967 ProcessInController(ui::Accelerator(ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN)));
968 968
969 #if defined(OS_CHROMEOS) 969 #if defined(OS_CHROMEOS)
970 // Open file manager 970 // Open file manager
971 EXPECT_TRUE(ProcessInController( 971 EXPECT_TRUE(ProcessInController(
972 ui::Accelerator(ui::VKEY_M, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN))); 972 ui::Accelerator(ui::VKEY_M, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN)));
973 973
974 // Lock screen 974 // Lock screen
975 // NOTE: Accelerators that do not work on the lock screen need to be 975 // TODO(derat): Reenable this once user sessions work in mash.
976 // tested before the sequence below is invoked because it causes a side 976 EXPECT_FALSE(
977 // effect of locking the screen.
978 EXPECT_TRUE(
979 ProcessInController(ui::Accelerator(ui::VKEY_L, ui::EF_COMMAND_DOWN))); 977 ProcessInController(ui::Accelerator(ui::VKEY_L, ui::EF_COMMAND_DOWN)));
980 #endif 978 #endif
981 } 979 }
982 980
983 // TODO: fails in mash, http://crbug.com/632180. 981 // TODO: fails in mash, http://crbug.com/632180.
984 TEST_F(AcceleratorControllerTest, DISABLED_GlobalAcceleratorsToggleAppList) { 982 TEST_F(AcceleratorControllerTest, DISABLED_GlobalAcceleratorsToggleAppList) {
985 AccessibilityDelegate* delegate = WmShell::Get()->accessibility_delegate(); 983 AccessibilityDelegate* delegate = WmShell::Get()->accessibility_delegate();
986 EXPECT_FALSE(WmShell::Get()->GetAppListTargetVisibility()); 984 EXPECT_FALSE(WmShell::Get()->GetAppListTargetVisibility());
987 985
988 // The press event should not open the AppList, the release should instead. 986 // The press event should not open the AppList, the release should instead.
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1460 EXPECT_TRUE(IsMessageCenterEmpty()); 1458 EXPECT_TRUE(IsMessageCenterEmpty());
1461 1459
1462 // If the action is LOCK_SCREEN, we must reset the state by unlocking the 1460 // If the action is LOCK_SCREEN, we must reset the state by unlocking the
1463 // screen before we proceed testing the rest of accelerators. 1461 // screen before we proceed testing the rest of accelerators.
1464 ResetStateIfNeeded(); 1462 ResetStateIfNeeded();
1465 } 1463 }
1466 } 1464 }
1467 #endif // defined(OS_CHROMEOS) 1465 #endif // defined(OS_CHROMEOS)
1468 1466
1469 } // namespace ash 1467 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/mus/bridge/wm_shell_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698