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

Unified Diff: chrome/test/base/javascript_browser_test.cc

Issue 2285933003: Remove more usage of the base::ListValue::Append(Value*) overload. (Closed)
Patch Set: rebase Created 4 years, 4 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 | « base/test/gtest_util.cc ('k') | chrome/test/chromedriver/chrome/automation_extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/javascript_browser_test.cc
diff --git a/chrome/test/base/javascript_browser_test.cc b/chrome/test/base/javascript_browser_test.cc
index 022956d460117900ac5cd1793b3c79df0c96a140..880bd757b536f07cce291e749d609e41999b827d 100644
--- a/chrome/test/base/javascript_browser_test.cc
+++ b/chrome/test/base/javascript_browser_test.cc
@@ -112,11 +112,8 @@ base::string16 JavaScriptBrowserTest::BuildRunTestJSCall(
arguments.push_back(function_name_arg);
base::ListValue* baked_argument_list = new base::ListValue();
ConstValueVector::const_iterator arguments_iterator;
- for (arguments_iterator = test_func_args.begin();
- arguments_iterator != test_func_args.end();
- ++arguments_iterator) {
- baked_argument_list->Append((*arguments_iterator)->DeepCopy());
- }
+ for (auto* arg : test_func_args)
+ baked_argument_list->Append(arg->CreateDeepCopy());
arguments.push_back(baked_argument_list);
return content::WebUI::GetJavascriptCall(std::string("runTest"),
arguments.get());
« no previous file with comments | « base/test/gtest_util.cc ('k') | chrome/test/chromedriver/chrome/automation_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698