| 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 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 SimulateTimerExpired(ewh); | 945 SimulateTimerExpired(ewh); |
| 946 EXPECT_TRUE(is_idle(ewh)); | 946 EXPECT_TRUE(is_idle(ewh)); |
| 947 EXPECT_FALSE(is_ui_shown(ewh)); | 947 EXPECT_FALSE(is_ui_shown(ewh)); |
| 948 Reset(ewh); | 948 Reset(ewh); |
| 949 | 949 |
| 950 // New tab | 950 // New tab |
| 951 EXPECT_TRUE( | 951 EXPECT_TRUE( |
| 952 ProcessInController(ui::Accelerator(ui::VKEY_T, ui::EF_CONTROL_DOWN))); | 952 ProcessInController(ui::Accelerator(ui::VKEY_T, ui::EF_CONTROL_DOWN))); |
| 953 | 953 |
| 954 // New incognito window | 954 // New incognito window |
| 955 // TODO(sky): this should be true but fails because WmTestBase is not using | 955 EXPECT_TRUE(ProcessInController( |
| 956 // TestShellDelegate: http://crbug.com/632211. | |
| 957 EXPECT_FALSE(ProcessInController( | |
| 958 ui::Accelerator(ui::VKEY_N, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN))); | 956 ui::Accelerator(ui::VKEY_N, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN))); |
| 959 | 957 |
| 960 // New window | 958 // New window |
| 961 EXPECT_TRUE( | 959 EXPECT_TRUE( |
| 962 ProcessInController(ui::Accelerator(ui::VKEY_N, ui::EF_CONTROL_DOWN))); | 960 ProcessInController(ui::Accelerator(ui::VKEY_N, ui::EF_CONTROL_DOWN))); |
| 963 | 961 |
| 964 // Restore tab | 962 // Restore tab |
| 965 EXPECT_TRUE(ProcessInController( | 963 EXPECT_TRUE(ProcessInController( |
| 966 ui::Accelerator(ui::VKEY_T, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN))); | 964 ui::Accelerator(ui::VKEY_T, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN))); |
| 967 | 965 |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1447 // Expect no notifications from the new accelerators. | 1445 // Expect no notifications from the new accelerators. |
| 1448 EXPECT_TRUE(IsMessageCenterEmpty()); | 1446 EXPECT_TRUE(IsMessageCenterEmpty()); |
| 1449 | 1447 |
| 1450 // If the action is LOCK_SCREEN, we must reset the state by unlocking the | 1448 // If the action is LOCK_SCREEN, we must reset the state by unlocking the |
| 1451 // screen before we proceed testing the rest of accelerators. | 1449 // screen before we proceed testing the rest of accelerators. |
| 1452 ResetStateIfNeeded(); | 1450 ResetStateIfNeeded(); |
| 1453 } | 1451 } |
| 1454 } | 1452 } |
| 1455 | 1453 |
| 1456 } // namespace ash | 1454 } // namespace ash |
| OLD | NEW |