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

Unified Diff: components/browser_sync/browser/profile_sync_service_startup_unittest.cc

Issue 2159453002: [Sync] Don't start up sync when FirstSetupCompleted is false and no setup in progress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android fix attempt Created 4 years, 5 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: components/browser_sync/browser/profile_sync_service_startup_unittest.cc
diff --git a/components/browser_sync/browser/profile_sync_service_startup_unittest.cc b/components/browser_sync/browser/profile_sync_service_startup_unittest.cc
index be3c641e428bce08f97703e6082713ad71b92c4b..b67f8e2a8b53b1a52a756749e44de251e46343d4 100644
--- a/components/browser_sync/browser/profile_sync_service_startup_unittest.cc
+++ b/components/browser_sync/browser/profile_sync_service_startup_unittest.cc
@@ -429,14 +429,14 @@ TEST_F(ProfileSyncServiceStartupTest, SwitchManaged) {
EXPECT_FALSE(sync_service_->IsBackendInitialized());
// Note that PSS no longer references |data_type_manager| after stopping.
- // When switching back to unmanaged, the state should change and sync should
- // start but not become active because IsFirstSetupComplete() will be false.
- SetUpSyncBackendHost();
+ // When switching back to unmanaged, the state should change but sync should
+ // not start automatically because IsFirstSetupComplete() will be false.
// A new DataTypeManager should not be created.
+ Mock::VerifyAndClearExpectations(data_type_manager);
EXPECT_CALL(*component_factory_, CreateDataTypeManager(_, _, _, _, _))
.Times(0);
pref_service()->ClearPref(sync_driver::prefs::kSyncManaged);
- EXPECT_TRUE(sync_service_->IsBackendInitialized());
+ EXPECT_FALSE(sync_service_->IsBackendInitialized());
EXPECT_FALSE(sync_service_->IsSyncActive());
}

Powered by Google App Engine
This is Rietveld 408576698