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/accelerators/accelerator_controller.h" | 5 #include "ash/accelerators/accelerator_controller.h" |
6 | 6 |
7 #include "ash/accelerators/accelerator_table.h" | 7 #include "ash/accelerators/accelerator_table.h" |
8 #include "ash/accessibility_delegate.h" | 8 #include "ash/accessibility_delegate.h" |
9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
851 EXPECT_TRUE(ProcessInController( | 851 EXPECT_TRUE(ProcessInController( |
852 ui::Accelerator(ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_CONTROL_DOWN))); | 852 ui::Accelerator(ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_CONTROL_DOWN))); |
853 EXPECT_EQ(1, delegate->handle_take_screenshot_count()); | 853 EXPECT_EQ(1, delegate->handle_take_screenshot_count()); |
854 EXPECT_TRUE( | 854 EXPECT_TRUE( |
855 ProcessInController(ui::Accelerator( | 855 ProcessInController(ui::Accelerator( |
856 ui::VKEY_PRINT, ui::EF_NONE))); | 856 ui::VKEY_PRINT, ui::EF_NONE))); |
857 EXPECT_EQ(2, delegate->handle_take_screenshot_count()); | 857 EXPECT_EQ(2, delegate->handle_take_screenshot_count()); |
858 EXPECT_TRUE(ProcessInController(ui::Accelerator( | 858 EXPECT_TRUE(ProcessInController(ui::Accelerator( |
859 ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN))); | 859 ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN))); |
860 EXPECT_EQ(2, delegate->handle_take_screenshot_count()); | 860 EXPECT_EQ(2, delegate->handle_take_screenshot_count()); |
861 EXPECT_TRUE(ProcessInController(ui::Accelerator( | |
862 ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN))); | |
863 EXPECT_EQ(2, delegate->handle_take_screenshot_count()); | |
oshima
2016/04/13 23:05:36
shouldn't this be
EXPECT_EQ(1, and handle_take_wi
Qiang(Joe) Xu
2016/04/13 23:36:16
Done.
| |
861 } | 864 } |
862 const ui::Accelerator volume_mute(ui::VKEY_VOLUME_MUTE, ui::EF_NONE); | 865 const ui::Accelerator volume_mute(ui::VKEY_VOLUME_MUTE, ui::EF_NONE); |
863 const ui::Accelerator volume_down(ui::VKEY_VOLUME_DOWN, ui::EF_NONE); | 866 const ui::Accelerator volume_down(ui::VKEY_VOLUME_DOWN, ui::EF_NONE); |
864 const ui::Accelerator volume_up(ui::VKEY_VOLUME_UP, ui::EF_NONE); | 867 const ui::Accelerator volume_up(ui::VKEY_VOLUME_UP, ui::EF_NONE); |
865 { | 868 { |
866 TestVolumeControlDelegate* delegate = new TestVolumeControlDelegate; | 869 TestVolumeControlDelegate* delegate = new TestVolumeControlDelegate; |
867 ash::Shell::GetInstance()->system_tray_delegate()->SetVolumeControlDelegate( | 870 ash::Shell::GetInstance()->system_tray_delegate()->SetVolumeControlDelegate( |
868 scoped_ptr<VolumeControlDelegate>(delegate)); | 871 scoped_ptr<VolumeControlDelegate>(delegate)); |
869 EXPECT_EQ(0, delegate->handle_volume_mute_count()); | 872 EXPECT_EQ(0, delegate->handle_volume_mute_count()); |
870 EXPECT_TRUE(ProcessInController(volume_mute)); | 873 EXPECT_TRUE(ProcessInController(volume_mute)); |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1576 EXPECT_TRUE(IsMessageCenterEmpty()); | 1579 EXPECT_TRUE(IsMessageCenterEmpty()); |
1577 | 1580 |
1578 // If the action is LOCK_SCREEN, we must reset the state by unlocking the | 1581 // If the action is LOCK_SCREEN, we must reset the state by unlocking the |
1579 // screen before we proceed testing the rest of accelerators. | 1582 // screen before we proceed testing the rest of accelerators. |
1580 ResetStateIfNeeded(); | 1583 ResetStateIfNeeded(); |
1581 } | 1584 } |
1582 } | 1585 } |
1583 #endif // defined(OS_CHROMEOS) | 1586 #endif // defined(OS_CHROMEOS) |
1584 | 1587 |
1585 } // namespace ash | 1588 } // namespace ash |
OLD | NEW |