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

Side by Side Diff: chrome/browser/sync/sync_ui_util_unittest.cc

Issue 15024007: Eliminate BrowserProcess dependency from sign-in production code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge LKGR Created 7 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 | Annotate | Revision Log
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 <set> 5 #include <set>
6 #include "base/basictypes.h" 6 #include "base/basictypes.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/signin/fake_auth_status_provider.h" 9 #include "chrome/browser/signin/fake_auth_status_provider.h"
10 #include "chrome/browser/signin/fake_signin_manager.h" 10 #include "chrome/browser/signin/fake_signin_manager.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // using the "real" SigninManager AuthInProgress logic. Without that override, 157 // using the "real" SigninManager AuthInProgress logic. Without that override,
158 // it's no longer possible to test both chrome os + desktop flows as part of the 158 // it's no longer possible to test both chrome os + desktop flows as part of the
159 // same test, because AuthInProgress is always false on chrome os. Most of the 159 // same test, because AuthInProgress is always false on chrome os. Most of the
160 // tests are unaffected, but STATUS_CASE_AUTHENTICATING can't exist in both 160 // tests are unaffected, but STATUS_CASE_AUTHENTICATING can't exist in both
161 // versions, so it we will require two separate tests, one using SigninManager 161 // versions, so it we will require two separate tests, one using SigninManager
162 // and one using SigninManagerBase (which require different setup procedures. 162 // and one using SigninManagerBase (which require different setup procedures.
163 class FakeSigninManagerForSyncUIUtilTest : public FakeSigninManagerBase { 163 class FakeSigninManagerForSyncUIUtilTest : public FakeSigninManagerBase {
164 public: 164 public:
165 explicit FakeSigninManagerForSyncUIUtilTest(Profile* profile) 165 explicit FakeSigninManagerForSyncUIUtilTest(Profile* profile)
166 : auth_in_progress_(false) { 166 : auth_in_progress_(false) {
167 Initialize(profile); 167 Initialize(profile, NULL);
168 } 168 }
169 169
170 virtual ~FakeSigninManagerForSyncUIUtilTest() { 170 virtual ~FakeSigninManagerForSyncUIUtilTest() {
171 } 171 }
172 172
173 virtual bool AuthInProgress() const OVERRIDE { 173 virtual bool AuthInProgress() const OVERRIDE {
174 return auth_in_progress_; 174 return auth_in_progress_;
175 } 175 }
176 176
177 void set_auth_in_progress() { 177 void set_auth_in_progress() {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 // the status label. 378 // the status label.
379 EXPECT_FALSE(status_label.empty()); 379 EXPECT_FALSE(status_label.empty());
380 EXPECT_EQ(status_label.find(string16(ASCIIToUTF16("href"))), 380 EXPECT_EQ(status_label.find(string16(ASCIIToUTF16("href"))),
381 string16::npos); 381 string16::npos);
382 testing::Mock::VerifyAndClearExpectations(&service); 382 testing::Mock::VerifyAndClearExpectations(&service);
383 testing::Mock::VerifyAndClearExpectations(&signin); 383 testing::Mock::VerifyAndClearExpectations(&signin);
384 provider.reset(); 384 provider.reset();
385 signin.Shutdown(); 385 signin.Shutdown();
386 } 386 }
387 } 387 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698