| 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 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |