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 7911ff9d7ef97c73f1706ac74b502012b8ef610c..a9faef6eee40a791a0faa75abf1637ed0b4724e8 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 |
@@ -11,6 +11,7 @@ |
#include "components/dom_distiller/core/dom_distiller_test_util.h" |
#include "components/dom_distiller/core/fake_db.h" |
#include "components/dom_distiller/core/fake_distiller.h" |
+#include "components/dom_distiller/core/fake_distiller_page.h" |
using dom_distiller::test::FakeDB; |
using dom_distiller::test::FakeDistiller; |
@@ -18,30 +19,39 @@ using dom_distiller::test::util::CreateStoreWithFakeDB; |
using dom_distiller::DomDistillerContextKeyedService; |
using dom_distiller::DomDistillerService; |
using dom_distiller::DistillerFactory; |
+using dom_distiller::DistillerPageFactory; |
using dom_distiller::DomDistillerStoreInterface; |
using dom_distiller::test::MockDistillerFactory; |
+using dom_distiller::test::MockDistillerPage; |
+using dom_distiller::test::MockDistillerPageFactory; |
class ReadingListPrivateApiTest : public ExtensionApiTest { |
public: |
static KeyedService* Build(content::BrowserContext* context) { |
FakeDB* fake_db = new FakeDB(new FakeDB::EntryMap); |
FakeDistiller* distiller = new FakeDistiller(true); |
- MockDistillerFactory* factory = new MockDistillerFactory(); |
+ MockDistillerPage* distiller_page = new MockDistillerPage(); |
+ MockDistillerFactory* distiller_factory = new MockDistillerFactory(); |
+ MockDistillerPageFactory* distiller_page_factory = |
+ new MockDistillerPageFactory(); |
DomDistillerContextKeyedService* service = |
new DomDistillerContextKeyedService( |
scoped_ptr<DomDistillerStoreInterface>( |
CreateStoreWithFakeDB(fake_db, FakeDB::EntryMap())), |
- scoped_ptr<DistillerFactory>(factory)); |
+ scoped_ptr<DistillerFactory>(distiller_factory), |
+ scoped_ptr<DistillerPageFactory>(distiller_page_factory)); |
fake_db->InitCallback(true); |
fake_db->LoadCallback(true); |
- EXPECT_CALL(*factory, CreateDistillerImpl()) |
+ EXPECT_CALL(*distiller_factory, CreateDistillerImpl()) |
.WillOnce(testing::Return(distiller)); |
+ EXPECT_CALL(*distiller_page_factory, CreateDistillerPageImpl()) |
+ .WillOnce(testing::Return(distiller_page)); |
return service; |
} |
}; |
IN_PROC_BROWSER_TEST_F(ReadingListPrivateApiTest, ReadingListPrivate) { |
dom_distiller::DomDistillerServiceFactory::GetInstance()->SetTestingFactory( |
- profile(), &ReadingListPrivateApiTest::Build); |
+ profile(), &ReadingListPrivateApiTest::Build); |
ASSERT_TRUE(RunComponentExtensionTest("reading_list_private")) << message_; |
} |