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

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

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Fix Win GN build. Created 5 years, 1 month 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 89a2af4f9963f5a0202a8d5a93069c358c761675..77e352dfb5f4bb31ed3b04ef55da0129c4143259 100644
--- a/chrome/browser/profiles/profile_manager_unittest.cc
+++ b/chrome/browser/profiles/profile_manager_unittest.cc
@@ -161,7 +161,7 @@ class ProfileManagerTest : public testing::Test {
const std::string user_id_hash =
profile_helper->GetUserIdHashByUserIdForTesting(user_id);
user_manager::UserManager::Get()->UserLoggedIn(
- user_id, user_id_hash, false);
+ AccountId::FromUserEmail(user_id), user_id_hash, false);
g_browser_process->profile_manager()->GetProfile(
profile_helper->GetProfilePathByUserIdHash(user_id_hash));
}
@@ -227,13 +227,15 @@ TEST_F(ProfileManagerTest, LoggedInProfileDir) {
profile_manager->GetInitialProfileDir().value());
const char kTestUserName[] = "test-user@example.com";
+ const AccountId test_account_id(AccountId::FromUserEmail(kTestUserName));
chromeos::FakeChromeUserManager* user_manager =
new chromeos::FakeChromeUserManager();
chromeos::ScopedUserManagerEnabler enabler(user_manager);
- const user_manager::User* active_user = user_manager->AddUser(kTestUserName);
- user_manager->LoginUser(kTestUserName);
- user_manager->SwitchActiveUser(kTestUserName);
+ const user_manager::User* active_user =
+ user_manager->AddUser(test_account_id);
+ user_manager->LoginUser(test_account_id);
+ user_manager->SwitchActiveUser(test_account_id);
profile_manager->Observe(
chrome::NOTIFICATION_LOGIN_USER_CHANGED,
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698