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

Unified Diff: chrome/browser/sync/glue/app_notification_data_type_controller_unittest.cc

Issue 9749012: [Sync] Have SyncableService's take ownership of their SyncChangeProcessor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflict Created 8 years, 9 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/glue/app_notification_data_type_controller_unittest.cc
diff --git a/chrome/browser/sync/glue/app_notification_data_type_controller_unittest.cc b/chrome/browser/sync/glue/app_notification_data_type_controller_unittest.cc
index b63ef7cbdd79551411906f36008c56978d654125..f24a46910dd1ead331735afade29d040ef5db65c 100644
--- a/chrome/browser/sync/glue/app_notification_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/app_notification_data_type_controller_unittest.cc
@@ -31,6 +31,10 @@ using testing::SetArgumentPointee;
namespace browser_sync {
namespace {
+ACTION(MakeSharedChangeProcessor) {
+ return new SharedChangeProcessor();
+}
+
ACTION_P(ReturnAndRelease, change_processor) {
return change_processor->release();
}
@@ -78,7 +82,12 @@ class SyncAppNotificationDataTypeControllerTest
SetStartExpectations();
}
- virtual void TearDown() { }
+ virtual void TearDown() {
+ // Must be done before we pump the loop.
+ syncable_service_.StopSyncing(syncable::APP_NOTIFICATIONS);
+ app_notif_dtc_ = NULL;
+ PumpLoop();
+ }
protected:
// Waits until the file thread executes all tasks queued up so far.
@@ -111,6 +120,8 @@ class SyncAppNotificationDataTypeControllerTest
EXPECT_CALL(*profile_sync_factory_,
GetSyncableServiceForType(syncable::APP_NOTIFICATIONS)).
WillOnce(Return(syncable_service_.AsWeakPtr()));
+ EXPECT_CALL(*profile_sync_factory_, CreateSharedChangeProcessor()).
+ WillOnce(MakeSharedChangeProcessor());
EXPECT_CALL(*profile_sync_factory_, CreateGenericChangeProcessor(_, _, _)).
WillOnce(ReturnAndRelease(&change_processor_));
}
« no previous file with comments | « chrome/browser/sync/api/syncable_service_mock.cc ('k') | chrome/browser/sync/glue/new_non_frontend_data_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698