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

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

Issue 2030013003: Remove ListValue::Append(new {Fundamental,String}Value(...)) pattern in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: chrome/browser/ui/webui/signin/signin_supervised_user_import_handler_unittest.cc
diff --git a/chrome/browser/ui/webui/signin/signin_supervised_user_import_handler_unittest.cc b/chrome/browser/ui/webui/signin/signin_supervised_user_import_handler_unittest.cc
index 0792cbdf58cfcb7aecf4965a59a80e00b022e9da..357bfcef08d89a7f3eea8665794b7f42f896b133 100644
--- a/chrome/browser/ui/webui/signin/signin_supervised_user_import_handler_unittest.cc
+++ b/chrome/browser/ui/webui/signin/signin_supervised_user_import_handler_unittest.cc
@@ -175,8 +175,8 @@ TEST_F(SigninSupervisedUserImportHandlerTest, NotAuthenticated) {
// Test the JS -> C++ -> JS callback path.
base::ListValue list_args;
- list_args.Append(new base::StringValue(kTestCallbackId));
- list_args.Append(new base::StringValue(profile()->GetPath().AsUTF16Unsafe()));
+ list_args.AppendString(kTestCallbackId);
+ list_args.AppendString(profile()->GetPath().AsUTF16Unsafe());
handler()->GetExistingSupervisedUsers(&list_args);
// Expect an error response.
@@ -199,8 +199,8 @@ TEST_F(SigninSupervisedUserImportHandlerTest, AuthError) {
// Test the JS -> C++ -> JS callback path.
base::ListValue list_args;
- list_args.Append(new base::StringValue(kTestCallbackId));
- list_args.Append(new base::StringValue(profile()->GetPath().AsUTF16Unsafe()));
+ list_args.AppendString(kTestCallbackId);
+ list_args.AppendString(profile()->GetPath().AsUTF16Unsafe());
handler()->GetExistingSupervisedUsers(&list_args);
// Expect an error response.
@@ -225,8 +225,8 @@ TEST_F(SigninSupervisedUserImportHandlerTest, CustodianIsSupervised) {
// Test the JS -> C++ -> JS callback path.
base::ListValue list_args;
- list_args.Append(new base::StringValue(kTestCallbackId));
- list_args.Append(new base::StringValue(profile_->GetPath().AsUTF16Unsafe()));
+ list_args.AppendString(kTestCallbackId);
+ list_args.AppendString(profile_->GetPath().AsUTF16Unsafe());
handler()->GetExistingSupervisedUsers(&list_args);
// Expect to do nothing.
@@ -236,8 +236,8 @@ TEST_F(SigninSupervisedUserImportHandlerTest, CustodianIsSupervised) {
TEST_F(SigninSupervisedUserImportHandlerTest, SendExistingSupervisedUsers) {
// Test the JS -> C++ -> JS callback path.
base::ListValue list_args;
- list_args.Append(new base::StringValue(kTestCallbackId));
- list_args.Append(new base::StringValue(profile()->GetPath().AsUTF16Unsafe()));
+ list_args.AppendString(kTestCallbackId);
+ list_args.AppendString(profile()->GetPath().AsUTF16Unsafe());
handler()->GetExistingSupervisedUsers(&list_args);
// Expect a success response.

Powered by Google App Engine
This is Rietveld 408576698