Index: chrome/browser/chromeos/preferences_chromeos_browsertest.cc |
diff --git a/chrome/browser/chromeos/preferences_chromeos_browsertest.cc b/chrome/browser/chromeos/preferences_chromeos_browsertest.cc |
index afbd9f5e2b418760e1cb1397cce02b986a761253..ef44d8875b2dfd1bb593c151f009db7f3641645e 100644 |
--- a/chrome/browser/chromeos/preferences_chromeos_browsertest.cc |
+++ b/chrome/browser/chromeos/preferences_chromeos_browsertest.cc |
@@ -41,11 +41,9 @@ |
class PreferencesTest : public LoginManagerTest { |
public: |
PreferencesTest() |
- : LoginManagerTest(true), input_settings_(NULL), keyboard_(NULL) { |
- for (size_t i = 0; i < arraysize(kTestUsers); ++i) { |
- test_users_.push_back(AccountId::FromUserEmail(kTestUsers[i])); |
- } |
- } |
+ : LoginManagerTest(true), |
+ input_settings_(NULL), |
+ keyboard_(NULL) {} |
void SetUpCommandLine(base::CommandLine* command_line) override { |
LoginManagerTest::SetUpCommandLine(command_line); |
@@ -60,7 +58,7 @@ |
static_cast<input_method::InputMethodManagerImpl*>( |
input_method::InputMethodManager::Get()) |
->SetImeKeyboardForTesting(keyboard_); |
- CrosSettings::Get()->SetString(kDeviceOwner, test_users_[0].GetUserEmail()); |
+ CrosSettings::Get()->SetString(kDeviceOwner, kTestUsers[0]); |
} |
// Sets set of preferences in given |prefs|. Value of prefernece depends of |
@@ -131,8 +129,6 @@ |
chrome::MultiUserWindowManagerChromeOS::ANIMATION_SPEED_DISABLED); |
} |
- std::vector<AccountId> test_users_; |
- |
private: |
system::FakeInputDeviceSettings* input_settings_; |
input_method::FakeImeKeyboard* keyboard_; |
@@ -141,8 +137,8 @@ |
}; |
IN_PROC_BROWSER_TEST_F(PreferencesTest, PRE_MultiProfiles) { |
- RegisterUser(test_users_[0].GetUserEmail()); |
- RegisterUser(test_users_[1].GetUserEmail()); |
+ RegisterUser(kTestUsers[0]); |
+ RegisterUser(kTestUsers[1]); |
chromeos::StartupUtils::MarkOobeCompleted(); |
} |
@@ -151,8 +147,8 @@ |
// Add first user and init its preferences. Check that corresponding |
// settings has been changed. |
- LoginUser(test_users_[0].GetUserEmail()); |
- const user_manager::User* user1 = user_manager->FindUser(test_users_[0]); |
+ LoginUser(kTestUsers[0]); |
+ const user_manager::User* user1 = user_manager->FindUser(kTestUsers[0]); |
PrefService* prefs1 = |
ProfileHelper::Get()->GetProfileByUserUnsafe(user1)->GetPrefs(); |
SetPrefs(prefs1, false); |
@@ -163,9 +159,9 @@ |
UserAddingScreen::Get()->Start(); |
content::RunAllPendingInMessageLoop(); |
DisableAnimations(); |
- AddUser(test_users_[1].GetUserEmail()); |
+ AddUser(kTestUsers[1]); |
content::RunAllPendingInMessageLoop(); |
- const user_manager::User* user2 = user_manager->FindUser(test_users_[1]); |
+ const user_manager::User* user2 = user_manager->FindUser(kTestUsers[1]); |
EXPECT_TRUE(user2->is_active()); |
PrefService* prefs2 = |
ProfileHelper::Get()->GetProfileByUserUnsafe(user2)->GetPrefs(); |
@@ -198,7 +194,7 @@ |
// Check that changing non-owner prefs doesn't change corresponding local |
// state prefs and vice versa. |
- EXPECT_EQ(user_manager->GetOwnerAccountId(), test_users_[0]); |
+ EXPECT_EQ(user_manager->GetOwnerEmail(), kTestUsers[0]); |
CheckLocalStateCorrespondsToPrefs(prefs1); |
prefs2->SetBoolean(prefs::kTapToClickEnabled, |
!prefs1->GetBoolean(prefs::kTapToClickEnabled)); |
@@ -208,7 +204,7 @@ |
CheckLocalStateCorrespondsToPrefs(prefs1); |
// Switch user back. |
- user_manager->SwitchActiveUser(test_users_[0]); |
+ user_manager->SwitchActiveUser(kTestUsers[0]); |
CheckSettingsCorrespondToPrefs(prefs1); |
CheckLocalStateCorrespondsToPrefs(prefs1); |
} |