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

Side by Side Diff: chrome/browser/chromeos/shutdown_policy_browsertest.cc

Issue 2041233005: Moves ash::user::LoginStatus to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <memory> 5 #include <memory>
6 #include <string> 6 #include <string>
7 7
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/strings/grit/ash_strings.h" 9 #include "ash/strings/grit/ash_strings.h"
10 #include "ash/system/date/date_default_view.h" 10 #include "ash/system/date/date_default_view.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 protected: 144 protected:
145 ShutdownPolicyInSessionTest() {} 145 ShutdownPolicyInSessionTest() {}
146 ~ShutdownPolicyInSessionTest() override {} 146 ~ShutdownPolicyInSessionTest() override {}
147 147
148 void SetUpOnMainThread() override { 148 void SetUpOnMainThread() override {
149 ShutdownPolicyBaseTest::SetUpOnMainThread(); 149 ShutdownPolicyBaseTest::SetUpOnMainThread();
150 ash::TrayDate* tray_date = ash::Shell::GetInstance() 150 ash::TrayDate* tray_date = ash::Shell::GetInstance()
151 ->GetPrimarySystemTray() 151 ->GetPrimarySystemTray()
152 ->GetTrayDateForTesting(); 152 ->GetTrayDateForTesting();
153 ASSERT_TRUE(tray_date); 153 ASSERT_TRUE(tray_date);
154 date_default_view_.reset( 154 date_default_view_.reset(static_cast<ash::DateDefaultView*>(
155 static_cast<ash::DateDefaultView*>( 155 tray_date->CreateDefaultViewForTesting(ash::LoginStatus::USER)));
156 tray_date->CreateDefaultViewForTesting(ash::user::LOGGED_IN_USER)));
157 ASSERT_TRUE(date_default_view_); 156 ASSERT_TRUE(date_default_view_);
158 } 157 }
159 158
160 void TearDownOnMainThread() override { 159 void TearDownOnMainThread() override {
161 date_default_view_.reset(); 160 date_default_view_.reset();
162 ShutdownPolicyBaseTest::TearDownOnMainThread(); 161 ShutdownPolicyBaseTest::TearDownOnMainThread();
163 } 162 }
164 163
165 // Get the shutdown and reboot button view from the date default view. 164 // Get the shutdown and reboot button view from the date default view.
166 const ash::TrayPopupHeaderButton* GetShutdownButton() { 165 const ash::TrayPopupHeaderButton* GetShutdownButton() {
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 PrepareAndRunScript("restart-header-bar-item", false); 327 PrepareAndRunScript("restart-header-bar-item", false);
329 PrepareAndRunScript("shutdown-header-bar-item", true); 328 PrepareAndRunScript("shutdown-header-bar-item", true);
330 329
331 UpdateRebootOnShutdownPolicy(false); 330 UpdateRebootOnShutdownPolicy(false);
332 RefreshDevicePolicy(); 331 RefreshDevicePolicy();
333 PrepareAndRunScript("restart-header-bar-item", true); 332 PrepareAndRunScript("restart-header-bar-item", true);
334 PrepareAndRunScript("shutdown-header-bar-item", false); 333 PrepareAndRunScript("shutdown-header-bar-item", false);
335 } 334 }
336 335
337 } // namespace chromeos 336 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698