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

Side by Side Diff: chrome/browser/chromeos/login/login_manager_test.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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
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/chromeos/login/login_manager_test.h" 5 #include "chrome/browser/chromeos/login/login_manager_test.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 UserSessionManager::GetInstance()); 149 UserSessionManager::GetInstance());
150 session_manager_test_api.SetShouldLaunchBrowserInTests( 150 session_manager_test_api.SetShouldLaunchBrowserInTests(
151 should_launch_browser_); 151 should_launch_browser_);
152 session_manager_test_api.SetShouldObtainTokenHandleInTests(false); 152 session_manager_test_api.SetShouldObtainTokenHandleInTests(false);
153 153
154 MixinBasedBrowserTest::SetUpOnMainThread(); 154 MixinBasedBrowserTest::SetUpOnMainThread();
155 } 155 }
156 156
157 void LoginManagerTest::RegisterUser(const std::string& user_id) { 157 void LoginManagerTest::RegisterUser(const std::string& user_id) {
158 ListPrefUpdate users_pref(g_browser_process->local_state(), "LoggedInUsers"); 158 ListPrefUpdate users_pref(g_browser_process->local_state(), "LoggedInUsers");
159 users_pref->AppendIfNotPresent(base::MakeUnique<base::StringValue>(user_id)); 159 users_pref->AppendIfNotPresent(base::MakeUnique<base::Value>(user_id));
160 } 160 }
161 161
162 void LoginManagerTest::SetExpectedCredentials(const UserContext& user_context) { 162 void LoginManagerTest::SetExpectedCredentials(const UserContext& user_context) {
163 test::UserSessionManagerTestApi session_manager_test_api( 163 test::UserSessionManagerTestApi session_manager_test_api(
164 UserSessionManager::GetInstance()); 164 UserSessionManager::GetInstance());
165 session_manager_test_api.InjectStubUserContext(user_context); 165 session_manager_test_api.InjectStubUserContext(user_context);
166 } 166 }
167 167
168 bool LoginManagerTest::TryToLogin(const UserContext& user_context) { 168 bool LoginManagerTest::TryToLogin(const UserContext& user_context) {
169 if (!AddUserToSession(user_context)) 169 if (!AddUserToSession(user_context))
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 EXPECT_TRUE(host != NULL); 223 EXPECT_TRUE(host != NULL);
224 224
225 content::WebContents* web_contents = 225 content::WebContents* web_contents =
226 host->GetWebUILoginView()->GetWebContents(); 226 host->GetWebUILoginView()->GetWebContents();
227 EXPECT_TRUE(web_contents != NULL); 227 EXPECT_TRUE(web_contents != NULL);
228 set_web_contents(web_contents); 228 set_web_contents(web_contents);
229 js_checker_.set_web_contents(web_contents); 229 js_checker_.set_web_contents(web_contents);
230 } 230 }
231 231
232 } // namespace chromeos 232 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/kiosk_browsertest.cc ('k') | chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698