| 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/session/session_state_delegate.h" | 7 #include "ash/session/session_state_delegate.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
| 10 #include "ash/test/test_lock_state_controller_delegate.h" | 10 #include "ash/test/test_lock_state_controller_delegate.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 class LockStateControllerTest : public AshTestBase { | 44 class LockStateControllerTest : public AshTestBase { |
| 45 public: | 45 public: |
| 46 LockStateControllerTest() : power_button_controller_(NULL), | 46 LockStateControllerTest() : power_button_controller_(NULL), |
| 47 lock_state_controller_(NULL), | 47 lock_state_controller_(NULL), |
| 48 lock_state_controller_delegate_(NULL), | 48 lock_state_controller_delegate_(NULL), |
| 49 test_animator_(NULL) { | 49 test_animator_(NULL) { |
| 50 } | 50 } |
| 51 virtual ~LockStateControllerTest() {} | 51 virtual ~LockStateControllerTest() {} |
| 52 | 52 |
| 53 virtual void SetUp() OVERRIDE { | 53 virtual void SetUp() override { |
| 54 AshTestBase::SetUp(); | 54 AshTestBase::SetUp(); |
| 55 | 55 |
| 56 scoped_ptr<LockStateControllerDelegate> lock_state_controller_delegate( | 56 scoped_ptr<LockStateControllerDelegate> lock_state_controller_delegate( |
| 57 lock_state_controller_delegate_ = new TestLockStateControllerDelegate); | 57 lock_state_controller_delegate_ = new TestLockStateControllerDelegate); |
| 58 test_animator_ = new TestSessionStateAnimator; | 58 test_animator_ = new TestSessionStateAnimator; |
| 59 | 59 |
| 60 lock_state_controller_ = Shell::GetInstance()->lock_state_controller(); | 60 lock_state_controller_ = Shell::GetInstance()->lock_state_controller(); |
| 61 lock_state_controller_->SetDelegate(lock_state_controller_delegate.Pass()); | 61 lock_state_controller_->SetDelegate(lock_state_controller_delegate.Pass()); |
| 62 lock_state_controller_->set_animator_for_test(test_animator_); | 62 lock_state_controller_->set_animator_for_test(test_animator_); |
| 63 | 63 |
| (...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1107 ReleasePowerButton(); | 1107 ReleasePowerButton(); |
| 1108 | 1108 |
| 1109 ExpectPreLockAnimationStarted(); | 1109 ExpectPreLockAnimationStarted(); |
| 1110 | 1110 |
| 1111 test_animator_->CompleteAllAnimations(true); | 1111 test_animator_->CompleteAllAnimations(true); |
| 1112 EXPECT_EQ(1, lock_state_controller_delegate_->num_lock_requests()); | 1112 EXPECT_EQ(1, lock_state_controller_delegate_->num_lock_requests()); |
| 1113 } | 1113 } |
| 1114 | 1114 |
| 1115 } // namespace test | 1115 } // namespace test |
| 1116 } // namespace ash | 1116 } // namespace ash |
| OLD | NEW |