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

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

Issue 3305003: New authorization framework for sync. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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_password_unittest.cc
===================================================================
--- chrome/browser/sync/profile_sync_service_password_unittest.cc (revision 58702)
+++ chrome/browser/sync/profile_sync_service_password_unittest.cc (working copy)
@@ -24,6 +24,7 @@
#include "chrome/browser/sync/syncable/directory_manager.h"
#include "chrome/browser/sync/syncable/syncable.h"
#include "chrome/browser/sync/test_profile_sync_service.h"
+#include "chrome/common/net/gaia/gaia_constants.h"
#include "chrome/common/notification_observer_mock.h"
#include "chrome/common/notification_source.h"
#include "chrome/common/notification_type.h"
@@ -140,7 +141,7 @@
int num_pause_expectations) {
if (!service_.get()) {
service_.reset(new TestProfileSyncService(&factory_, &profile_,
- false, false, root_task));
+ "test_user", false, root_task));
service_->set_num_expected_resumes(num_resume_expectations);
service_->set_num_expected_pauses(num_pause_expectations);
PasswordDataTypeController* data_type_controller =
@@ -155,6 +156,13 @@
EXPECT_CALL(factory_, CreateDataTypeManager(_, _)).
WillOnce(ReturnNewDataTypeManager());
+ // We need tokens to get the tests going
+ token_service_.IssueAuthTokenForTest(
+ GaiaConstants::kSyncService, "token");
+
+ EXPECT_CALL(profile_, GetTokenService()).
+ WillRepeatedly(Return(&token_service_));
+
// Creating model safe workers will request the history service and
// password store. I couldn't manage to convince gmock that splitting up
// the expectations to match the class responsibilities was a good thing,

Powered by Google App Engine
This is Rietveld 408576698