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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_helper_unittest.cc

Issue 296703011: Change refs from ChromeSigninClient to base SigninClient class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/prefs/pref_service.h" 5 #include "base/prefs/pref_service.h"
6 #include "base/prefs/scoped_user_pref_update.h" 6 #include "base/prefs/scoped_user_pref_update.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 void OneClickSigninHelperTest::TearDown() { 272 void OneClickSigninHelperTest::TearDown() {
273 signin::ForceWebBasedSigninFlowForTesting(false); 273 signin::ForceWebBasedSigninFlowForTesting(false);
274 content::RenderViewHostTestHarness::TearDown(); 274 content::RenderViewHostTestHarness::TearDown();
275 } 275 }
276 276
277 void OneClickSigninHelperTest::SetTrustedSigninProcessID(int id) { 277 void OneClickSigninHelperTest::SetTrustedSigninProcessID(int id) {
278 trusted_signin_process_id_ = id; 278 trusted_signin_process_id_ = id;
279 } 279 }
280 280
281 void OneClickSigninHelperTest::SetUpSigninManager(const std::string& username) { 281 void OneClickSigninHelperTest::SetUpSigninManager(const std::string& username) {
282 ChromeSigninClient* signin_client = 282 SigninClient* signin_client =
283 ChromeSigninClientFactory::GetForProfile(profile()); 283 ChromeSigninClientFactory::GetForProfile(profile());
284 if (signin_client) 284 if (signin_client)
285 signin_client->SetSigninProcess(trusted_signin_process_id_); 285 signin_client->SetSigninProcess(trusted_signin_process_id_);
286 286
287 signin_manager_ = static_cast<SigninManagerMock*>( 287 signin_manager_ = static_cast<SigninManagerMock*>(
288 SigninManagerFactory::GetForProfile(profile())); 288 SigninManagerFactory::GetForProfile(profile()));
289 if (!username.empty()) { 289 if (!username.empty()) {
290 ASSERT_TRUE(signin_manager_); 290 ASSERT_TRUE(signin_manager_);
291 signin_manager_->SetAuthenticatedUsername(username); 291 signin_manager_->SetAuthenticatedUsername(username);
292 } 292 }
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 args.email = "foo@gmail.com"; 1012 args.email = "foo@gmail.com";
1013 args.profile = profile(); 1013 args.profile = profile();
1014 MockStarterWrapper* wrapper = new MockStarterWrapper( 1014 MockStarterWrapper* wrapper = new MockStarterWrapper(
1015 args, OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS); 1015 args, OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS);
1016 SetCookie("LSID=1234; domain=google.com; secure; httponly"); 1016 SetCookie("LSID=1234; domain=google.com; secure; httponly");
1017 1017
1018 EXPECT_CALL(*wrapper, DisplayErrorBubble(_)); 1018 EXPECT_CALL(*wrapper, DisplayErrorBubble(_));
1019 wrapper->Start(); 1019 wrapper->Start();
1020 base::RunLoop().RunUntilIdle(); 1020 base::RunLoop().RunUntilIdle();
1021 } 1021 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper.cc ('k') | components/signin/core/browser/signin_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698