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

Side by Side Diff: base/test/launcher/test_results_tracker.cc

Issue 596103002: Fix more disabled MSVC warnings, base/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment Created 6 years, 2 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/test/gtest_xml_util.cc ('k') | base/test/trace_event_analyzer_unittest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/launcher/test_results_tracker.h" 5 #include "base/test/launcher/test_results_tracker.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 current_iteration_data->SetWithoutPathExpansion(j->first, test_results); 281 current_iteration_data->SetWithoutPathExpansion(j->first, test_results);
282 282
283 for (size_t k = 0; k < j->second.test_results.size(); k++) { 283 for (size_t k = 0; k < j->second.test_results.size(); k++) {
284 const TestResult& test_result = j->second.test_results[k]; 284 const TestResult& test_result = j->second.test_results[k];
285 285
286 DictionaryValue* test_result_value = new DictionaryValue; 286 DictionaryValue* test_result_value = new DictionaryValue;
287 test_results->Append(test_result_value); 287 test_results->Append(test_result_value);
288 288
289 test_result_value->SetString("status", test_result.StatusAsString()); 289 test_result_value->SetString("status", test_result.StatusAsString());
290 test_result_value->SetInteger( 290 test_result_value->SetInteger(
291 "elapsed_time_ms", test_result.elapsed_time.InMilliseconds()); 291 "elapsed_time_ms",
292 static_cast<int>(test_result.elapsed_time.InMilliseconds()));
292 293
293 // There are no guarantees about character encoding of the output 294 // There are no guarantees about character encoding of the output
294 // snippet. Escape it and record whether it was losless. 295 // snippet. Escape it and record whether it was losless.
295 // It's useful to have the output snippet as string in the summary 296 // It's useful to have the output snippet as string in the summary
296 // for easy viewing. 297 // for easy viewing.
297 std::string escaped_output_snippet; 298 std::string escaped_output_snippet;
298 bool losless_snippet = EscapeJSONString( 299 bool losless_snippet = EscapeJSONString(
299 test_result.output_snippet, false, &escaped_output_snippet); 300 test_result.output_snippet, false, &escaped_output_snippet);
300 test_result_value->SetString("output_snippet", 301 test_result_value->SetString("output_snippet",
301 escaped_output_snippet); 302 escaped_output_snippet);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 TestResultsTracker::AggregateTestResult::~AggregateTestResult() { 351 TestResultsTracker::AggregateTestResult::~AggregateTestResult() {
351 } 352 }
352 353
353 TestResultsTracker::PerIterationData::PerIterationData() { 354 TestResultsTracker::PerIterationData::PerIterationData() {
354 } 355 }
355 356
356 TestResultsTracker::PerIterationData::~PerIterationData() { 357 TestResultsTracker::PerIterationData::~PerIterationData() {
357 } 358 }
358 359
359 } // namespace base 360 } // namespace base
OLDNEW
« no previous file with comments | « base/test/gtest_xml_util.cc ('k') | base/test/trace_event_analyzer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698