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

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

Issue 2792573002: Remove base::Value::CreateNullValue (Closed)
Patch Set: Rebase Created 3 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
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 b7eaf9b6004f23ac48d0314c4abe0654c64e326c..1336d7ea940a33a18301fd8e40d68b2e9e935569 100644
--- a/components/dom_distiller/core/distiller_unittest.cc
+++ b/components/dom_distiller/core/distiller_unittest.cc
@@ -17,6 +17,7 @@
#include "base/bind_helpers.h"
#include "base/location.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
@@ -533,7 +534,7 @@ TEST_F(DistillerTest, CheckMaxPageLimitExactLimit) {
TEST_F(DistillerTest, SinglePageDistillationFailure) {
base::MessageLoopForUI loop;
// To simulate failure return a null value.
- std::unique_ptr<base::Value> null_value = base::Value::CreateNullValue();
+ auto null_value = base::MakeUnique<base::Value>();
distiller_.reset(
new DistillerImpl(url_fetcher_factory_, DomDistillerOptions()));
DistillPage(kURL, CreateMockDistillerPage(null_value.get(), GURL(kURL)));
@@ -555,7 +556,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::MakeUnique<base::Value>());
// Expect only calls till the failed page number.
distiller_.reset(
new DistillerImpl(url_fetcher_factory_, DomDistillerOptions()));

Powered by Google App Engine
This is Rietveld 408576698