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

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

Issue 1129083003: More base::Values-related bare pointer -> scoped_ptr conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bad merge Created 5 years, 7 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/distiller_unittest.cc
diff --git a/components/dom_distiller/core/distiller_unittest.cc b/components/dom_distiller/core/distiller_unittest.cc
index 31241ec3c582bbd57a5cc40701f49a61ea8183e8..3cfeff00e0d2b7c2c28f7e2035c697e099960f70 100644
--- a/components/dom_distiller/core/distiller_unittest.cc
+++ b/components/dom_distiller/core/distiller_unittest.cc
@@ -530,11 +530,11 @@ TEST_F(DistillerTest, CheckMaxPageLimitExactLimit) {
TEST_F(DistillerTest, SinglePageDistillationFailure) {
base::MessageLoopForUI loop;
// To simulate failure return a null value.
- scoped_ptr<base::Value> nullValue(base::Value::CreateNullValue());
+ scoped_ptr<base::Value> null_value = base::Value::CreateNullValue();
distiller_.reset(
new DistillerImpl(url_fetcher_factory_, DomDistillerOptions()));
DistillPage(kURL,
- CreateMockDistillerPage(nullValue.get(), GURL(kURL)).Pass());
+ CreateMockDistillerPage(null_value.get(), GURL(kURL)).Pass());
base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ("", article_proto_->title());
EXPECT_EQ(0, article_proto_->pages_size());
@@ -553,7 +553,7 @@ TEST_F(DistillerTest, MultiplePagesDistillationFailure) {
distiller_data->distilled_values.begin() + failed_page_num);
distiller_data->distilled_values.insert(
distiller_data->distilled_values.begin() + failed_page_num,
- base::Value::CreateNullValue());
+ base::Value::CreateNullValue().release());
// Expect only calls till the failed page number.
distiller_.reset(
new DistillerImpl(url_fetcher_factory_, DomDistillerOptions()));
« no previous file with comments | « components/dom_distiller/content/distiller_page_web_contents.cc ('k') | components/dom_distiller/ios/distiller_page_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698