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

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

Issue 10834351: [sync] Divorce DataTypeManager from NotificationService notifications by creating a new DataTypeMa… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore expectations in DTMImpl unittest + Treat observer_ as const Created 8 years, 4 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
diff --git a/chrome/browser/sync/profile_sync_service_password_unittest.cc b/chrome/browser/sync/profile_sync_service_password_unittest.cc
index 275dc0763b1d7dc374bfdc194afb71dfec6aecc0..1dfbb5172a2b1e8cd1b6a2383a01677bd90efcbc 100644
--- a/chrome/browser/sync/profile_sync_service_password_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_password_unittest.cc
@@ -116,6 +116,10 @@ class PasswordTestProfileSyncService : public TestProfileSyncService {
TestProfileSyncService::OnPassphraseAccepted();
}
+ virtual void OnConfigureBlocked() OVERRIDE {
+ QuitMessageLoop();
+ }
+
private:
base::Closure callback_;
};
@@ -149,13 +153,6 @@ class ProfileSyncServicePasswordTest : public AbstractProfileSyncServiceTest {
password_store_ = static_cast<MockPasswordStore*>(
PasswordStoreFactory::GetInstance()->SetTestingFactoryAndUse(
&profile_, MockPasswordStore::Build).get());
-
- registrar_.Add(&observer_,
- chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
- content::NotificationService::AllSources());
- registrar_.Add(&observer_,
- chrome::NOTIFICATION_SYNC_CONFIGURE_BLOCKED,
- content::NotificationService::AllSources());
}
virtual void TearDown() {
@@ -203,22 +200,13 @@ class ProfileSyncServicePasswordTest : public AbstractProfileSyncServiceTest {
WillRepeatedly(MakePasswordSyncComponents(service_.get(),
password_store_.get(),
data_type_controller));
- EXPECT_CALL(*factory, CreateDataTypeManager(_, _)).
+ EXPECT_CALL(*factory, CreateDataTypeManager(_, _, _)).
WillOnce(ReturnNewDataTypeManager());
// We need tokens to get the tests going
token_service_->IssueAuthTokenForTest(
GaiaConstants::kSyncService, "token");
- EXPECT_CALL(observer_,
- Observe(
- int(chrome::NOTIFICATION_SYNC_CONFIGURE_DONE),_,_));
- EXPECT_CALL(observer_,
- Observe(
- int(
- chrome::NOTIFICATION_SYNC_CONFIGURE_BLOCKED),_,_))
- .WillOnce(InvokeWithoutArgs(QuitMessageLoop));
-
service_->RegisterDataTypeController(data_type_controller);
service_->Initialize();
MessageLoop::current()->Run();
« no previous file with comments | « chrome/browser/sync/profile_sync_service_mock.h ('k') | chrome/browser/sync/profile_sync_service_preference_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698