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

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

Issue 2784393002: Deprecate Alt+Shift+K and replace it by Search+Shift+K (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | ash/ash_strings.grd » ('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 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 ResetStateIfNeeded(); 1343 ResetStateIfNeeded();
1344 } 1344 }
1345 } 1345 }
1346 1346
1347 TEST_F(DeprecatedAcceleratorTester, TestNewAccelerators) { 1347 TEST_F(DeprecatedAcceleratorTester, TestNewAccelerators) {
1348 // Add below the new accelerators that replaced the deprecated ones (if any). 1348 // Add below the new accelerators that replaced the deprecated ones (if any).
1349 const AcceleratorData kNewAccelerators[] = { 1349 const AcceleratorData kNewAccelerators[] = {
1350 {true, ui::VKEY_L, ui::EF_COMMAND_DOWN, LOCK_SCREEN}, 1350 {true, ui::VKEY_L, ui::EF_COMMAND_DOWN, LOCK_SCREEN},
1351 {true, ui::VKEY_SPACE, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, NEXT_IME}, 1351 {true, ui::VKEY_SPACE, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, NEXT_IME},
1352 {true, ui::VKEY_ESCAPE, ui::EF_COMMAND_DOWN, SHOW_TASK_MANAGER}, 1352 {true, ui::VKEY_ESCAPE, ui::EF_COMMAND_DOWN, SHOW_TASK_MANAGER},
1353 {true, ui::VKEY_K, ui::EF_SHIFT_DOWN | ui::EF_COMMAND_DOWN,
1354 SHOW_IME_MENU_BUBBLE},
1353 }; 1355 };
1354 1356
1355 EXPECT_TRUE(IsMessageCenterEmpty()); 1357 EXPECT_TRUE(IsMessageCenterEmpty());
1356 1358
1357 for (auto data : kNewAccelerators) { 1359 for (auto data : kNewAccelerators) {
1358 EXPECT_TRUE(ProcessInController(CreateAccelerator(data))); 1360 EXPECT_TRUE(ProcessInController(CreateAccelerator(data)));
1359 1361
1360 // Expect no notifications from the new accelerators. 1362 // Expect no notifications from the new accelerators.
1361 EXPECT_TRUE(IsMessageCenterEmpty()); 1363 EXPECT_TRUE(IsMessageCenterEmpty());
1362 1364
1363 // If the action is LOCK_SCREEN, we must reset the state by unlocking the 1365 // If the action is LOCK_SCREEN, we must reset the state by unlocking the
1364 // screen before we proceed testing the rest of accelerators. 1366 // screen before we proceed testing the rest of accelerators.
1365 ResetStateIfNeeded(); 1367 ResetStateIfNeeded();
1366 } 1368 }
1367 } 1369 }
1368 1370
1369 } // namespace ash 1371 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/ash_strings.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698