1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_DOM_DISTILLER_CORE_FAKE_DISTILLER_PAGE_H_
6 #define COMPONENTS_DOM_DISTILLER_CORE_FAKE_DISTILLER_PAGE_H_
8 #include "components/dom_distiller/core/distiller_page.h"
9 #include "testing/gmock/include/gmock/gmock.h"
11 namespace dom_distiller
{
14 class MockDistillerPageFactory
: public DistillerPageFactory
{
16 MockDistillerPageFactory();
17 ~MockDistillerPageFactory() override
;
18 MOCK_CONST_METHOD0(CreateDistillerPageImpl
, DistillerPage
*());
19 scoped_ptr
<DistillerPage
> CreateDistillerPage(
20 const gfx::Size
& render_view_size
) const override
{
21 return scoped_ptr
<DistillerPage
>(CreateDistillerPageImpl());
23 scoped_ptr
<DistillerPage
> CreateDistillerPageWithHandle(
24 scoped_ptr
<SourcePageHandle
> handle
) const override
{
25 return scoped_ptr
<DistillerPage
>(CreateDistillerPageImpl());
29 class MockDistillerPage
: public DistillerPage
{
32 ~MockDistillerPage() override
;
33 bool StringifyOutput() override
{ return false; };
34 bool CreateNewContext() override
{ return false; };
35 MOCK_METHOD2(DistillPageImpl
,
36 void(const GURL
& gurl
, const std::string
& script
));
40 } // namespace dom_distiller
42 #endif // COMPONENTS_DOM_DISTILLER_CORE_FAKE_DISTILLER_PAGE_H_