| 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 6d28e8e86befc46a0b89969aa8a04ace3b5cd44c..47827b7423952cf358bf9644efaa38744237d115 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,21 +79,16 @@
|
| class SystemTrayDelegateChromeOSTest : public LoginManagerTest {
|
| protected:
|
| SystemTrayDelegateChromeOSTest()
|
| - : LoginManagerTest(false /* should_launch_browser */),
|
| - account_id1_(AccountId::FromUserEmail(kUser1)),
|
| - account_id2_(AccountId::FromUserEmail(kUser2)) {}
|
| + : LoginManagerTest(false /* should_launch_browser */) {}
|
|
|
| ~SystemTrayDelegateChromeOSTest() override {}
|
|
|
| - void SetupUserProfile(const AccountId& account_id, bool use_24_hour_clock) {
|
| + void SetupUserProfile(const std::string& user_name, bool use_24_hour_clock) {
|
| const user_manager::User* user =
|
| - user_manager::UserManager::Get()->FindUser(account_id);
|
| + user_manager::UserManager::Get()->FindUser(user_name);
|
| 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);
|
| @@ -101,25 +96,25 @@
|
|
|
| IN_PROC_BROWSER_TEST_F(SystemTrayDelegateChromeOSTest,
|
| PRE_TestMultiProfile24HourClock) {
|
| - RegisterUser(account_id1_.GetUserEmail());
|
| - RegisterUser(account_id2_.GetUserEmail());
|
| + RegisterUser(kUser1);
|
| + RegisterUser(kUser2);
|
| StartupUtils::MarkOobeCompleted();
|
| }
|
|
|
| // Test that clock type is taken from user profile for current active user.
|
| IN_PROC_BROWSER_TEST_F(SystemTrayDelegateChromeOSTest,
|
| TestMultiProfile24HourClock) {
|
| - LoginUser(account_id1_.GetUserEmail());
|
| - SetupUserProfile(account_id1_, true /* Use_24_hour_clock. */);
|
| + LoginUser(kUser1);
|
| + SetupUserProfile(kUser1, true /* Use_24_hour_clock. */);
|
| CreateDefaultView();
|
| EXPECT_EQ(base::k24HourClock, GetHourType());
|
| UserAddingScreen::Get()->Start();
|
| content::RunAllPendingInMessageLoop();
|
| - AddUser(account_id2_.GetUserEmail());
|
| - SetupUserProfile(account_id2_, false /* Use_24_hour_clock. */);
|
| + AddUser(kUser2);
|
| + SetupUserProfile(kUser2, false /* Use_24_hour_clock. */);
|
| CreateDefaultView();
|
| EXPECT_EQ(base::k12HourClock, GetHourType());
|
| - user_manager::UserManager::Get()->SwitchActiveUser(account_id1_);
|
| + user_manager::UserManager::Get()->SwitchActiveUser(kUser1);
|
| CreateDefaultView();
|
| EXPECT_EQ(base::k24HourClock, GetHourType());
|
| }
|
|
|