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

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

Issue 442503002: Retrieve article original URL from entryID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: string reference Created 6 years, 4 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/url_utils_unittest.cc ('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/distilled_page_prefs.h" 7 #include "components/dom_distiller/core/distilled_page_prefs.h"
8 #include "components/dom_distiller/core/dom_distiller_service.h" 8 #include "components/dom_distiller/core/dom_distiller_service.h"
9 #include "components/dom_distiller/core/dom_distiller_test_util.h" 9 #include "components/dom_distiller/core/dom_distiller_test_util.h"
10 #include "components/dom_distiller/core/task_tracker.h" 10 #include "components/dom_distiller/core/task_tracker.h"
(...skipping 21 matching lines...) Expand all
32 MOCK_METHOD3(AddToList, 32 MOCK_METHOD3(AddToList,
33 const std::string(const GURL&, 33 const std::string(const GURL&,
34 DistillerPage*, 34 DistillerPage*,
35 const ArticleAvailableCallback&)); 35 const ArticleAvailableCallback&));
36 virtual const std::string AddToList( 36 virtual const std::string AddToList(
37 const GURL& url, 37 const GURL& url,
38 scoped_ptr<DistillerPage> distiller_page, 38 scoped_ptr<DistillerPage> distiller_page,
39 const ArticleAvailableCallback& article_cb) { 39 const ArticleAvailableCallback& article_cb) {
40 return AddToList(url, distiller_page.get(), article_cb); 40 return AddToList(url, distiller_page.get(), article_cb);
41 } 41 }
42 MOCK_METHOD1(HasEntry, bool(const std::string&));
43 MOCK_METHOD1(GetUrlForEntry, std::string(const std::string&));
42 MOCK_CONST_METHOD0(GetEntries, std::vector<ArticleEntry>()); 44 MOCK_CONST_METHOD0(GetEntries, std::vector<ArticleEntry>());
43 MOCK_METHOD1(AddObserver, void(DomDistillerObserver*)); 45 MOCK_METHOD1(AddObserver, void(DomDistillerObserver*));
44 MOCK_METHOD1(RemoveObserver, void(DomDistillerObserver*)); 46 MOCK_METHOD1(RemoveObserver, void(DomDistillerObserver*));
45 MOCK_METHOD0(ViewUrlImpl, ViewerHandle*()); 47 MOCK_METHOD0(ViewUrlImpl, ViewerHandle*());
46 virtual scoped_ptr<ViewerHandle> ViewUrl( 48 virtual scoped_ptr<ViewerHandle> ViewUrl(
47 ViewRequestDelegate*, 49 ViewRequestDelegate*,
48 scoped_ptr<DistillerPage> distiller_page, 50 scoped_ptr<DistillerPage> distiller_page,
49 const GURL&) { 51 const GURL&) {
50 return scoped_ptr<ViewerHandle>(ViewUrlImpl()); 52 return scoped_ptr<ViewerHandle>(ViewUrlImpl());
51 } 53 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 0); 147 0);
146 EXPECT_EQ(kLightJs.compare(viewer::GetDistilledPageThemeJs( 148 EXPECT_EQ(kLightJs.compare(viewer::GetDistilledPageThemeJs(
147 DistilledPagePrefs::LIGHT)), 149 DistilledPagePrefs::LIGHT)),
148 0); 150 0);
149 EXPECT_EQ(kSepiaJs.compare(viewer::GetDistilledPageThemeJs( 151 EXPECT_EQ(kSepiaJs.compare(viewer::GetDistilledPageThemeJs(
150 DistilledPagePrefs::SEPIA)), 152 DistilledPagePrefs::SEPIA)),
151 0); 153 0);
152 } 154 }
153 155
154 } // namespace dom_distiller 156 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « components/dom_distiller/core/url_utils_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698