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

Unified Diff: components/dom_distiller/core/task_tracker_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/task_tracker.cc ('k') | components/dom_distiller/core/viewer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/task_tracker_unittest.cc
diff --git a/components/dom_distiller/core/task_tracker_unittest.cc b/components/dom_distiller/core/task_tracker_unittest.cc
index ee90021b3ed2f52532744c9f61f651a8fb472914..83c214749253ee369e4d16a3d93a87b2621799d3 100644
--- a/components/dom_distiller/core/task_tracker_unittest.cc
+++ b/components/dom_distiller/core/task_tracker_unittest.cc
@@ -152,7 +152,8 @@ TEST_F(DomDistillerTaskTrackerTest, TestViewerNotifiedOnDistillationComplete) {
EXPECT_CALL(viewer_delegate, OnArticleReady(_));
- task_tracker.StartDistiller(&distiller_factory);
+ task_tracker.StartDistiller(&distiller_factory,
+ scoped_ptr<DistillerPage>().Pass());
base::RunLoop().RunUntilIdle();
EXPECT_FALSE(cancel_callback.Cancelled());
@@ -175,7 +176,8 @@ TEST_F(DomDistillerTaskTrackerTest,
EXPECT_CALL(save_callback, Save(_, _, _));
- task_tracker.StartDistiller(&distiller_factory);
+ task_tracker.StartDistiller(&distiller_factory,
+ scoped_ptr<DistillerPage>().Pass());
base::RunLoop().RunUntilIdle();
EXPECT_TRUE(cancel_callback.Cancelled());
@@ -248,7 +250,8 @@ TEST_F(DomDistillerTaskTrackerTest, TestBlobFetcherFinishesFirst) {
EXPECT_CALL(*distiller, Die())
.WillOnce(testing::Assign(&distiller_destroyed, true));
- task_tracker.StartDistiller(&distiller_factory);
+ task_tracker.StartDistiller(&distiller_factory,
+ scoped_ptr<DistillerPage>().Pass());
task_tracker.StartBlobFetcher();
base::RunLoop().RunUntilIdle();
@@ -281,7 +284,8 @@ TEST_F(DomDistillerTaskTrackerTest, TestBlobFetcherWithoutBlob) {
base::RunLoop().RunUntilIdle();
task_tracker.StartBlobFetcher();
- task_tracker.StartDistiller(&distiller_factory);
+ task_tracker.StartDistiller(&distiller_factory,
+ scoped_ptr<DistillerPage>().Pass());
// OnArticleReady shouldn't be called until distillation finishes (i.e. the
// blob fetcher shouldn't return distilled content).
@@ -312,10 +316,11 @@ TEST_F(DomDistillerTaskTrackerTest, TestDistillerFailsFirst) {
scoped_ptr<ViewerHandle> handle(task_tracker.AddViewer(&viewer_delegate));
DistilledContentStore::LoadCallback content_store_load_callback;
- EXPECT_CALL(content_store, LoadContent(_, _)).WillOnce(
- testing::SaveArg<1>(&content_store_load_callback));
+ EXPECT_CALL(content_store, LoadContent(_, _))
+ .WillOnce(testing::SaveArg<1>(&content_store_load_callback));
- task_tracker.StartDistiller(&distiller_factory);
+ task_tracker.StartDistiller(&distiller_factory,
+ scoped_ptr<DistillerPage>().Pass());
task_tracker.StartBlobFetcher();
EXPECT_CALL(viewer_delegate, OnArticleReady(_)).Times(0);
@@ -356,7 +361,8 @@ TEST_F(DomDistillerTaskTrackerTest, ContentIsSaved) {
EXPECT_CALL(content_store, SaveContent(_, _, _))
.WillOnce(testing::SaveArg<1>(&stored_distilled_article));
- task_tracker.StartDistiller(&distiller_factory);
+ task_tracker.StartDistiller(&distiller_factory,
+ scoped_ptr<DistillerPage>().Pass());
EXPECT_CALL(viewer_delegate, OnArticleReady(_));
distiller->RunDistillerCallback(scoped_ptr<DistilledArticleProto>(
« no previous file with comments | « components/dom_distiller/core/task_tracker.cc ('k') | components/dom_distiller/core/viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698