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

Unified Diff: chrome/browser/chromeos/power/power_prefs_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/chromeos/power/power_prefs_unittest.cc
diff --git a/chrome/browser/chromeos/power/power_prefs_unittest.cc b/chrome/browser/chromeos/power/power_prefs_unittest.cc
index 00586c35bcfa15816be0d35471d7ee21fa2ec1bb..194e46986d465c3672feed5f72ef395f9d06ea49 100644
--- a/chrome/browser/chromeos/power/power_prefs_unittest.cc
+++ b/chrome/browser/chromeos/power/power_prefs_unittest.cc
@@ -241,10 +241,11 @@ TEST_F(PowerPrefsTest, UserSession) {
// Set up user profile.
const char test_user1[] = "test-user1@example.com";
- user_manager->AddUser(test_user1);
- user_manager->LoginUser(test_user1);
+ const AccountId test_account_id1(AccountId::FromUserEmail(test_user1));
+ user_manager->AddUser(test_account_id1);
+ user_manager->LoginUser(test_account_id1);
TestingProfile* user_profile =
- profile_manager_.CreateTestingProfile(test_user1);
+ profile_manager_.CreateTestingProfile(test_account_id1.GetUserEmail());
profile_manager_.SetLoggedIn(true);
@@ -260,10 +261,11 @@ TEST_F(PowerPrefsTest, UserSession) {
GetCurrentAllowScreenWakeLocks());
const char test_user2[] = "test-user2@example.com";
- user_manager->AddUser(test_user2);
- user_manager->LoginUser(test_user2);
+ const AccountId test_account_id2(AccountId::FromUserEmail(test_user2));
+ user_manager->AddUser(test_account_id2);
+ user_manager->LoginUser(test_account_id2);
TestingProfile* other_profile =
- profile_manager_.CreateTestingProfile(test_user2);
+ profile_manager_.CreateTestingProfile(test_account_id2.GetUserEmail());
// Inform power_prefs_ that an unrelated profile has been destroyed.
power_prefs_->Observe(chrome::NOTIFICATION_PROFILE_DESTROYED,
« no previous file with comments | « chrome/browser/chromeos/power/extension_event_observer_unittest.cc ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698