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

Unified Diff: chrome/browser/ui/webui/options/sync_setup_handler_unittest.cc

Issue 1549443002: [Sync] Remove PSS::IsOAuthRefreshTokenAvailable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/people_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/sync_setup_handler_unittest.cc
diff --git a/chrome/browser/ui/webui/options/sync_setup_handler_unittest.cc b/chrome/browser/ui/webui/options/sync_setup_handler_unittest.cc
index 91433b682366d1cb0e3c862f9e8d6eac64476b55..aa93cdd2d13c1293601a168d7ea3d7031e1f1185 100644
--- a/chrome/browser/ui/webui/options/sync_setup_handler_unittest.cc
+++ b/chrome/browser/ui/webui/options/sync_setup_handler_unittest.cc
@@ -298,8 +298,6 @@ TEST_F(SyncSetupHandlerTest, Basic) {
#if !defined(OS_CHROMEOS)
TEST_F(SyncSetupHandlerFirstSigninTest, DisplayBasicLogin) {
EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(false));
- EXPECT_CALL(*mock_pss_, IsOAuthRefreshTokenAvailable())
- .WillRepeatedly(Return(false));
EXPECT_CALL(*mock_pss_, HasSyncSetupCompleted())
.WillRepeatedly(Return(false));
// Ensure that the user is not signed in before calling |HandleStartSignin()|.
@@ -322,8 +320,6 @@ TEST_F(SyncSetupHandlerFirstSigninTest, DisplayBasicLogin) {
TEST_F(SyncSetupHandlerTest, ShowSyncSetupWhenNotSignedIn) {
EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(false));
- EXPECT_CALL(*mock_pss_, IsOAuthRefreshTokenAvailable())
- .WillRepeatedly(Return(false));
EXPECT_CALL(*mock_pss_, HasSyncSetupCompleted())
.WillRepeatedly(Return(false));
handler_->HandleShowSetupUI(NULL);
@@ -357,8 +353,6 @@ TEST_F(SyncSetupHandlerTest, HandleSetupUIWhenSyncDisabled) {
// it is displaying the spinner to the user.
TEST_F(SyncSetupHandlerTest, DisplayConfigureWithBackendDisabledAndCancel) {
EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true));
- EXPECT_CALL(*mock_pss_, IsOAuthRefreshTokenAvailable())
- .WillRepeatedly(Return(true));
EXPECT_CALL(*mock_pss_, HasSyncSetupCompleted())
.WillRepeatedly(Return(false));
error_ = GoogleServiceAuthError::AuthErrorNone();
@@ -383,8 +377,6 @@ TEST_F(SyncSetupHandlerTest, DisplayConfigureWithBackendDisabledAndCancel) {
TEST_F(SyncSetupHandlerTest,
DisplayConfigureWithBackendDisabledAndSyncStartupCompleted) {
EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true));
- EXPECT_CALL(*mock_pss_, IsOAuthRefreshTokenAvailable())
- .WillRepeatedly(Return(true));
EXPECT_CALL(*mock_pss_, HasSyncSetupCompleted())
.WillRepeatedly(Return(false));
error_ = GoogleServiceAuthError::AuthErrorNone();
@@ -434,8 +426,6 @@ TEST_F(SyncSetupHandlerTest,
TEST_F(SyncSetupHandlerTest,
DisplayConfigureWithBackendDisabledAndCancelAfterSigninSuccess) {
EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true));
- EXPECT_CALL(*mock_pss_, IsOAuthRefreshTokenAvailable())
- .WillRepeatedly(Return(true));
EXPECT_CALL(*mock_pss_, HasSyncSetupCompleted())
.WillRepeatedly(Return(false));
error_ = GoogleServiceAuthError::AuthErrorNone();
@@ -460,8 +450,6 @@ TEST_F(SyncSetupHandlerTest,
TEST_F(SyncSetupHandlerTest,
DisplayConfigureWithBackendDisabledAndSigninFailed) {
EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true));
- EXPECT_CALL(*mock_pss_, IsOAuthRefreshTokenAvailable())
- .WillRepeatedly(Return(true));
EXPECT_CALL(*mock_pss_, HasSyncSetupCompleted())
.WillRepeatedly(Return(false));
error_ = GoogleServiceAuthError::AuthErrorNone();
@@ -494,8 +482,6 @@ class SyncSetupHandlerNonCrosTest : public SyncSetupHandlerTest {
TEST_F(SyncSetupHandlerNonCrosTest, HandleGaiaAuthFailure) {
EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(false));
- EXPECT_CALL(*mock_pss_, IsOAuthRefreshTokenAvailable())
- .WillRepeatedly(Return(false));
EXPECT_CALL(*mock_pss_, HasUnrecoverableError())
.WillRepeatedly(Return(false));
EXPECT_CALL(*mock_pss_, HasSyncSetupCompleted())
@@ -509,8 +495,6 @@ TEST_F(SyncSetupHandlerNonCrosTest, HandleGaiaAuthFailure) {
// TODO(kochi): We need equivalent tests for ChromeOS.
TEST_F(SyncSetupHandlerNonCrosTest, UnrecoverableErrorInitializingSync) {
EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(false));
- EXPECT_CALL(*mock_pss_, IsOAuthRefreshTokenAvailable())
- .WillRepeatedly(Return(false));
EXPECT_CALL(*mock_pss_, HasSyncSetupCompleted())
.WillRepeatedly(Return(false));
// Open the web UI.
@@ -521,8 +505,6 @@ TEST_F(SyncSetupHandlerNonCrosTest, UnrecoverableErrorInitializingSync) {
TEST_F(SyncSetupHandlerNonCrosTest, GaiaErrorInitializingSync) {
EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(false));
- EXPECT_CALL(*mock_pss_, IsOAuthRefreshTokenAvailable())
- .WillRepeatedly(Return(false));
EXPECT_CALL(*mock_pss_, HasSyncSetupCompleted())
.WillRepeatedly(Return(false));
// Open the web UI.
@@ -772,8 +754,6 @@ TEST_F(SyncSetupHandlerTest, ShowSigninOnAuthError) {
SigninErrorControllerFactory::GetForProfile(profile_.get()));
provider.SetAuthError(kTestUser, error_);
EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true));
- EXPECT_CALL(*mock_pss_, IsOAuthRefreshTokenAvailable())
- .WillRepeatedly(Return(true));
EXPECT_CALL(*mock_pss_, IsPassphraseRequired())
.WillRepeatedly(Return(false));
EXPECT_CALL(*mock_pss_, IsUsingSecondaryPassphrase())
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/people_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698