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

Unified Diff: chrome/browser/extensions/api/reading_list_private/reading_list_private_apitest.cc

Issue 341563002: Theme Preferences for Distilled Pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor change - dependency order Created 6 years, 5 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/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())

Powered by Google App Engine
This is Rietveld 408576698