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

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

Issue 2118593002: mash: Migrate ShellDelegate ownership and access to WmShell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 4 years, 5 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
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 <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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698