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

Unified Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.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/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc
index 47827b7423952cf358bf9644efaa38744237d115..6d28e8e86befc46a0b89969aa8a04ace3b5cd44c 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc
@@ -79,42 +79,47 @@ class DisplayNotificationsTest : public InProcessBrowserTest {
class SystemTrayDelegateChromeOSTest : public LoginManagerTest {
protected:
SystemTrayDelegateChromeOSTest()
- : LoginManagerTest(false /* should_launch_browser */) {}
+ : LoginManagerTest(false /* should_launch_browser */),
+ account_id1_(AccountId::FromUserEmail(kUser1)),
+ account_id2_(AccountId::FromUserEmail(kUser2)) {}
~SystemTrayDelegateChromeOSTest() override {}
- void SetupUserProfile(const std::string& user_name, bool use_24_hour_clock) {
+ void SetupUserProfile(const AccountId& account_id, bool use_24_hour_clock) {
const user_manager::User* user =
- user_manager::UserManager::Get()->FindUser(user_name);
+ user_manager::UserManager::Get()->FindUser(account_id);
Profile* profile = ProfileHelper::Get()->GetProfileByUser(user);
profile->GetPrefs()->SetBoolean(prefs::kUse24HourClock, use_24_hour_clock);
}
+ const AccountId account_id1_;
+ const AccountId account_id2_;
+
private:
DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOSTest);
};
IN_PROC_BROWSER_TEST_F(SystemTrayDelegateChromeOSTest,
PRE_TestMultiProfile24HourClock) {
- RegisterUser(kUser1);
- RegisterUser(kUser2);
+ RegisterUser(account_id1_.GetUserEmail());
+ RegisterUser(account_id2_.GetUserEmail());
StartupUtils::MarkOobeCompleted();
}
// Test that clock type is taken from user profile for current active user.
IN_PROC_BROWSER_TEST_F(SystemTrayDelegateChromeOSTest,
TestMultiProfile24HourClock) {
- LoginUser(kUser1);
- SetupUserProfile(kUser1, true /* Use_24_hour_clock. */);
+ LoginUser(account_id1_.GetUserEmail());
+ SetupUserProfile(account_id1_, true /* Use_24_hour_clock. */);
CreateDefaultView();
EXPECT_EQ(base::k24HourClock, GetHourType());
UserAddingScreen::Get()->Start();
content::RunAllPendingInMessageLoop();
- AddUser(kUser2);
- SetupUserProfile(kUser2, false /* Use_24_hour_clock. */);
+ AddUser(account_id2_.GetUserEmail());
+ SetupUserProfile(account_id2_, false /* Use_24_hour_clock. */);
CreateDefaultView();
EXPECT_EQ(base::k12HourClock, GetHourType());
- user_manager::UserManager::Get()->SwitchActiveUser(kUser1);
+ user_manager::UserManager::Get()->SwitchActiveUser(account_id1_);
CreateDefaultView();
EXPECT_EQ(base::k24HourClock, GetHourType());
}
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.cc ('k') | chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698