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

Unified Diff: chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos_unittest.cc

Issue 2111443002: mash: Migrate SessionStateDelegate access to WmShell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos_unittest.cc
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos_unittest.cc b/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos_unittest.cc
index 2015efea9c7914dba6dab89f0466f4d7188bb757..59abfaf424c816b96b97f0c9bbe7f897e3ee09ef 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos_unittest.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos_unittest.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/common/session/session_state_delegate.h"
#include "ash/common/system/system_notifier.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
+#include "ash/test/ash_test_helper.h"
#include "ash/test/test_session_state_delegate.h"
#include "ash/test/test_shell_delegate.h"
#include "base/macros.h"
@@ -47,10 +47,7 @@ class MultiUserNotificationBlockerChromeOSTest
shell_delegate->set_multi_profiles_enabled(true);
chrome::MultiUserWindowManager::CreateInstance();
- ash::test::TestSessionStateDelegate* session_state_delegate =
- static_cast<ash::test::TestSessionStateDelegate*>(
- ash::Shell::GetInstance()->session_state_delegate());
- session_state_delegate->AddUser(
+ ash::test::AshTestHelper::GetTestSessionStateDelegate()->AddUser(
AccountId::FromUserEmail("test2@example.com"));
chromeos::WallpaperManager::Initialize();
@@ -82,8 +79,7 @@ class MultiUserNotificationBlockerChromeOSTest
}
const std::string GetDefaultUserId() {
- return ash::Shell::GetInstance()
- ->session_state_delegate()
+ return ash::test::AshTestHelper::GetTestSessionStateDelegate()
->GetUserInfo(0)
->GetAccountId()
.GetUserEmail();
@@ -99,8 +95,8 @@ class MultiUserNotificationBlockerChromeOSTest
void SwitchActiveUser(const std::string& name) {
const AccountId account_id(AccountId::FromUserEmail(name));
- ash::Shell::GetInstance()->session_state_delegate()->SwitchActiveUser(
- account_id);
+ ash::test::AshTestHelper::GetTestSessionStateDelegate()
+ ->SwitchActiveUser(account_id);
if (chrome::MultiUserWindowManager::GetMultiProfileMode() ==
chrome::MultiUserWindowManager::MULTI_PROFILE_MODE_SEPARATED) {
static_cast<chrome::MultiUserWindowManagerChromeOS*>(

Powered by Google App Engine
This is Rietveld 408576698