#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;
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_;
}