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

Unified Diff: chrome/browser/sync/sync_startup_tracker_unittest.cc

Issue 1175243009: [Sync] Rename SyncEnabledAndLoggedIn() to CanStartSync(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed a const transition. Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/sync_startup_tracker_unittest.cc
diff --git a/chrome/browser/sync/sync_startup_tracker_unittest.cc b/chrome/browser/sync/sync_startup_tracker_unittest.cc
index 77bf8e86d239ef4061f6b51f45b739947c56cf53..597e6547186344728d4ed241e0856eca4b4847cd 100644
--- a/chrome/browser/sync/sync_startup_tracker_unittest.cc
+++ b/chrome/browser/sync/sync_startup_tracker_unittest.cc
@@ -56,8 +56,7 @@ class SyncStartupTrackerTest : public testing::Test {
.WillRepeatedly(Return(false));
EXPECT_CALL(*mock_pss_, HasUnrecoverableError())
.WillRepeatedly(Return(false));
- EXPECT_CALL(*mock_pss_, IsSyncEnabledAndLoggedIn())
- .WillRepeatedly(Return(true));
+ EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true));
}
content::TestBrowserThreadBundle thread_bundle_;
@@ -69,8 +68,7 @@ class SyncStartupTrackerTest : public testing::Test {
TEST_F(SyncStartupTrackerTest, SyncAlreadyInitialized) {
EXPECT_CALL(*mock_pss_, backend_initialized()).WillRepeatedly(Return(true));
- EXPECT_CALL(*mock_pss_, IsSyncEnabledAndLoggedIn())
- .WillRepeatedly(Return(true));
+ EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true));
EXPECT_CALL(observer_, SyncStartupCompleted());
SyncStartupTracker tracker(profile_.get(), &observer_);
}
@@ -79,8 +77,7 @@ TEST_F(SyncStartupTrackerTest, SyncNotSignedIn) {
// Make sure that we get a SyncStartupFailed() callback if sync is not logged
// in.
EXPECT_CALL(*mock_pss_, backend_initialized()).WillRepeatedly(Return(false));
- EXPECT_CALL(*mock_pss_, IsSyncEnabledAndLoggedIn()).WillRepeatedly(
- Return(false));
+ EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(false));
EXPECT_CALL(observer_, SyncStartupFailed());
SyncStartupTracker tracker(profile_.get(), &observer_);
}
@@ -89,8 +86,7 @@ TEST_F(SyncStartupTrackerTest, SyncAuthError) {
// Make sure that we get a SyncStartupFailed() callback if sync gets an auth
// error.
EXPECT_CALL(*mock_pss_, backend_initialized()).WillRepeatedly(Return(false));
- EXPECT_CALL(*mock_pss_, IsSyncEnabledAndLoggedIn()).WillRepeatedly(
- Return(true));
+ EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true));
GoogleServiceAuthError error(
GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS);
EXPECT_CALL(*mock_pss_, GetAuthError()).WillRepeatedly(ReturnRef(error));
@@ -122,8 +118,7 @@ TEST_F(SyncStartupTrackerTest, SyncDelayedAuthError) {
// Now, mark the PSS as having an auth error.
EXPECT_CALL(*mock_pss_, backend_initialized()).WillRepeatedly(Return(false));
- EXPECT_CALL(*mock_pss_, IsSyncEnabledAndLoggedIn()).WillRepeatedly(
- Return(true));
+ EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true));
GoogleServiceAuthError error(
GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS);
EXPECT_CALL(*mock_pss_, GetAuthError()).WillRepeatedly(ReturnRef(error));
@@ -142,8 +137,7 @@ TEST_F(SyncStartupTrackerTest, SyncDelayedUnrecoverableError) {
// Now, mark the PSS as having an unrecoverable error.
EXPECT_CALL(*mock_pss_, backend_initialized()).WillRepeatedly(Return(false));
- EXPECT_CALL(*mock_pss_, IsSyncEnabledAndLoggedIn()).WillRepeatedly(
- Return(true));
+ EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true));
GoogleServiceAuthError error(
GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS);
EXPECT_CALL(*mock_pss_, GetAuthError()).WillRepeatedly(ReturnRef(error));

Powered by Google App Engine
This is Rietveld 408576698