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

Unified Diff: chrome/browser/ui/webui/settings/people_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/settings/people_handler_unittest.cc
diff --git a/chrome/browser/ui/webui/settings/people_handler_unittest.cc b/chrome/browser/ui/webui/settings/people_handler_unittest.cc
index c0087b29ba3f05c13426520e51d63f004a03c291..8dfa033f912d945fc0db596107c13eca939b41a7 100644
--- a/chrome/browser/ui/webui/settings/people_handler_unittest.cc
+++ b/chrome/browser/ui/webui/settings/people_handler_unittest.cc
@@ -232,8 +232,7 @@ class PeopleHandlerTest : 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 ExpectPageStatusResponse(const std::string& expected_status) {
@@ -370,7 +369,7 @@ TEST_F(PeopleHandlerTest, 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
@@ -394,7 +393,7 @@ TEST_F(PeopleHandlerTest,
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 */);
@@ -405,7 +404,7 @@ TEST_F(PeopleHandlerTest,
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_));
handler_->SyncStartupCompleted();
@@ -429,7 +428,7 @@ TEST_F(PeopleHandlerTest,
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();
@@ -452,7 +451,7 @@ TEST_F(PeopleHandlerTest,
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 */);
ExpectPageStatusChanged(PeopleHandler::kSpinnerPageStatus);
@@ -721,7 +720,7 @@ TEST_F(PeopleHandlerTest, 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