Chromium Code Reviews| Index: ash/wm/lock_state_controller_unittest.cc |
| diff --git a/ash/wm/lock_state_controller_unittest.cc b/ash/wm/lock_state_controller_unittest.cc |
| index 3f1501f6fe357b1769b170fb6958f270049408d9..0601f8e8b0086273126d03146fb812b3226a9db8 100644 |
| --- a/ash/wm/lock_state_controller_unittest.cc |
| +++ b/ash/wm/lock_state_controller_unittest.cc |
| @@ -13,10 +13,10 @@ |
| #include "ash/common/wm_shell.h" |
| #include "ash/shell.h" |
| #include "ash/test/ash_test_base.h" |
| -#include "ash/test/test_lock_state_controller_delegate.h" |
| #include "ash/test/test_screenshot_delegate.h" |
| #include "ash/test/test_session_state_animator.h" |
| #include "ash/test/test_shell_delegate.h" |
| +#include "ash/test/test_shutdown_client.h" |
| #include "ash/wm/power_button_controller.h" |
| #include "ash/wm/session_state_animator.h" |
| #include "base/memory/scoped_vector.h" |
| @@ -49,7 +49,7 @@ class LockStateControllerTest : public AshTestBase { |
| LockStateControllerTest() |
| : power_button_controller_(nullptr), |
| lock_state_controller_(nullptr), |
| - lock_state_controller_delegate_(nullptr), |
| + shutdown_client_(nullptr), |
| session_manager_client_(nullptr), |
| test_animator_(nullptr) {} |
| ~LockStateControllerTest() override {} |
| @@ -60,16 +60,15 @@ class LockStateControllerTest : public AshTestBase { |
| base::WrapUnique(session_manager_client_)); |
| AshTestBase::SetUp(); |
| - std::unique_ptr<LockStateControllerDelegate> lock_state_controller_delegate( |
| - lock_state_controller_delegate_ = new TestLockStateControllerDelegate); |
| + std::unique_ptr<TestShutdownClient> shutdown_client( |
| + shutdown_client_ = new TestShutdownClient); |
|
James Cook
2016/11/02 20:20:03
nit: This construct made me do a double-take. Plea
Elliot Glaysher
2016/11/02 21:45:16
Done.
|
| test_animator_ = new TestSessionStateAnimator; |
| lock_state_controller_ = Shell::GetInstance()->lock_state_controller(); |
| - lock_state_controller_->SetDelegate( |
| - std::move(lock_state_controller_delegate)); |
| lock_state_controller_->set_animator_for_test(test_animator_); |
| test_api_.reset(new LockStateController::TestApi(lock_state_controller_)); |
| + test_api_->SetShutdownClient(std::move(shutdown_client)); |
| power_button_controller_ = Shell::GetInstance()->power_button_controller(); |
| @@ -89,7 +88,7 @@ class LockStateControllerTest : public AshTestBase { |
| } |
| int NumShutdownRequests() { |
| - return lock_state_controller_delegate_->num_shutdown_requests() + |
| + return shutdown_client_->num_shutdown_requests() + |
| shell_delegate_->num_exit_requests(); |
| } |
| @@ -326,8 +325,7 @@ class LockStateControllerTest : public AshTestBase { |
| PowerButtonController* power_button_controller_; // not owned |
| LockStateController* lock_state_controller_; // not owned |
| - TestLockStateControllerDelegate* |
| - lock_state_controller_delegate_; // not owned |
| + TestShutdownClient* shutdown_client_; // not owned |
| // Ownership is passed on to chromeos::DBusThreadManager. |
| chromeos::FakeSessionManagerClient* session_manager_client_; |
| TestSessionStateAnimator* test_animator_; // not owned |