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

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: Fixed styling issues Created 6 years, 2 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/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 7f0196379da56507ea1b8b59f362b64287feff02..2ffadaf9808b3f4a55fd3273059e40cdcd4f5771 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