| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/accelerators/accelerator_controller.h" | 5 #include "ash/accelerators/accelerator_controller.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_observer.h" | 8 #include "ash/shell_observer.h" |
| 9 #include "ash/system/chromeos/network/network_observer.h" | 9 #include "ash/system/chromeos/network/network_observer.h" |
| 10 #include "ash/system/tray/system_tray_delegate.h" | 10 #include "ash/system/tray/system_tray_delegate.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 SendKeyPressSync(ui::VKEY_PRINT, false, false, false); | 161 SendKeyPressSync(ui::VKEY_PRINT, false, false, false); |
| 162 EXPECT_EQ(2, screenshot_delegate->handle_take_screenshot_count()); | 162 EXPECT_EQ(2, screenshot_delegate->handle_take_screenshot_count()); |
| 163 SendKeyPressSync(ui::VKEY_MEDIA_LAUNCH_APP1, true, true, false); | 163 SendKeyPressSync(ui::VKEY_MEDIA_LAUNCH_APP1, true, true, false); |
| 164 EXPECT_EQ(2, screenshot_delegate->handle_take_screenshot_count()); | 164 EXPECT_EQ(2, screenshot_delegate->handle_take_screenshot_count()); |
| 165 // Press ESC to go out of the partial screenshot mode. | 165 // Press ESC to go out of the partial screenshot mode. |
| 166 SendKeyPressSync(ui::VKEY_ESCAPE, false, false, false); | 166 SendKeyPressSync(ui::VKEY_ESCAPE, false, false, false); |
| 167 | 167 |
| 168 // Test VOLUME_MUTE, VOLUME_DOWN, and VOLUME_UP. | 168 // Test VOLUME_MUTE, VOLUME_DOWN, and VOLUME_UP. |
| 169 TestVolumeControlDelegate* volume_delegate = new TestVolumeControlDelegate; | 169 TestVolumeControlDelegate* volume_delegate = new TestVolumeControlDelegate; |
| 170 shell()->system_tray_delegate()->SetVolumeControlDelegate( | 170 shell()->system_tray_delegate()->SetVolumeControlDelegate( |
| 171 scoped_ptr<VolumeControlDelegate>(volume_delegate).Pass()); | 171 scoped_ptr<VolumeControlDelegate>(volume_delegate)); |
| 172 // VOLUME_MUTE. | 172 // VOLUME_MUTE. |
| 173 EXPECT_EQ(0, volume_delegate->handle_volume_mute_count()); | 173 EXPECT_EQ(0, volume_delegate->handle_volume_mute_count()); |
| 174 SendKeyPressSync(ui::VKEY_VOLUME_MUTE, false, false, false); | 174 SendKeyPressSync(ui::VKEY_VOLUME_MUTE, false, false, false); |
| 175 EXPECT_EQ(1, volume_delegate->handle_volume_mute_count()); | 175 EXPECT_EQ(1, volume_delegate->handle_volume_mute_count()); |
| 176 // VOLUME_DOWN. | 176 // VOLUME_DOWN. |
| 177 EXPECT_EQ(0, volume_delegate->handle_volume_down_count()); | 177 EXPECT_EQ(0, volume_delegate->handle_volume_down_count()); |
| 178 SendKeyPressSync(ui::VKEY_VOLUME_DOWN, false, false, false); | 178 SendKeyPressSync(ui::VKEY_VOLUME_DOWN, false, false, false); |
| 179 EXPECT_EQ(1, volume_delegate->handle_volume_down_count()); | 179 EXPECT_EQ(1, volume_delegate->handle_volume_down_count()); |
| 180 // VOLUME_UP. | 180 // VOLUME_UP. |
| 181 EXPECT_EQ(0, volume_delegate->handle_volume_up_count()); | 181 EXPECT_EQ(0, volume_delegate->handle_volume_up_count()); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 199 TEST_F(AcceleratorInteractiveUITest, MAYBE_ToggleAppList) { | 199 TEST_F(AcceleratorInteractiveUITest, MAYBE_ToggleAppList) { |
| 200 EXPECT_FALSE(shell()->GetAppListTargetVisibility()); | 200 EXPECT_FALSE(shell()->GetAppListTargetVisibility()); |
| 201 SendKeyPressSync(ui::VKEY_LWIN, false, false, false); | 201 SendKeyPressSync(ui::VKEY_LWIN, false, false, false); |
| 202 EXPECT_TRUE(shell()->GetAppListTargetVisibility()); | 202 EXPECT_TRUE(shell()->GetAppListTargetVisibility()); |
| 203 SendKeyPressSync(ui::VKEY_LWIN, false, false, false); | 203 SendKeyPressSync(ui::VKEY_LWIN, false, false, false); |
| 204 EXPECT_FALSE(shell()->GetAppListTargetVisibility()); | 204 EXPECT_FALSE(shell()->GetAppListTargetVisibility()); |
| 205 } | 205 } |
| 206 | 206 |
| 207 } // namespace test | 207 } // namespace test |
| 208 } // namespace ash | 208 } // namespace ash |
| OLD | NEW |