Index: components/sync_driver/startup_controller_unittest.cc |
diff --git a/components/sync_driver/startup_controller_unittest.cc b/components/sync_driver/startup_controller_unittest.cc |
index eb83d9da3b686dcf14de54525797a69cdf5ee6c5..7efb1f38e2d8d76f7512dc0a992a9d6e3ad994ab 100644 |
--- a/components/sync_driver/startup_controller_unittest.cc |
+++ b/components/sync_driver/startup_controller_unittest.cc |
@@ -86,14 +86,14 @@ class StartupControllerTest : public testing::Test { |
std::unique_ptr<StartupController> controller_; |
}; |
-// Test that sync doesn't start until all conditions are met. |
-TEST_F(StartupControllerTest, Basic) { |
+// Test that sync doesn't start if setup is not in progress or complete. |
+TEST_F(StartupControllerTest, NoSetupComplete) { |
controller()->TryStart(); |
ExpectNotStarted(); |
SetCanStart(true); |
controller()->TryStart(); |
- ExpectStarted(); |
+ ExpectNotStarted(); |
} |
// Test that sync defers if first setup is complete. |
@@ -189,17 +189,12 @@ TEST_F(StartupControllerTest, SetupInProgressTriggerInterruptsDeferral) { |
ExpectStarted(); |
} |
-// Test that start isn't deferred on the first start but is on restarts. |
-TEST_F(StartupControllerTest, DeferralOnRestart) { |
+// Test that immediate startup can be forced. |
+TEST_F(StartupControllerTest, ForceImmediateStartup) { |
+ sync_prefs()->SetFirstSetupComplete(); |
maxbogue
2016/07/15 23:45:15
Remove this line. The test needs to pass without i
Nicolas Zea
2016/07/15 23:49:11
Good catch! done.
|
SetCanStart(true); |
- controller()->TryStart(); |
+ controller()->TryStartImmediately(); |
ExpectStarted(); |
- |
- clear_started(); |
- controller()->Reset(syncer::UserTypes()); |
- ExpectNotStarted(); |
- controller()->TryStart(); |
- ExpectStartDeferred(); |
} |
// Test that setup-in-progress tracking is persistent across a Reset. |