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

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

Issue 1310553005: [Sync] Replace ProfileSyncComponentsFactory with SyncClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really fix GN Created 5 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/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 445e482bce00006be6bb83cffec7f0d1e80a37f7..399f88321bcaf45fde6c2d76b945a422d79f7af1 100644
--- a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc
@@ -26,6 +26,7 @@
#include "components/keyed_service/core/refcounted_keyed_service.h"
#include "components/sync_driver/change_processor_mock.h"
#include "components/sync_driver/data_type_controller_mock.h"
+#include "components/sync_driver/fake_sync_client.h"
#include "components/sync_driver/model_associator_mock.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "sync/api/sync_error.h"
@@ -82,12 +83,27 @@ scoped_ptr<KeyedService> BuildHistoryService(content::BrowserContext* profile) {
} // namespace
-class SyncBookmarkDataTypeControllerTest : public testing::Test {
+class SyncBookmarkDataTypeControllerTest : public testing::Test,
+ public sync_driver::FakeSyncClient {
public:
SyncBookmarkDataTypeControllerTest()
: thread_bundle_(content::TestBrowserThreadBundle::DEFAULT),
service_(&profile_) {}
+ // FakeSyncClient overrides.
+ bookmarks::BookmarkModel* GetBookmarkModel() override {
+ return bookmark_model_;
+ }
+ history::HistoryService* GetHistoryService() override {
+ return history_service_;
+ }
+ sync_driver::SyncService* GetSyncService() override {
+ return &service_;
+ }
+ sync_driver::SyncApiComponentFactory* GetSyncApiComponentFactory() override {
+ return profile_sync_factory_.get();
+ }
+
void SetUp() override {
model_associator_ = new ModelAssociatorMock();
change_processor_ = new ChangeProcessorMock();
@@ -97,9 +113,7 @@ class SyncBookmarkDataTypeControllerTest : public testing::Test {
profile_sync_factory_.reset(
new ProfileSyncComponentsFactoryMock(model_associator_,
change_processor_));
- bookmark_dtc_ = new BookmarkDataTypeController(profile_sync_factory_.get(),
- &profile_,
- &service_);
+ bookmark_dtc_ = new BookmarkDataTypeController(this);
}
protected:
« no previous file with comments | « chrome/browser/sync/glue/bookmark_data_type_controller.cc ('k') | chrome/browser/sync/glue/extension_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698