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

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

Issue 257393003: Revert of Multiprofile: switch to newly added user to the session (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « chrome/browser/chromeos/login/user_manager_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/preferences_browsertest.cc
diff --git a/chrome/browser/chromeos/preferences_browsertest.cc b/chrome/browser/chromeos/preferences_browsertest.cc
index b8a52671f4c3a0d1932e4410cb2b646452b4cd85..fe3fb00e4e557f7c9fdd54bb3b43fb9495c441d0 100644
--- a/chrome/browser/chromeos/preferences_browsertest.cc
+++ b/chrome/browser/chromeos/preferences_browsertest.cc
@@ -153,15 +153,19 @@
// Add second user and init its prefs with different values.
UserAddingScreen::Get()->Start();
content::RunAllPendingInMessageLoop();
- DisableAnimations();
AddUser(kTestUsers[1]);
- content::RunAllPendingInMessageLoop();
+ EXPECT_TRUE(user1->is_active());
const User* user2 = user_manager->FindUser(kTestUsers[1]);
- EXPECT_TRUE(user2->is_active());
PrefService* prefs2 = user_manager->GetProfileByUser(user2)->GetPrefs();
SetPrefs(prefs2, true);
- // Check that settings were changed accordingly.
+ // 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]);
EXPECT_TRUE(user2->is_active());
CheckSettingsCorrespondToPrefs(prefs2);
« no previous file with comments | « chrome/browser/chromeos/login/user_manager_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698