| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/wm/lock_state_controller.h" | 5 #include "ash/wm/lock_state_controller.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/session/session_state_delegate.h" | 8 #include "ash/session/session_state_delegate.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| (...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 ReleasePowerButton(); | 958 ReleasePowerButton(); |
| 959 | 959 |
| 960 // After increasing the brightness to 10%, we should start the timer like | 960 // After increasing the brightness to 10%, we should start the timer like |
| 961 // usual. | 961 // usual. |
| 962 controller_->OnScreenBrightnessChanged(10.0); | 962 controller_->OnScreenBrightnessChanged(10.0); |
| 963 PressPowerButton(); | 963 PressPowerButton(); |
| 964 EXPECT_TRUE(test_api_->is_animating_lock()); | 964 EXPECT_TRUE(test_api_->is_animating_lock()); |
| 965 ReleasePowerButton(); | 965 ReleasePowerButton(); |
| 966 } | 966 } |
| 967 | 967 |
| 968 #if defined(OS_CHROMEOS) && defined(USE_X11) | 968 #if defined(OS_CHROMEOS) |
| 969 TEST_F(LockStateControllerTest, HonorPowerButtonInDockedMode) { | 969 TEST_F(LockStateControllerTest, HonorPowerButtonInDockedMode) { |
| 970 ScopedVector<const ui::DisplayMode> modes; | 970 ScopedVector<const ui::DisplayMode> modes; |
| 971 modes.push_back(new ui::DisplayMode(gfx::Size(1, 1), false, 60.0f)); | 971 modes.push_back(new ui::DisplayMode(gfx::Size(1, 1), false, 60.0f)); |
| 972 | 972 |
| 973 // Create two outputs, the first internal and the second external. | 973 // Create two outputs, the first internal and the second external. |
| 974 ui::DisplayConfigurator::DisplayStateList outputs; | 974 ui::DisplayConfigurator::DisplayStateList outputs; |
| 975 ui::DisplayConfigurator::DisplayState internal_output; | 975 ui::DisplayConfigurator::DisplayState internal_output; |
| 976 ui::TestDisplaySnapshot internal_display; | 976 ui::TestDisplaySnapshot internal_display; |
| 977 internal_display.set_type(ui::DISPLAY_CONNECTION_TYPE_INTERNAL); | 977 internal_display.set_type(ui::DISPLAY_CONNECTION_TYPE_INTERNAL); |
| 978 internal_display.set_modes(modes.get()); | 978 internal_display.set_modes(modes.get()); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 | 1084 |
| 1085 Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS); | 1085 Advance(SessionStateAnimator::ANIMATION_SPEED_MOVE_WINDOWS); |
| 1086 ExpectUnlockAfterUIDestroyedAnimationFinished(); | 1086 ExpectUnlockAfterUIDestroyedAnimationFinished(); |
| 1087 EXPECT_TRUE(IsBackgroundHidden()); | 1087 EXPECT_TRUE(IsBackgroundHidden()); |
| 1088 | 1088 |
| 1089 ExpectUnlockedState(); | 1089 ExpectUnlockedState(); |
| 1090 } | 1090 } |
| 1091 | 1091 |
| 1092 } // namespace test | 1092 } // namespace test |
| 1093 } // namespace ash | 1093 } // namespace ash |
| OLD | NEW |