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

Unified Diff: chrome/browser/chromeos/preferences_browsertest.cc

Issue 246253009: Multiprofile: switch to newly added user to the session (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed PreferencesTest.MultiProfiles Created 6 years, 8 months 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/preferences_browsertest.cc
diff --git a/chrome/browser/chromeos/preferences_browsertest.cc b/chrome/browser/chromeos/preferences_browsertest.cc
index fe3fb00e4e557f7c9fdd54bb3b43fb9495c441d0..b567c66b66f65da22a61a6066ea886368a6991c6 100644
--- a/chrome/browser/chromeos/preferences_browsertest.cc
+++ b/chrome/browser/chromeos/preferences_browsertest.cc
@@ -153,19 +153,15 @@ IN_PROC_BROWSER_TEST_F(PreferencesTest, MultiProfiles) {
// Add second user and init its prefs with different values.
UserAddingScreen::Get()->Start();
content::RunAllPendingInMessageLoop();
+ DisableAnimations();
AddUser(kTestUsers[1]);
- EXPECT_TRUE(user1->is_active());
+ content::RunAllPendingInMessageLoop();
const User* user2 = user_manager->FindUser(kTestUsers[1]);
+ EXPECT_TRUE(user2->is_active());
PrefService* prefs2 = user_manager->GetProfileByUser(user2)->GetPrefs();
SetPrefs(prefs2, true);
- // First user is still active, so settings was not changed.
- EXPECT_TRUE(user1->is_active());
- CheckSettingsCorrespondToPrefs(prefs1);
-
- // Switch user and check that settings was changed accordingly.
- DisableAnimations();
- user_manager->SwitchActiveUser(kTestUsers[1]);
+ // Check that settings was changed accordingly.
Nikita (slow) 2014/04/25 15:00:08 nit: were changed.
Dmitry Polukhin 2014/04/25 16:07:20 Done.
EXPECT_TRUE(user2->is_active());
CheckSettingsCorrespondToPrefs(prefs2);

Powered by Google App Engine
This is Rietveld 408576698