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

Unified Diff: chrome/browser/profiles/profile_manager_unittest.cc

Issue 1010443003: Make the lifetime of wallpaper manager more clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the failed unittests. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_manager_unittest.cc
diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc
index 6233bc0f7b1802e70b7efd200875ceee0ba56c60..76a2126745abd2bea3b17be1b2ea9aab44e08afa 100644
--- a/chrome/browser/profiles/profile_manager_unittest.cc
+++ b/chrome/browser/profiles/profile_manager_unittest.cc
@@ -47,6 +47,7 @@
#include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h"
#include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h"
#include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h"
+#include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/browser/chromeos/settings/device_settings_service.h"
@@ -112,12 +113,16 @@ class ProfileManagerTest : public testing::Test {
#if defined(OS_CHROMEOS)
base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
cl->AppendSwitch(switches::kTestType);
+ chromeos::WallpaperManager::Initialize();
#endif
}
void TearDown() override {
TestingBrowserProcess::GetGlobal()->SetProfileManager(NULL);
base::RunLoop().RunUntilIdle();
+#if defined(OS_CHROMEOS)
+ chromeos::WallpaperManager::Shutdown();
+#endif
}
// Helper function to create a profile with |name| for a profile |manager|.
@@ -424,6 +429,7 @@ class ProfileManagerGuestTest : public ProfileManagerTest {
cl->AppendSwitch(chromeos::switches::kGuestSession);
cl->AppendSwitch(::switches::kIncognito);
+ chromeos::WallpaperManager::Initialize();
RegisterUser(chromeos::login::kGuestUserName);
#endif
}

Powered by Google App Engine
This is Rietveld 408576698