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

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

Issue 8760019: Make the change in ProfileSyncService such that it declares success (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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_unittest.cc
===================================================================
--- chrome/browser/sync/profile_sync_service_unittest.cc (revision 112644)
+++ chrome/browser/sync/profile_sync_service_unittest.cc (working copy)
@@ -106,13 +106,19 @@
}
if (issue_auth_token) {
- profile_->GetTokenService()->IssueAuthTokenForTest(
- GaiaConstants::kSyncService, "token");
+ IssueTestTokens();
}
service_->Initialize();
}
}
+ void IssueTestTokens() {
+ profile_->GetTokenService()->IssueAuthTokenForTest(
+ GaiaConstants::kSyncService, "token1");
+ profile_->GetTokenService()->IssueAuthTokenForTest(
+ GaiaConstants::kGaiaOAuth2LoginRefreshToken, "token2");
+ }
+
MessageLoop ui_loop_;
// Needed by |service_|.
content::TestBrowserThread ui_thread_;
@@ -165,8 +171,7 @@
EXPECT_CALL(factory_, CreateDataTypeManager(_, _)).
WillRepeatedly(ReturnNewDataTypeManager());
- profile_->GetTokenService()->IssueAuthTokenForTest(
- GaiaConstants::kSyncService, "token");
+ IssueTestTokens();
service_->Initialize();
EXPECT_TRUE(service_->sync_initialized());
@@ -207,8 +212,7 @@
js_controller->AddJsEventHandler(&event_handler);
// Since we're doing synchronous initialization, backend should be
// initialized by this call.
- profile_->GetTokenService()->IssueAuthTokenForTest(
- GaiaConstants::kSyncService, "token");
+ IssueTestTokens();
EXPECT_TRUE(service_->sync_initialized());
js_controller->RemoveJsEventHandler(&event_handler);
}
@@ -253,8 +257,7 @@
args1, reply_handler.AsWeakHandle());
}
- profile_->GetTokenService()->IssueAuthTokenForTest(
- GaiaConstants::kSyncService, "token");
+ IssueTestTokens();
// This forces the sync thread to process the message and reply.
service_.reset();
@@ -286,8 +289,7 @@
// Since we're doing synchronous initialization, backend should be
// initialized by this call.
- profile_->GetTokenService()->IssueAuthTokenForTest(
- GaiaConstants::kSyncService, "token");
+ IssueTestTokens();
// Stop the service so we can read the new Sync Data files that were
// created.
« no previous file with comments | « chrome/browser/sync/profile_sync_service_startup_unittest.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698