Chromium Code Reviews| 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 206ce8997c297cba6dfa69131c622d7a8ea035b2..fad19cc2d50713e80463fb7c1a59b7606f4c62cb 100644 |
| --- a/components/browser_sync/browser/profile_sync_service_startup_unittest.cc |
| +++ b/components/browser_sync/browser/profile_sync_service_startup_unittest.cc |
| @@ -208,6 +208,7 @@ TEST_F(ProfileSyncServiceStartupTest, StartFirstTime) { |
| // Simulate the UI telling sync it has finished setting up. |
| sync_service_->SetSetupInProgress(false); |
| + sync_service_->SetFirstSetupComplete(); |
| EXPECT_TRUE(sync_service_->IsSyncActive()); |
| } |
| @@ -423,13 +424,13 @@ TEST_F(ProfileSyncServiceStartupTest, SwitchManaged) { |
| EXPECT_CALL(observer_, OnStateChanged()).Times(AnyNumber()); |
| pref_service()->SetBoolean(sync_driver::prefs::kSyncManaged, true); |
| - // When switching back to unmanaged, the state should change, but the service |
| - // should not start up automatically (kSyncFirstSetupComplete will be |
| - // false). |
| + // When switching back to unmanaged, the state should change and sync should |
| + // start but not become active because IsFirstSetupComplete() will be false. |
| Mock::VerifyAndClearExpectations(data_type_manager); |
| EXPECT_CALL(*component_factory_, CreateDataTypeManager(_, _, _, _, _)) |
| .Times(0); |
| EXPECT_CALL(observer_, OnStateChanged()).Times(AnyNumber()); |
| + SetUpSyncBackendHost(); |
|
Nicolas Zea
2016/02/29 21:21:55
Why is this needed now?
Nicolas Zea
2016/03/09 19:49:45
Ping?
maxbogue
2016/03/10 18:48:15
Whoops, I forgot to respond in the previous update
|
| pref_service()->ClearPref(sync_driver::prefs::kSyncManaged); |
| } |