| 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/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 Loading... |
| 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}, | |
| 1561 }; | 1559 }; |
| 1562 | 1560 |
| 1563 EXPECT_TRUE(IsMessageCenterEmpty()); | 1561 EXPECT_TRUE(IsMessageCenterEmpty()); |
| 1564 | 1562 |
| 1565 for (auto data : kNewAccelerators) { | 1563 for (auto data : kNewAccelerators) { |
| 1566 EXPECT_TRUE(ProcessInController(CreateAccelerator(data))); | 1564 EXPECT_TRUE(ProcessInController(CreateAccelerator(data))); |
| 1567 | 1565 |
| 1568 // Expect no notifications from the new accelerators. | 1566 // Expect no notifications from the new accelerators. |
| 1569 EXPECT_TRUE(IsMessageCenterEmpty()); | 1567 EXPECT_TRUE(IsMessageCenterEmpty()); |
| 1570 | 1568 |
| 1571 // If the action is LOCK_SCREEN, we must reset the state by unlocking the | 1569 // If the action is LOCK_SCREEN, we must reset the state by unlocking the |
| 1572 // screen before we proceed testing the rest of accelerators. | 1570 // screen before we proceed testing the rest of accelerators. |
| 1573 ResetStateIfNeeded(); | 1571 ResetStateIfNeeded(); |
| 1574 } | 1572 } |
| 1575 } | 1573 } |
| 1576 | 1574 |
| 1577 } // namespace ash | 1575 } // namespace ash |
| OLD | NEW |