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

Unified Diff: components/dom_distiller/core/viewer_unittest.cc

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
« no previous file with comments | « components/dom_distiller/core/viewer.cc ('k') | components/dom_distiller/standalone/content_extractor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/viewer_unittest.cc
diff --git a/components/dom_distiller/core/viewer_unittest.cc b/components/dom_distiller/core/viewer_unittest.cc
index 66af2eda94008008327adc1e238ace234e07ca47..b0cea2a731e42685adfc9f880aceab0722ed45e1 100644
--- a/components/dom_distiller/core/viewer_unittest.cc
+++ b/components/dom_distiller/core/viewer_unittest.cc
@@ -28,24 +28,40 @@ class TestDomDistillerService : public DomDistillerServiceInterface {
virtual ~TestDomDistillerService() {}
MOCK_CONST_METHOD0(GetSyncableService, syncer::SyncableService*());
- MOCK_METHOD2(AddToList,
- const std::string(const GURL&, const ArticleAvailableCallback&));
+ MOCK_METHOD3(AddToList,
+ const std::string(const GURL&,
+ DistillerPage*,
+ const ArticleAvailableCallback&));
+ virtual const std::string AddToList(
+ const GURL& url,
+ scoped_ptr<DistillerPage> distiller_page,
+ const ArticleAvailableCallback& article_cb) {
+ return AddToList(url, distiller_page.get(), article_cb);
+ }
MOCK_CONST_METHOD0(GetEntries, std::vector<ArticleEntry>());
MOCK_METHOD1(AddObserver, void(DomDistillerObserver*));
MOCK_METHOD1(RemoveObserver, void(DomDistillerObserver*));
MOCK_METHOD0(ViewUrlImpl, ViewerHandle*());
- virtual scoped_ptr<ViewerHandle> ViewUrl(ViewRequestDelegate*, const GURL&) {
+ virtual scoped_ptr<ViewerHandle> ViewUrl(
+ ViewRequestDelegate*,
+ scoped_ptr<DistillerPage> distiller_page,
+ const GURL&) {
return scoped_ptr<ViewerHandle>(ViewUrlImpl());
}
MOCK_METHOD0(ViewEntryImpl, ViewerHandle*());
- virtual scoped_ptr<ViewerHandle> ViewEntry(ViewRequestDelegate*,
- const std::string&) {
+ virtual scoped_ptr<ViewerHandle> ViewEntry(
+ ViewRequestDelegate*,
+ scoped_ptr<DistillerPage> distiller_page,
+ const std::string&) {
return scoped_ptr<ViewerHandle>(ViewEntryImpl());
}
MOCK_METHOD0(RemoveEntryImpl, ArticleEntry*());
virtual scoped_ptr<ArticleEntry> RemoveEntry(const std::string&) {
return scoped_ptr<ArticleEntry>(RemoveEntryImpl());
}
+ virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPage() {
+ return scoped_ptr<DistillerPage>();
+ }
};
class DomDistillerViewerTest : public testing::Test {
« no previous file with comments | « components/dom_distiller/core/viewer.cc ('k') | components/dom_distiller/standalone/content_extractor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698