OLD | NEW |
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/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/signin/fake_signin_manager.h" | 9 #include "chrome/browser/signin/fake_signin_manager.h" |
10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 class FakeSigninManagerForSyncUIUtilTest : public FakeSigninManagerBase { | 177 class FakeSigninManagerForSyncUIUtilTest : public FakeSigninManagerBase { |
178 public: | 178 public: |
179 explicit FakeSigninManagerForSyncUIUtilTest(Profile* profile) | 179 explicit FakeSigninManagerForSyncUIUtilTest(Profile* profile) |
180 : FakeSigninManagerBase(profile), auth_in_progress_(false) { | 180 : FakeSigninManagerBase(profile), auth_in_progress_(false) { |
181 Initialize(NULL); | 181 Initialize(NULL); |
182 } | 182 } |
183 | 183 |
184 virtual ~FakeSigninManagerForSyncUIUtilTest() { | 184 virtual ~FakeSigninManagerForSyncUIUtilTest() { |
185 } | 185 } |
186 | 186 |
187 virtual bool AuthInProgress() const OVERRIDE { | 187 virtual bool AuthInProgress() const override { |
188 return auth_in_progress_; | 188 return auth_in_progress_; |
189 } | 189 } |
190 | 190 |
191 void set_auth_in_progress() { | 191 void set_auth_in_progress() { |
192 auth_in_progress_ = true; | 192 auth_in_progress_ = true; |
193 } | 193 } |
194 | 194 |
195 private: | 195 private: |
196 bool auth_in_progress_; | 196 bool auth_in_progress_; |
197 }; | 197 }; |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 EXPECT_FALSE(status_label.empty()); | 402 EXPECT_FALSE(status_label.empty()); |
403 EXPECT_EQ(status_label.find(base::ASCIIToUTF16("href")), | 403 EXPECT_EQ(status_label.find(base::ASCIIToUTF16("href")), |
404 base::string16::npos); | 404 base::string16::npos); |
405 testing::Mock::VerifyAndClearExpectations(&service); | 405 testing::Mock::VerifyAndClearExpectations(&service); |
406 testing::Mock::VerifyAndClearExpectations(&signin); | 406 testing::Mock::VerifyAndClearExpectations(&signin); |
407 EXPECT_CALL(service, GetAuthError()).WillRepeatedly(ReturnRef(error)); | 407 EXPECT_CALL(service, GetAuthError()).WillRepeatedly(ReturnRef(error)); |
408 provider.reset(); | 408 provider.reset(); |
409 signin.Shutdown(); | 409 signin.Shutdown(); |
410 } | 410 } |
411 } | 411 } |
OLD | NEW |