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

Unified Diff: chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc

Issue 2814363006: Reland of Stop passing raw pointers to base::Value API in c/b/ui (Closed)
Patch Set: std::move 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: chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc
diff --git a/chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc b/chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc
index c1373ebb83700bd4920ff8b8cacc84bec1f71963..0fadf5e535b6cc1286b0e3e5d862aa22059d44df 100644
--- a/chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc
+++ b/chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/webui/signin/sync_confirmation_handler.h"
+#include "base/memory/ptr_util.h"
#include "base/test/user_action_tester.h"
#include "base/values.h"
#include "chrome/browser/profiles/profile_avatar_icon_util.h"
@@ -189,7 +190,7 @@ TEST_F(SyncConfirmationHandlerTest, TestSetImageIfPrimaryAccountReady) {
"http://picture.example.com/picture.jpg");
base::ListValue args;
- args.Set(0, new base::Value(kDefaultDialogHeight));
+ args.Set(0, base::MakeUnique<base::Value>(kDefaultDialogHeight));
handler()->HandleInitializedWithSize(&args);
EXPECT_EQ(2U, web_ui()->call_data().size());
@@ -218,7 +219,7 @@ TEST_F(SyncConfirmationHandlerTest, TestSetImageIfPrimaryAccountReady) {
TEST_F(SyncConfirmationHandlerTest, TestSetImageIfPrimaryAccountReadyLater) {
base::ListValue args;
- args.Set(0, new base::Value(kDefaultDialogHeight));
+ args.Set(0, base::MakeUnique<base::Value>(kDefaultDialogHeight));
handler()->HandleInitializedWithSize(&args);
EXPECT_EQ(2U, web_ui()->call_data().size());
@@ -270,7 +271,7 @@ TEST_F(SyncConfirmationHandlerTest, TestSetImageIfPrimaryAccountReadyLater) {
TEST_F(SyncConfirmationHandlerTest,
TestSetImageIgnoredIfSecondaryAccountUpdated) {
base::ListValue args;
- args.Set(0, new base::Value(kDefaultDialogHeight));
+ args.Set(0, base::MakeUnique<base::Value>(kDefaultDialogHeight));
handler()->HandleInitializedWithSize(&args);
EXPECT_EQ(2U, web_ui()->call_data().size());

Powered by Google App Engine
This is Rietveld 408576698