Upstream version 7.35.139.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / sync / startup_controller_unittest.cc
index fc96790..3468410 100644 (file)
@@ -247,20 +247,19 @@ TEST_F(StartupControllerTest, Reset) {
   EXPECT_TRUE(started());
 }
 
-// Test that setup-in-progress tracking is reset properly on Reset.
-// This scenario doesn't affect auto-start platforms.
+// Test that setup-in-progress tracking is persistent across a Reset.
 TEST_F(StartupControllerTest, ResetDuringSetup) {
   signin()->set_account(kTestUser);
   token_service()->IssueRefreshTokenForUser(kTestUser, kTestToken);
+
+  // Simulate UI telling us setup is in progress.
   controller()->set_setup_in_progress(true);
+
+  // This could happen if the UI triggers a stop-syncing permanently call.
   controller()->Reset(syncer::UserTypes());
-  controller()->TryStart();
 
-  if (!browser_defaults::kSyncAutoStarts) {
-    EXPECT_FALSE(started());
-    EXPECT_EQ(kStateStringNotStarted,
-              controller()->GetBackendInitializationStateString());
-  }
+  // From the UI's point of view, setup is still in progress.
+  EXPECT_TRUE(controller()->setup_in_progress());
 }
 
 }  // namespace browser_sync