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

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

Issue 10534075: [sync] Make SetSetupInProgress kick sync engine when needed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove call to SetSyncSetupCompleted, and change kick-mechanism Created 8 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/profile_sync_service_startup_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_startup_unittest.cc b/chrome/browser/sync/profile_sync_service_startup_unittest.cc
index 52d6406a04e40efcb5a4b49d68adba42845a7fca..fd20ff524dbe15a18268790bfbf2e8279173e048 100644
--- a/chrome/browser/sync/profile_sync_service_startup_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_startup_unittest.cc
@@ -152,15 +152,13 @@ TEST_F(ProfileSyncServiceStartupTest, StartFirstTime) {
// Create some tokens in the token service; the service will startup when
// it is notified that tokens are available.
- service_->set_setup_in_progress(true);
+ service_->SetSetupInProgress(true);
service_->signin()->StartSignIn("test_user", "", "", "");
TokenServiceFactory::GetForProfile(profile_.get())->IssueAuthTokenForTest(
GaiaConstants::kSyncService, "sync_token");
TokenServiceFactory::GetForProfile(profile_.get())->IssueAuthTokenForTest(
GaiaConstants::kGaiaOAuth2LoginRefreshToken, "oauth2_login_token");
- service_->set_setup_in_progress(false);
- service_->OnUserChoseDatatypes(
- false, syncable::ModelTypeSet(syncable::BOOKMARKS));
+ service_->SetSetupInProgress(false);
EXPECT_TRUE(service_->ShouldPushChanges());
}
@@ -193,7 +191,7 @@ TEST_F(ProfileSyncServiceStartupTest, StartNoCredentials) {
EXPECT_CALL(*data_type_manager, Stop()).Times(1);
EXPECT_CALL(observer_, OnStateChanged()).Times(AnyNumber());
- service_->set_setup_in_progress(true);
+ service_->SetSetupInProgress(true);
service_->signin()->StartSignIn("test_user", "", "", "");
// NOTE: Unlike StartFirstTime, this test does not issue any auth tokens.
content::NotificationService::current()->Notify(
@@ -201,9 +199,7 @@ TEST_F(ProfileSyncServiceStartupTest, StartNoCredentials) {
content::Source<TokenService>(
TokenServiceFactory::GetForProfile(profile_.get())),
content::NotificationService::NoDetails());
- service_->set_setup_in_progress(false);
- service_->OnUserChoseDatatypes(
- false, syncable::ModelTypeSet(syncable::BOOKMARKS));
+ service_->SetSetupInProgress(false);
// Backend should initialize using a bogus GAIA token for credentials.
EXPECT_TRUE(service_->ShouldPushChanges());
}
@@ -222,7 +218,7 @@ TEST_F(ProfileSyncServiceStartupCrosTest, StartCrosNoCredentials) {
content::Source<TokenService>(
TokenServiceFactory::GetForProfile(profile_.get())),
content::NotificationService::NoDetails());
- service_->set_setup_in_progress(false);
+ service_->SetSetupInProgress(false);
// Sync should not start because there are still no tokens.
EXPECT_FALSE(service_->ShouldPushChanges());
EXPECT_FALSE(service_->GetBackendForTest());
« no previous file with comments | « chrome/browser/sync/profile_sync_service_harness.cc ('k') | chrome/browser/ui/sync/one_click_signin_sync_starter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698