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

Side by Side Diff: components/dom_distiller/core/viewer_unittest.cc

Issue 266073003: Add support for distilling current WebContents (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « components/dom_distiller/core/fake_distiller_page.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/dom_distiller/core/viewer.h" 5 #include "components/dom_distiller/core/viewer.h"
6 6
7 #include "components/dom_distiller/core/dom_distiller_service.h" 7 #include "components/dom_distiller/core/dom_distiller_service.h"
8 #include "components/dom_distiller/core/dom_distiller_test_util.h" 8 #include "components/dom_distiller/core/dom_distiller_test_util.h"
9 #include "components/dom_distiller/core/task_tracker.h" 9 #include "components/dom_distiller/core/task_tracker.h"
10 #include "components/dom_distiller/core/url_constants.h" 10 #include "components/dom_distiller/core/url_constants.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 const std::string&) { 55 const std::string&) {
56 return scoped_ptr<ViewerHandle>(ViewEntryImpl()); 56 return scoped_ptr<ViewerHandle>(ViewEntryImpl());
57 } 57 }
58 MOCK_METHOD0(RemoveEntryImpl, ArticleEntry*()); 58 MOCK_METHOD0(RemoveEntryImpl, ArticleEntry*());
59 virtual scoped_ptr<ArticleEntry> RemoveEntry(const std::string&) { 59 virtual scoped_ptr<ArticleEntry> RemoveEntry(const std::string&) {
60 return scoped_ptr<ArticleEntry>(RemoveEntryImpl()); 60 return scoped_ptr<ArticleEntry>(RemoveEntryImpl());
61 } 61 }
62 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPage() { 62 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPage() {
63 return scoped_ptr<DistillerPage>(); 63 return scoped_ptr<DistillerPage>();
64 } 64 }
65 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPageWithHandle(
66 scoped_ptr<SourcePageHandle> handle) {
67 return scoped_ptr<DistillerPage>();
68 }
65 }; 69 };
66 70
67 class DomDistillerViewerTest : public testing::Test { 71 class DomDistillerViewerTest : public testing::Test {
68 public: 72 public:
69 virtual void SetUp() OVERRIDE { 73 virtual void SetUp() OVERRIDE {
70 service_.reset(new TestDomDistillerService()); 74 service_.reset(new TestDomDistillerService());
71 } 75 }
72 76
73 protected: 77 protected:
74 scoped_ptr<ViewerHandle> CreateViewRequest( 78 scoped_ptr<ViewerHandle> CreateViewRequest(
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // Specify an internal Chrome page. 123 // Specify an internal Chrome page.
120 CreateViewRequest("?" + std::string(kUrlKey) + "=chrome%3A%2F%2Fsettings%2F", 124 CreateViewRequest("?" + std::string(kUrlKey) + "=chrome%3A%2F%2Fsettings%2F",
121 view_request_delegate.get()); 125 view_request_delegate.get());
122 // Specify a recursive URL. 126 // Specify a recursive URL.
123 CreateViewRequest("?" + std::string(kUrlKey) + "=" + 127 CreateViewRequest("?" + std::string(kUrlKey) + "=" +
124 std::string(kTestScheme) + "%3A%2F%2Fabc-def%2F", 128 std::string(kTestScheme) + "%3A%2F%2Fabc-def%2F",
125 view_request_delegate.get()); 129 view_request_delegate.get());
126 } 130 }
127 131
128 } // namespace dom_distiller 132 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « components/dom_distiller/core/fake_distiller_page.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698