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

Unified Diff: components/dom_distiller/core/fake_distiller_page.h

Issue 254483003: Start requiring DistillerPage for calls to DomDistillerService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Indent fixes (full git cl format) Created 6 years, 8 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: components/dom_distiller/core/fake_distiller_page.h
diff --git a/components/dom_distiller/core/fake_distiller_page.h b/components/dom_distiller/core/fake_distiller_page.h
new file mode 100644
index 0000000000000000000000000000000000000000..245d23eb8c3266383ee525c9f0be33350eca0ba0
--- /dev/null
+++ b/components/dom_distiller/core/fake_distiller_page.h
@@ -0,0 +1,35 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_DOM_DISTILLER_CORE_FAKE_DISTILLER_PAGE_H_
+#define COMPONENTS_DOM_DISTILLER_CORE_FAKE_DISTILLER_PAGE_H_
+
+#include "components/dom_distiller/core/distiller_page.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace dom_distiller {
+namespace test {
+
+class MockDistillerPageFactory : public DistillerPageFactory {
+ public:
+ MockDistillerPageFactory();
+ virtual ~MockDistillerPageFactory();
+ MOCK_CONST_METHOD0(CreateDistillerPageImpl, DistillerPage*());
+ virtual scoped_ptr<DistillerPage> CreateDistillerPage() const OVERRIDE {
+ return scoped_ptr<DistillerPage>(CreateDistillerPageImpl());
+ }
+};
+
+class MockDistillerPage : public DistillerPage {
+ public:
+ MockDistillerPage();
+ virtual ~MockDistillerPage();
+ MOCK_METHOD2(DistillPageImpl,
+ void(const GURL& gurl, const std::string& script));
+};
+
+} // namespace test
+} // namespace dom_distiller
+
+#endif // COMPONENTS_DOM_DISTILLER_CORE_FAKE_DISTILLER_PAGE_H_
« no previous file with comments | « components/dom_distiller/core/fake_distiller.cc ('k') | components/dom_distiller/core/fake_distiller_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698