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

Unified Diff: chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_browsertest.cc

Issue 2177663002: mash: Move ownership of ShelfDelegate to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix WallpaperManagerBrowserTest 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_browsertest.cc
diff --git a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_browsertest.cc b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_browsertest.cc
index bd3d1d26e8184eb5ec1826e4dea14af6d77aca24..f3cbcf4834eb3a6e1bcfa59799f5f3f855764939 100644
--- a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_browsertest.cc
+++ b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_browsertest.cc
@@ -114,14 +114,15 @@ class WallpaperManagerBrowserTest : public InProcessBrowserTest {
return wallpaper_path;
}
- // Logs in |account_id|.
+ // Simulates logging in |account_id|.
void LogIn(const AccountId& account_id, const std::string& user_id_hash) {
user_manager::UserManager::Get()->UserLoggedIn(account_id, user_id_hash,
false);
+ ash::Shell::GetInstance()->CreateShelf();
James Cook 2016/07/22 23:37:00 I went with manually creating the shelf, rather th
msw 2016/07/23 00:02:37 Would WmShell::SetShelfDelegateForTesting suffice
James Cook 2016/07/23 00:38:03 Done.
WaitAsyncWallpaperLoadStarted();
}
- // Logs in |account_id| and sets it as child account.
+ // Simulates logging in |account_id| and sets it as child account.
void LogInAsChild(const AccountId& account_id,
const std::string& user_id_hash) {
user_manager::UserManager::Get()->UserLoggedIn(account_id, user_id_hash,
@@ -130,6 +131,7 @@ class WallpaperManagerBrowserTest : public InProcessBrowserTest {
user_manager::UserManager::Get()->FindUserAndModify(account_id);
user_manager::UserManager::Get()->ChangeUserChildStatus(
user, true /* is_child */);
+ ash::Shell::GetInstance()->CreateShelf();
}
int LoadedWallpapers() {

Powered by Google App Engine
This is Rietveld 408576698