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

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

Issue 573553004: Eliminate NOTIFICATION_HISTORY_LOADED notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ScopedObserver to InMemoryHistoryBackend,PrerenderLocalPredictor,ChromeTemplateURLServiceClient Created 6 years, 1 month 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/bookmark_data_type_controller_unittest.cc
diff --git a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
index 7abd90bab9f06bd5e3441f9f3a995a612d64ce3c..4f526ed4951682a032cac666a90cb4e555370278 100644
--- a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
@@ -163,6 +163,10 @@ class SyncBookmarkDataTypeControllerTest : public testing::Test {
base::Unretained(&start_callback_)));
}
+ void NotifyHistoryServiceLoaded() {
+ history_service_->NotifyHistoryServiceLoaded();
+ }
+
content::TestBrowserThreadBundle thread_bundle_;
scoped_refptr<BookmarkDataTypeController> bookmark_dtc_;
scoped_ptr<ProfileSyncComponentsFactoryMock> profile_sync_factory_;
@@ -230,10 +234,7 @@ TEST_F(SyncBookmarkDataTypeControllerTest, StartHistoryServiceNotReady) {
EXPECT_CALL(*history_service_, BackendLoaded()).WillRepeatedly(Return(true));
// Send the notification that the history service has finished loading the db.
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_HISTORY_LOADED,
- content::Source<Profile>(&profile_),
- content::NotificationService::NoDetails());
+ NotifyHistoryServiceLoaded();
EXPECT_EQ(DataTypeController::MODEL_LOADED, bookmark_dtc_->state());
}

Powered by Google App Engine
This is Rietveld 408576698