Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: ash/wm/lock_state_controller_unittest.cc

Issue 1547223002: Convert Pass()→std::move() in //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/wm/lock_state_controller.cc ('k') | ash/wm/lock_window_state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <utility>
8
7 #include "ash/session/session_state_delegate.h" 9 #include "ash/session/session_state_delegate.h"
8 #include "ash/shell.h" 10 #include "ash/shell.h"
9 #include "ash/test/ash_test_base.h" 11 #include "ash/test/ash_test_base.h"
10 #include "ash/test/test_lock_state_controller_delegate.h" 12 #include "ash/test/test_lock_state_controller_delegate.h"
11 #include "ash/test/test_screenshot_delegate.h" 13 #include "ash/test/test_screenshot_delegate.h"
12 #include "ash/test/test_session_state_animator.h" 14 #include "ash/test/test_session_state_animator.h"
13 #include "ash/test/test_shell_delegate.h" 15 #include "ash/test/test_shell_delegate.h"
14 #include "ash/wm/maximize_mode/maximize_mode_controller.h" 16 #include "ash/wm/maximize_mode/maximize_mode_controller.h"
15 #include "ash/wm/power_button_controller.h" 17 #include "ash/wm/power_button_controller.h"
16 #include "ash/wm/session_state_animator.h" 18 #include "ash/wm/session_state_animator.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 ~LockStateControllerTest() override {} 53 ~LockStateControllerTest() override {}
52 54
53 void SetUp() override { 55 void SetUp() override {
54 AshTestBase::SetUp(); 56 AshTestBase::SetUp();
55 57
56 scoped_ptr<LockStateControllerDelegate> lock_state_controller_delegate( 58 scoped_ptr<LockStateControllerDelegate> lock_state_controller_delegate(
57 lock_state_controller_delegate_ = new TestLockStateControllerDelegate); 59 lock_state_controller_delegate_ = new TestLockStateControllerDelegate);
58 test_animator_ = new TestSessionStateAnimator; 60 test_animator_ = new TestSessionStateAnimator;
59 61
60 lock_state_controller_ = Shell::GetInstance()->lock_state_controller(); 62 lock_state_controller_ = Shell::GetInstance()->lock_state_controller();
61 lock_state_controller_->SetDelegate(lock_state_controller_delegate.Pass()); 63 lock_state_controller_->SetDelegate(
64 std::move(lock_state_controller_delegate));
62 lock_state_controller_->set_animator_for_test(test_animator_); 65 lock_state_controller_->set_animator_for_test(test_animator_);
63 66
64 test_api_.reset(new LockStateController::TestApi(lock_state_controller_)); 67 test_api_.reset(new LockStateController::TestApi(lock_state_controller_));
65 68
66 power_button_controller_ = Shell::GetInstance()->power_button_controller(); 69 power_button_controller_ = Shell::GetInstance()->power_button_controller();
67 session_state_delegate_ = Shell::GetInstance()->session_state_delegate(); 70 session_state_delegate_ = Shell::GetInstance()->session_state_delegate();
68 71
69 shell_delegate_ = reinterpret_cast<TestShellDelegate*>( 72 shell_delegate_ = reinterpret_cast<TestShellDelegate*>(
70 ash::Shell::GetInstance()->delegate()); 73 ash::Shell::GetInstance()->delegate());
71 } 74 }
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 ReleasePowerButton(); 1103 ReleasePowerButton();
1101 1104
1102 ExpectPreLockAnimationStarted(); 1105 ExpectPreLockAnimationStarted();
1103 1106
1104 test_animator_->CompleteAllAnimations(true); 1107 test_animator_->CompleteAllAnimations(true);
1105 EXPECT_EQ(1, lock_state_controller_delegate_->num_lock_requests()); 1108 EXPECT_EQ(1, lock_state_controller_delegate_->num_lock_requests());
1106 } 1109 }
1107 1110
1108 } // namespace test 1111 } // namespace test
1109 } // namespace ash 1112 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/lock_state_controller.cc ('k') | ash/wm/lock_window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698