Chromium Code Reviews| Index: base/test/launcher/test_results_tracker.cc |
| diff --git a/base/test/launcher/test_results_tracker.cc b/base/test/launcher/test_results_tracker.cc |
| index f36907eefc521b63e1749aa975c6d85efe3375af..1c08c3b165638346bed1f24dbdf3319d50669b61 100644 |
| --- a/base/test/launcher/test_results_tracker.cc |
| +++ b/base/test/launcher/test_results_tracker.cc |
| @@ -382,6 +382,18 @@ bool TestResultsTracker::SaveSummaryAsJSON( |
| } |
| summary_root->Set("per_iteration_data", std::move(per_iteration_data)); |
| + std::unique_ptr<DictionaryValue> test_locations(new DictionaryValue); |
| + for (auto& item : test_locations_) { |
|
Paweł Hajdan Jr.
2016/11/16 08:13:58
nit: const auto&
alex-ac
2016/11/16 08:44:25
Done.
|
| + std::string test_name = item.first; |
| + CodeLocation location = item.second; |
| + std::unique_ptr<DictionaryValue> location_value(new DictionaryValue); |
| + location_value->SetString("file", location.file); |
| + location_value->SetInteger("line", location.line); |
| + test_locations->SetWithoutPathExpansion(test_name, |
| + std::move(location_value)); |
| + } |
| + summary_root->Set("test_locations", std::move(test_locations)); |
| + |
| JSONFileValueSerializer serializer(path); |
| return serializer.Serialize(*summary_root); |
| } |