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

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

Issue 1390513002: Remove base::MessageLoop::{Quit,QuitClosure} functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split into small CLs Created 5 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/run_loop.h ('k') | base/threading/thread.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_launcher.h" 5 #include "base/test/launcher/test_launcher.h"
6 6
7 #if defined(OS_POSIX) 7 #if defined(OS_POSIX)
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #endif 9 #endif
10 10
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 ThreadTaskRunnerHandle::Get()->PostTask( 965 ThreadTaskRunnerHandle::Get()->PostTask(
966 FROM_HERE, Bind(&TestLauncher::RunTestIteration, Unretained(this))); 966 FROM_HERE, Bind(&TestLauncher::RunTestIteration, Unretained(this)));
967 } 967 }
968 } 968 }
969 969
970 void TestLauncher::RunTestIteration() { 970 void TestLauncher::RunTestIteration() {
971 const bool stop_on_failure = 971 const bool stop_on_failure =
972 CommandLine::ForCurrentProcess()->HasSwitch(kGTestBreakOnFailure); 972 CommandLine::ForCurrentProcess()->HasSwitch(kGTestBreakOnFailure);
973 if (cycles_ == 0 || 973 if (cycles_ == 0 ||
974 (stop_on_failure && test_success_count_ != test_finished_count_)) { 974 (stop_on_failure && test_success_count_ != test_finished_count_)) {
975 MessageLoop::current()->Quit(); 975 MessageLoop::current()->QuitWhenIdle();
976 return; 976 return;
977 } 977 }
978 978
979 // Special value "-1" means "repeat indefinitely". 979 // Special value "-1" means "repeat indefinitely".
980 cycles_ = (cycles_ == -1) ? cycles_ : cycles_ - 1; 980 cycles_ = (cycles_ == -1) ? cycles_ : cycles_ - 1;
981 981
982 test_started_count_ = 0; 982 test_started_count_ = 0;
983 test_finished_count_ = 0; 983 test_finished_count_ = 0;
984 test_success_count_ = 0; 984 test_success_count_ = 0;
985 test_broken_count_ = 0; 985 test_broken_count_ = 0;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 } 1087 }
1088 1088
1089 std::string snippet(full_output.substr(run_pos)); 1089 std::string snippet(full_output.substr(run_pos));
1090 if (end_pos != std::string::npos) 1090 if (end_pos != std::string::npos)
1091 snippet = full_output.substr(run_pos, end_pos - run_pos); 1091 snippet = full_output.substr(run_pos, end_pos - run_pos);
1092 1092
1093 return snippet; 1093 return snippet;
1094 } 1094 }
1095 1095
1096 } // namespace base 1096 } // namespace base
OLDNEW
« no previous file with comments | « base/run_loop.h ('k') | base/threading/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698