Index: chrome/browser/extensions/api/reading_list_private/reading_list_private_apitest.cc |
diff --git a/chrome/browser/extensions/api/reading_list_private/reading_list_private_apitest.cc b/chrome/browser/extensions/api/reading_list_private/reading_list_private_apitest.cc |
index fac874c7bf77a0870937ce81fc50934fac1c4561..375ff9961baec574495f0b7d50ba6d9da78f1503 100644 |
--- a/chrome/browser/extensions/api/reading_list_private/reading_list_private_apitest.cc |
+++ b/chrome/browser/extensions/api/reading_list_private/reading_list_private_apitest.cc |
@@ -7,12 +7,14 @@ |
#include "chrome/browser/extensions/extension_apitest.h" |
#include "chrome/browser/profiles/profile.h" |
#include "components/dom_distiller/core/article_entry.h" |
+#include "components/dom_distiller/core/distilled_page_prefs.h" |
#include "components/dom_distiller/core/dom_distiller_service.h" |
#include "components/dom_distiller/core/dom_distiller_store.h" |
#include "components/dom_distiller/core/dom_distiller_test_util.h" |
#include "components/dom_distiller/core/fake_distiller.h" |
#include "components/dom_distiller/core/fake_distiller_page.h" |
#include "components/leveldb_proto/testing/fake_db.h" |
+#include "components/pref_registry/testing_pref_service_syncable.h" |
using dom_distiller::ArticleEntry; |
using dom_distiller::test::FakeDistiller; |
@@ -37,13 +39,22 @@ class ReadingListPrivateApiTest : public ExtensionApiTest { |
MockDistillerFactory* distiller_factory = new MockDistillerFactory(); |
MockDistillerPageFactory* distiller_page_factory = |
new MockDistillerPageFactory(); |
+ |
+ // Setting up pref service for DistilledPagePrefs. |
+ user_prefs::TestingPrefServiceSyncable* pref_service = |
+ new user_prefs::TestingPrefServiceSyncable(); |
+ dom_distiller::DistilledPagePrefs::RegisterProfilePrefs( |
+ pref_service->registry()); |
+ |
DomDistillerContextKeyedService* service = |
new DomDistillerContextKeyedService( |
scoped_ptr<DomDistillerStoreInterface>( |
CreateStoreWithFakeDB(fake_db, |
FakeDB<ArticleEntry>::EntryMap())), |
scoped_ptr<DistillerFactory>(distiller_factory), |
- scoped_ptr<DistillerPageFactory>(distiller_page_factory)); |
+ scoped_ptr<DistillerPageFactory>(distiller_page_factory), |
+ scoped_ptr<dom_distiller::DistilledPagePrefs>( |
+ new dom_distiller::DistilledPagePrefs(pref_service))); |
fake_db->InitCallback(true); |
fake_db->LoadCallback(true); |
EXPECT_CALL(*distiller_factory, CreateDistillerImpl()) |