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

Side by Side Diff: base/test/gtest_util.cc

Issue 2285933003: Remove more usage of the base::ListValue::Append(Value*) overload. (Closed)
Patch Set: rebase Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « base/json/json_parser_unittest.cc ('k') | chrome/test/base/javascript_browser_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/test/gtest_util.h" 5 #include "base/test/gtest_util.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 } 43 }
44 return tests; 44 return tests;
45 } 45 }
46 46
47 bool WriteCompiledInTestsToFile(const FilePath& path) { 47 bool WriteCompiledInTestsToFile(const FilePath& path) {
48 std::vector<TestIdentifier> tests(GetCompiledInTests()); 48 std::vector<TestIdentifier> tests(GetCompiledInTests());
49 49
50 ListValue root; 50 ListValue root;
51 for (size_t i = 0; i < tests.size(); ++i) { 51 for (size_t i = 0; i < tests.size(); ++i) {
52 std::unique_ptr<class base::DictionaryValue> test_info(new DictionaryValue); 52 std::unique_ptr<DictionaryValue> test_info(new DictionaryValue);
53 test_info->SetString("test_case_name", tests[i].test_case_name); 53 test_info->SetString("test_case_name", tests[i].test_case_name);
54 test_info->SetString("test_name", tests[i].test_name); 54 test_info->SetString("test_name", tests[i].test_name);
55 test_info->SetString("file", tests[i].file); 55 test_info->SetString("file", tests[i].file);
56 test_info->SetInteger("line", tests[i].line); 56 test_info->SetInteger("line", tests[i].line);
57 root.Append(std::move(test_info)); 57 root.Append(std::move(test_info));
58 } 58 }
59 59
60 JSONFileValueSerializer serializer(path); 60 JSONFileValueSerializer serializer(path);
61 return serializer.Serialize(root); 61 return serializer.Serialize(root);
62 } 62 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 return false; 96 return false;
97 97
98 result.push_back(test_data); 98 result.push_back(test_data);
99 } 99 }
100 100
101 output->swap(result); 101 output->swap(result);
102 return true; 102 return true;
103 } 103 }
104 104
105 } // namespace base 105 } // namespace base
OLDNEW
« no previous file with comments | « base/json/json_parser_unittest.cc ('k') | chrome/test/base/javascript_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698