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

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

Issue 2551023006: [Sync] SyncEngine 1.5: Fix all backend references in PSS. (Closed)
Patch Set: Created 4 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
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 0d0d3c32ba3ec9df679be217613efcb2b8b303fc..128b5031ab823536fc826736eb799df333e4bb6d 100644
--- a/chrome/browser/ui/webui/options/sync_setup_handler_unittest.cc
+++ b/chrome/browser/ui/webui/options/sync_setup_handler_unittest.cc
@@ -236,8 +236,7 @@ class SyncSetupHandlerTest : public testing::Test {
// An initialized ProfileSyncService will have already completed sync setup
// and will have an initialized sync backend.
ASSERT_TRUE(mock_signin_->IsInitialized());
- EXPECT_CALL(*mock_pss_, IsBackendInitialized())
- .WillRepeatedly(Return(true));
+ EXPECT_CALL(*mock_pss_, IsEngineInitialized()).WillRepeatedly(Return(true));
}
void ExpectConfig() {
@@ -362,7 +361,7 @@ TEST_F(SyncSetupHandlerTest, DisplayConfigureWithBackendDisabledAndCancel) {
EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true));
EXPECT_CALL(*mock_pss_, IsFirstSetupComplete()).WillRepeatedly(Return(false));
error_ = GoogleServiceAuthError::AuthErrorNone();
- EXPECT_CALL(*mock_pss_, IsBackendInitialized()).WillRepeatedly(Return(false));
+ EXPECT_CALL(*mock_pss_, IsEngineInitialized()).WillRepeatedly(Return(false));
// We're simulating a user setting up sync, which would cause the backend to
// kick off initialization, but not download user data types. The sync
@@ -386,7 +385,7 @@ TEST_F(SyncSetupHandlerTest,
EXPECT_CALL(*mock_pss_, IsFirstSetupComplete()).WillRepeatedly(Return(false));
error_ = GoogleServiceAuthError::AuthErrorNone();
// Sync backend is stopped initially, and will start up.
- EXPECT_CALL(*mock_pss_, IsBackendInitialized()).WillRepeatedly(Return(false));
+ EXPECT_CALL(*mock_pss_, IsEngineInitialized()).WillRepeatedly(Return(false));
SetDefaultExpectationsForConfigPage();
handler_->OpenSyncSetup(false /* creating_supervised_user */);
@@ -403,7 +402,7 @@ TEST_F(SyncSetupHandlerTest,
Mock::VerifyAndClearExpectations(mock_pss_);
// Now, act as if the ProfileSyncService has started up.
SetDefaultExpectationsForConfigPage();
- EXPECT_CALL(*mock_pss_, IsBackendInitialized()).WillRepeatedly(Return(true));
+ EXPECT_CALL(*mock_pss_, IsEngineInitialized()).WillRepeatedly(Return(true));
error_ = GoogleServiceAuthError::AuthErrorNone();
EXPECT_CALL(*mock_pss_, GetAuthError()).WillRepeatedly(ReturnRef(error_));
NotifySyncListeners();
@@ -433,7 +432,7 @@ TEST_F(SyncSetupHandlerTest,
EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true));
EXPECT_CALL(*mock_pss_, IsFirstSetupComplete()).WillRepeatedly(Return(false));
error_ = GoogleServiceAuthError::AuthErrorNone();
- EXPECT_CALL(*mock_pss_, IsBackendInitialized())
+ EXPECT_CALL(*mock_pss_, IsEngineInitialized())
.WillOnce(Return(false))
.WillRepeatedly(Return(true));
SetDefaultExpectationsForConfigPage();
@@ -456,7 +455,7 @@ TEST_F(SyncSetupHandlerTest,
EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true));
EXPECT_CALL(*mock_pss_, IsFirstSetupComplete()).WillRepeatedly(Return(false));
error_ = GoogleServiceAuthError::AuthErrorNone();
- EXPECT_CALL(*mock_pss_, IsBackendInitialized()).WillRepeatedly(Return(false));
+ EXPECT_CALL(*mock_pss_, IsEngineInitialized()).WillRepeatedly(Return(false));
handler_->OpenSyncSetup(false /* creating_supervised_user */);
const content::TestWebUI::CallData& data = *web_ui_.call_data()[0];
@@ -736,7 +735,7 @@ TEST_F(SyncSetupHandlerTest, ShowSigninOnAuthError) {
.WillRepeatedly(Return(false));
EXPECT_CALL(*mock_pss_, IsUsingSecondaryPassphrase())
.WillRepeatedly(Return(false));
- EXPECT_CALL(*mock_pss_, IsBackendInitialized()).WillRepeatedly(Return(false));
+ EXPECT_CALL(*mock_pss_, IsEngineInitialized()).WillRepeatedly(Return(false));
#if defined(OS_CHROMEOS)
// On ChromeOS, auth errors are ignored - instead we just try to start the

Powered by Google App Engine
This is Rietveld 408576698