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

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

Issue 2103333006: Remove calls to deprecated MessageLoop methods in base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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_launcher.h" 5 #include "base/test/launcher/test_launcher.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/environment.h" 12 #include "base/environment.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/files/file_util.h" 14 #include "base/files/file_util.h"
15 #include "base/files/scoped_file.h" 15 #include "base/files/scoped_file.h"
16 #include "base/format_macros.h" 16 #include "base/format_macros.h"
17 #include "base/hash.h" 17 #include "base/hash.h"
18 #include "base/lazy_instance.h" 18 #include "base/lazy_instance.h"
19 #include "base/location.h" 19 #include "base/location.h"
20 #include "base/logging.h" 20 #include "base/logging.h"
21 #include "base/macros.h" 21 #include "base/macros.h"
22 #include "base/message_loop/message_loop.h" 22 #include "base/message_loop/message_loop.h"
23 #include "base/process/kill.h" 23 #include "base/process/kill.h"
24 #include "base/process/launch.h" 24 #include "base/process/launch.h"
25 #include "base/run_loop.h"
25 #include "base/single_thread_task_runner.h" 26 #include "base/single_thread_task_runner.h"
26 #include "base/strings/pattern.h" 27 #include "base/strings/pattern.h"
27 #include "base/strings/string_number_conversions.h" 28 #include "base/strings/string_number_conversions.h"
28 #include "base/strings/string_split.h" 29 #include "base/strings/string_split.h"
29 #include "base/strings/string_util.h" 30 #include "base/strings/string_util.h"
30 #include "base/strings/stringize_macros.h" 31 #include "base/strings/stringize_macros.h"
31 #include "base/strings/stringprintf.h" 32 #include "base/strings/stringprintf.h"
32 #include "base/strings/utf_string_conversions.h" 33 #include "base/strings/utf_string_conversions.h"
33 #include "base/test/gtest_util.h" 34 #include "base/test/gtest_util.h"
34 #include "base/test/launcher/test_results_tracker.h" 35 #include "base/test/launcher/test_results_tracker.h"
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 &controller, 529 &controller,
529 &watcher)); 530 &watcher));
530 #endif // defined(OS_POSIX) 531 #endif // defined(OS_POSIX)
531 532
532 // Start the watchdog timer. 533 // Start the watchdog timer.
533 watchdog_timer_.Reset(); 534 watchdog_timer_.Reset();
534 535
535 ThreadTaskRunnerHandle::Get()->PostTask( 536 ThreadTaskRunnerHandle::Get()->PostTask(
536 FROM_HERE, Bind(&TestLauncher::RunTestIteration, Unretained(this))); 537 FROM_HERE, Bind(&TestLauncher::RunTestIteration, Unretained(this)));
537 538
538 MessageLoop::current()->Run(); 539 RunLoop().Run();
539 540
540 if (requested_cycles != 1) 541 if (requested_cycles != 1)
541 results_tracker_.PrintSummaryOfAllIterations(); 542 results_tracker_.PrintSummaryOfAllIterations();
542 543
543 MaybeSaveSummaryAsJSON(); 544 MaybeSaveSummaryAsJSON();
544 545
545 return run_result_; 546 return run_result_;
546 } 547 }
547 548
548 void TestLauncher::LaunchChildGTestProcess( 549 void TestLauncher::LaunchChildGTestProcess(
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 } 1122 }
1122 1123
1123 std::string snippet(full_output.substr(run_pos)); 1124 std::string snippet(full_output.substr(run_pos));
1124 if (end_pos != std::string::npos) 1125 if (end_pos != std::string::npos)
1125 snippet = full_output.substr(run_pos, end_pos - run_pos); 1126 snippet = full_output.substr(run_pos, end_pos - run_pos);
1126 1127
1127 return snippet; 1128 return snippet;
1128 } 1129 }
1129 1130
1130 } // namespace base 1131 } // namespace base
OLDNEW
« no previous file with comments | « base/synchronization/waitable_event_watcher_unittest.cc ('k') | base/test/power_monitor_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698