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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc

Issue 442043002: ProfileManager doesn't depend on "--login-profile" switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More tests fixed. Created 6 years, 4 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/launcher/chrome_launcher_controller_unittest.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
index 65946a326c83b1775a1c762e51e0b86bdfd7cd5c..24fa04a6690f903a019ca98b98e0900e0e222f8f 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
@@ -79,9 +79,6 @@ const char* gmail_url = "https://mail.google.com/mail/u";
const char* kGmailLaunchURL = "https://mail.google.com/mail/ca";
#if defined(OS_CHROMEOS)
-// As defined in /chromeos/dbus/cryptohome_client.cc.
-const char kUserIdHashSuffix[] = "-hash";
-
// An extension prefix.
const char kCrxAppPrefix[] = "_crx_";
#endif
@@ -826,22 +823,14 @@ class MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest
session_delegate()->AddUser(email_string);
GetFakeUserManager()->AddUser(email_string);
- GetFakeUserManager()->UserLoggedIn(
- email_string,
- email_string + kUserIdHashSuffix,
- false);
-
- std::string profile_name =
- chrome::kProfileDirPrefix + email_string + kUserIdHashSuffix;
- TestingProfile* profile = profile_manager()->CreateTestingProfile(
- profile_name,
- scoped_ptr<PrefServiceSyncable>(),
- ASCIIToUTF16(email_string), 0, std::string(),
- TestingProfile::TestingFactories());
- profile->set_profile_name(email_string);
+ GetFakeUserManager()->LoginUser(email_string);
+
+ TestingProfile* profile =
+ profile_manager()->CreateTestingProfile(email_string);
EXPECT_TRUE(profile);
+
// Remember the profile name so that we can destroy it upon destruction.
- created_profiles_[profile] = profile_name;
+ created_profiles_[profile] = email_string;
if (chrome::MultiUserWindowManager::GetInstance())
chrome::MultiUserWindowManager::GetInstance()->AddUser(profile);
if (launcher_controller_)

Powered by Google App Engine
This is Rietveld 408576698