Make sure webrtc::VideoSource is released when WebRtcVideoTrackAdapter is destroyed.
[chromium-blink-merge.git] / components / dom_distiller / core / fake_distiller_page.h
blob2e88389c2e67d594bbce9894ede50f20035e5353
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 {
12 namespace test {
14 class MockDistillerPageFactory : public DistillerPageFactory {
15 public:
16 MockDistillerPageFactory();
17 virtual ~MockDistillerPageFactory();
18 MOCK_CONST_METHOD0(CreateDistillerPageImpl, DistillerPage*());
19 virtual scoped_ptr<DistillerPage> CreateDistillerPage() const OVERRIDE {
20 return scoped_ptr<DistillerPage>(CreateDistillerPageImpl());
22 virtual scoped_ptr<DistillerPage> CreateDistillerPageWithHandle(
23 scoped_ptr<SourcePageHandle> handle) const OVERRIDE {
24 return scoped_ptr<DistillerPage>(CreateDistillerPageImpl());
28 class MockDistillerPage : public DistillerPage {
29 public:
30 MockDistillerPage();
31 virtual ~MockDistillerPage();
32 MOCK_METHOD2(DistillPageImpl,
33 void(const GURL& gurl, const std::string& script));
36 } // namespace test
37 } // namespace dom_distiller
39 #endif // COMPONENTS_DOM_DISTILLER_CORE_FAKE_DISTILLER_PAGE_H_