| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/common/session/session_state_delegate.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 lock_state_controller_ = Shell::GetInstance()->lock_state_controller(); | 63 lock_state_controller_ = Shell::GetInstance()->lock_state_controller(); |
| 64 lock_state_controller_->SetDelegate( | 64 lock_state_controller_->SetDelegate( |
| 65 std::move(lock_state_controller_delegate)); | 65 std::move(lock_state_controller_delegate)); |
| 66 lock_state_controller_->set_animator_for_test(test_animator_); | 66 lock_state_controller_->set_animator_for_test(test_animator_); |
| 67 | 67 |
| 68 test_api_.reset(new LockStateController::TestApi(lock_state_controller_)); | 68 test_api_.reset(new LockStateController::TestApi(lock_state_controller_)); |
| 69 | 69 |
| 70 power_button_controller_ = Shell::GetInstance()->power_button_controller(); | 70 power_button_controller_ = Shell::GetInstance()->power_button_controller(); |
| 71 | 71 |
| 72 shell_delegate_ = | 72 shell_delegate_ = |
| 73 static_cast<TestShellDelegate*>(Shell::GetInstance()->delegate()); | 73 static_cast<TestShellDelegate*>(WmShell::Get()->delegate()); |
| 74 } | 74 } |
| 75 | 75 |
| 76 protected: | 76 protected: |
| 77 void GenerateMouseMoveEvent() { | 77 void GenerateMouseMoveEvent() { |
| 78 ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow()); | 78 ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow()); |
| 79 generator.MoveMouseTo(10, 10); | 79 generator.MoveMouseTo(10, 10); |
| 80 } | 80 } |
| 81 | 81 |
| 82 int NumShutdownRequests() { | 82 int NumShutdownRequests() { |
| 83 return lock_state_controller_delegate_->num_shutdown_requests() + | 83 return lock_state_controller_delegate_->num_shutdown_requests() + |
| (...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 ReleasePowerButton(); | 1079 ReleasePowerButton(); |
| 1080 | 1080 |
| 1081 ExpectPreLockAnimationStarted(); | 1081 ExpectPreLockAnimationStarted(); |
| 1082 | 1082 |
| 1083 test_animator_->CompleteAllAnimations(true); | 1083 test_animator_->CompleteAllAnimations(true); |
| 1084 EXPECT_EQ(1, lock_state_controller_delegate_->num_lock_requests()); | 1084 EXPECT_EQ(1, lock_state_controller_delegate_->num_lock_requests()); |
| 1085 } | 1085 } |
| 1086 | 1086 |
| 1087 } // namespace test | 1087 } // namespace test |
| 1088 } // namespace ash | 1088 } // namespace ash |
| OLD | NEW |