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

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

Issue 2741273002: chromeos: Promotes more from WmShell to Shell (Closed)
Patch Set: cleanup Created 3 years, 9 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 test_animator_ = new TestSessionStateAnimator; 81 test_animator_ = new TestSessionStateAnimator;
82 82
83 lock_state_controller_ = Shell::GetInstance()->lock_state_controller(); 83 lock_state_controller_ = Shell::GetInstance()->lock_state_controller();
84 lock_state_controller_->set_animator_for_test(test_animator_); 84 lock_state_controller_->set_animator_for_test(test_animator_);
85 85
86 test_api_.reset(new LockStateControllerTestApi(lock_state_controller_)); 86 test_api_.reset(new LockStateControllerTestApi(lock_state_controller_));
87 test_api_->set_shutdown_controller(&test_shutdown_controller_); 87 test_api_->set_shutdown_controller(&test_shutdown_controller_);
88 88
89 power_button_controller_ = Shell::GetInstance()->power_button_controller(); 89 power_button_controller_ = Shell::GetInstance()->power_button_controller();
90 90
91 shell_delegate_ = 91 shell_delegate_ = static_cast<TestShellDelegate*>(Shell::Get()->delegate());
92 static_cast<TestShellDelegate*>(WmShell::Get()->delegate());
93 } 92 }
94 93
95 void TearDown() override { 94 void TearDown() override {
96 const bool is_mash = WmShell::Get()->IsRunningInMash(); 95 const bool is_mash = WmShell::Get()->IsRunningInMash();
97 AshTestBase::TearDown(); 96 AshTestBase::TearDown();
98 // Mash shuts down DBus during normal destruction. 97 // Mash shuts down DBus during normal destruction.
99 if (!is_mash) 98 if (!is_mash)
100 chromeos::DBusThreadManager::Shutdown(); 99 chromeos::DBusThreadManager::Shutdown();
101 } 100 }
102 101
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 ASSERT_EQ(0, delegate->handle_take_screenshot_count()); 1073 ASSERT_EQ(0, delegate->handle_take_screenshot_count());
1075 PressVolumeDown(); 1074 PressVolumeDown();
1076 PressPowerButton(); 1075 PressPowerButton();
1077 ReleasePowerButton(); 1076 ReleasePowerButton();
1078 ReleaseVolumeDown(); 1077 ReleaseVolumeDown();
1079 EXPECT_EQ(1, delegate->handle_take_screenshot_count()); 1078 EXPECT_EQ(1, delegate->handle_take_screenshot_count());
1080 } 1079 }
1081 1080
1082 } // namespace test 1081 } // namespace test
1083 } // namespace ash 1082 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698