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

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

Issue 2799973002: [Merge to M58] 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 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 ResetStateIfNeeded(); 1549 ResetStateIfNeeded();
1550 } 1550 }
1551 } 1551 }
1552 1552
1553 TEST_F(DeprecatedAcceleratorTester, TestNewAccelerators) { 1553 TEST_F(DeprecatedAcceleratorTester, TestNewAccelerators) {
1554 // Add below the new accelerators that replaced the deprecated ones (if any). 1554 // Add below the new accelerators that replaced the deprecated ones (if any).
1555 const AcceleratorData kNewAccelerators[] = { 1555 const AcceleratorData kNewAccelerators[] = {
1556 {true, ui::VKEY_L, ui::EF_COMMAND_DOWN, LOCK_SCREEN}, 1556 {true, ui::VKEY_L, ui::EF_COMMAND_DOWN, LOCK_SCREEN},
1557 {true, ui::VKEY_SPACE, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, NEXT_IME}, 1557 {true, ui::VKEY_SPACE, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, NEXT_IME},
1558 {true, ui::VKEY_ESCAPE, ui::EF_COMMAND_DOWN, SHOW_TASK_MANAGER}, 1558 {true, ui::VKEY_ESCAPE, ui::EF_COMMAND_DOWN, SHOW_TASK_MANAGER},
1559 {true, ui::VKEY_K, ui::EF_SHIFT_DOWN | ui::EF_COMMAND_DOWN,
1560 SHOW_IME_MENU_BUBBLE},
1559 }; 1561 };
1560 1562
1561 EXPECT_TRUE(IsMessageCenterEmpty()); 1563 EXPECT_TRUE(IsMessageCenterEmpty());
1562 1564
1563 for (auto data : kNewAccelerators) { 1565 for (auto data : kNewAccelerators) {
1564 EXPECT_TRUE(ProcessInController(CreateAccelerator(data))); 1566 EXPECT_TRUE(ProcessInController(CreateAccelerator(data)));
1565 1567
1566 // Expect no notifications from the new accelerators. 1568 // Expect no notifications from the new accelerators.
1567 EXPECT_TRUE(IsMessageCenterEmpty()); 1569 EXPECT_TRUE(IsMessageCenterEmpty());
1568 1570
1569 // If the action is LOCK_SCREEN, we must reset the state by unlocking the 1571 // If the action is LOCK_SCREEN, we must reset the state by unlocking the
1570 // screen before we proceed testing the rest of accelerators. 1572 // screen before we proceed testing the rest of accelerators.
1571 ResetStateIfNeeded(); 1573 ResetStateIfNeeded();
1572 } 1574 }
1573 } 1575 }
1574 1576
1575 } // namespace ash 1577 } // 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