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

Side by Side Diff: chrome/browser/chromeos/preferences_browsertest.cc

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <sys/types.h> 5 #include <sys/types.h>
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 DISALLOW_COPY_AND_ASSIGN(PreferencesTest); 132 DISALLOW_COPY_AND_ASSIGN(PreferencesTest);
133 }; 133 };
134 134
135 IN_PROC_BROWSER_TEST_F(PreferencesTest, PRE_MultiProfiles) { 135 IN_PROC_BROWSER_TEST_F(PreferencesTest, PRE_MultiProfiles) {
136 RegisterUser(kTestUsers[0]); 136 RegisterUser(kTestUsers[0]);
137 RegisterUser(kTestUsers[1]); 137 RegisterUser(kTestUsers[1]);
138 chromeos::StartupUtils::MarkOobeCompleted(); 138 chromeos::StartupUtils::MarkOobeCompleted();
139 } 139 }
140 140
141 IN_PROC_BROWSER_TEST_F(PreferencesTest, MultiProfiles) { 141 IN_PROC_BROWSER_TEST_F(PreferencesTest, MultiProfiles) {
142 UserManager* user_manager = UserManager::Get(); 142 UserManager* user_manager = GetUserManager();
143 143
144 // Add first user and init its preferences. Check that corresponding 144 // Add first user and init its preferences. Check that corresponding
145 // settings has been changed. 145 // settings has been changed.
146 LoginUser(kTestUsers[0]); 146 LoginUser(kTestUsers[0]);
147 const User* user1 = user_manager->FindUser(kTestUsers[0]); 147 const User* user1 = user_manager->FindUser(kTestUsers[0]);
148 PrefService* prefs1 = 148 PrefService* prefs1 =
149 ProfileHelper::Get()->GetProfileByUser(user1)->GetPrefs(); 149 ProfileHelper::Get()->GetProfileByUser(user1)->GetPrefs();
150 SetPrefs(prefs1, false); 150 SetPrefs(prefs1, false);
151 content::RunAllPendingInMessageLoop(); 151 content::RunAllPendingInMessageLoop();
152 CheckSettingsCorrespondToPrefs(prefs1); 152 CheckSettingsCorrespondToPrefs(prefs1);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 !prefs1->GetBoolean(prefs::kTapToClickEnabled)); 199 !prefs1->GetBoolean(prefs::kTapToClickEnabled));
200 CheckLocalStateCorrespondsToPrefs(prefs1); 200 CheckLocalStateCorrespondsToPrefs(prefs1);
201 201
202 // Switch user back. 202 // Switch user back.
203 user_manager->SwitchActiveUser(kTestUsers[0]); 203 user_manager->SwitchActiveUser(kTestUsers[0]);
204 CheckSettingsCorrespondToPrefs(prefs1); 204 CheckSettingsCorrespondToPrefs(prefs1);
205 CheckLocalStateCorrespondsToPrefs(prefs1); 205 CheckLocalStateCorrespondsToPrefs(prefs1);
206 } 206 }
207 207
208 } // namespace chromeos 208 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/preferences.cc ('k') | chrome/browser/chromeos/profiles/avatar_menu_actions_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698