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

Side by Side Diff: chrome/browser/net/nss_context_chromeos_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/net/nss_context.h" 5 #include "chrome/browser/net/nss_context.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "chrome/browser/chromeos/login/login_manager_test.h" 9 #include "chrome/browser/chromeos/login/login_manager_test.h"
10 #include "chrome/browser/chromeos/login/startup_utils.h" 10 #include "chrome/browser/chromeos/login/startup_utils.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 }; 124 };
125 125
126 IN_PROC_BROWSER_TEST_F(NSSContextChromeOSBrowserTest, PRE_TwoUsers) { 126 IN_PROC_BROWSER_TEST_F(NSSContextChromeOSBrowserTest, PRE_TwoUsers) {
127 // Initialization for ChromeOS multi-profile test infrastructure. 127 // Initialization for ChromeOS multi-profile test infrastructure.
128 RegisterUser(kTestUser1); 128 RegisterUser(kTestUser1);
129 RegisterUser(kTestUser2); 129 RegisterUser(kTestUser2);
130 chromeos::StartupUtils::MarkOobeCompleted(); 130 chromeos::StartupUtils::MarkOobeCompleted();
131 } 131 }
132 132
133 IN_PROC_BROWSER_TEST_F(NSSContextChromeOSBrowserTest, TwoUsers) { 133 IN_PROC_BROWSER_TEST_F(NSSContextChromeOSBrowserTest, TwoUsers) {
134 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); 134 chromeos::UserManager* user_manager = chromeos::GetUserManager();
135 135
136 // Log in first user and get their DB. 136 // Log in first user and get their DB.
137 LoginUser(kTestUser1); 137 LoginUser(kTestUser1);
138 Profile* profile1 = chromeos::ProfileHelper::Get()->GetProfileByUser( 138 Profile* profile1 = chromeos::ProfileHelper::Get()->GetProfileByUser(
139 user_manager->FindUser(kTestUser1)); 139 user_manager->FindUser(kTestUser1));
140 ASSERT_TRUE(profile1); 140 ASSERT_TRUE(profile1);
141 141
142 DBTester tester1(profile1); 142 DBTester tester1(profile1);
143 ASSERT_TRUE(tester1.DoGetDBTests()); 143 ASSERT_TRUE(tester1.DoGetDBTests());
144 144
145 // Log in second user and get their DB. 145 // Log in second user and get their DB.
146 chromeos::UserAddingScreen::Get()->Start(); 146 chromeos::UserAddingScreen::Get()->Start();
147 base::RunLoop().RunUntilIdle(); 147 base::RunLoop().RunUntilIdle();
148 AddUser(kTestUser2); 148 AddUser(kTestUser2);
149 149
150 Profile* profile2 = chromeos::ProfileHelper::Get()->GetProfileByUser( 150 Profile* profile2 = chromeos::ProfileHelper::Get()->GetProfileByUser(
151 user_manager->FindUser(kTestUser2)); 151 user_manager->FindUser(kTestUser2));
152 ASSERT_TRUE(profile2); 152 ASSERT_TRUE(profile2);
153 153
154 DBTester tester2(profile2); 154 DBTester tester2(profile2);
155 ASSERT_TRUE(tester2.DoGetDBTests()); 155 ASSERT_TRUE(tester2.DoGetDBTests());
156 156
157 // Get both DBs again to check that the same object is returned. 157 // Get both DBs again to check that the same object is returned.
158 tester1.DoGetDBAgainTests(); 158 tester1.DoGetDBAgainTests();
159 tester2.DoGetDBAgainTests(); 159 tester2.DoGetDBAgainTests();
160 160
161 // Check that each user has a separate DB and NSS slots. 161 // Check that each user has a separate DB and NSS slots.
162 tester1.DoNotEqualsTests(&tester2); 162 tester1.DoNotEqualsTests(&tester2);
163 } 163 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698