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

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

Issue 288813003: Add username of account that has an auth error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments 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 | 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/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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 .WillRepeatedly(Return(true)); 250 .WillRepeatedly(Return(true));
251 EXPECT_CALL(service, sync_initialized()).WillRepeatedly(Return(true)); 251 EXPECT_CALL(service, sync_initialized()).WillRepeatedly(Return(true));
252 EXPECT_CALL(service, IsPassphraseRequired()) 252 EXPECT_CALL(service, IsPassphraseRequired())
253 .WillRepeatedly(Return(false)); 253 .WillRepeatedly(Return(false));
254 browser_sync::SyncBackendHost::Status status; 254 browser_sync::SyncBackendHost::Status status;
255 EXPECT_CALL(service, QueryDetailedSyncStatus(_)) 255 EXPECT_CALL(service, QueryDetailedSyncStatus(_))
256 .WillRepeatedly(DoAll(SetArgPointee<0>(status), 256 .WillRepeatedly(DoAll(SetArgPointee<0>(status),
257 Return(false))); 257 Return(false)));
258 provider->SetAuthError( 258 provider->SetAuthError(
259 kTestUser, 259 kTestUser,
260 kTestUser,
260 GoogleServiceAuthError(GoogleServiceAuthError::SERVICE_UNAVAILABLE)); 261 GoogleServiceAuthError(GoogleServiceAuthError::SERVICE_UNAVAILABLE));
261 EXPECT_CALL(service, HasUnrecoverableError()) 262 EXPECT_CALL(service, HasUnrecoverableError())
262 .WillRepeatedly(Return(false)); 263 .WillRepeatedly(Return(false));
263 return; 264 return;
264 } 265 }
265 case STATUS_CASE_PROTOCOL_ERROR: { 266 case STATUS_CASE_PROTOCOL_ERROR: {
266 EXPECT_CALL(service, HasSyncSetupCompleted()) 267 EXPECT_CALL(service, HasSyncSetupCompleted())
267 .WillRepeatedly(Return(true)); 268 .WillRepeatedly(Return(true));
268 EXPECT_CALL(service, sync_initialized()).WillRepeatedly(Return(true)); 269 EXPECT_CALL(service, sync_initialized()).WillRepeatedly(Return(true));
269 EXPECT_CALL(service, IsPassphraseRequired()) 270 EXPECT_CALL(service, IsPassphraseRequired())
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 EXPECT_FALSE(status_label.empty()); 402 EXPECT_FALSE(status_label.empty());
402 EXPECT_EQ(status_label.find(base::ASCIIToUTF16("href")), 403 EXPECT_EQ(status_label.find(base::ASCIIToUTF16("href")),
403 base::string16::npos); 404 base::string16::npos);
404 testing::Mock::VerifyAndClearExpectations(&service); 405 testing::Mock::VerifyAndClearExpectations(&service);
405 testing::Mock::VerifyAndClearExpectations(&signin); 406 testing::Mock::VerifyAndClearExpectations(&signin);
406 EXPECT_CALL(service, GetAuthError()).WillRepeatedly(ReturnRef(error)); 407 EXPECT_CALL(service, GetAuthError()).WillRepeatedly(ReturnRef(error));
407 provider.reset(); 408 provider.reset();
408 signin.Shutdown(); 409 signin.Shutdown();
409 } 410 }
410 } 411 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_ui_util.cc ('k') | chrome/browser/ui/cocoa/browser_window_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698