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

Unified Diff: base/process_util_unittest.cc

Issue 7044048: GTTF: Initialize TestTimeouts in out-of-process test runner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/test/test_timeouts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_unittest.cc
===================================================================
--- base/process_util_unittest.cc (revision 88117)
+++ base/process_util_unittest.cc (working copy)
@@ -59,9 +59,6 @@
const int kExpectedStillRunningExitCode = 0;
#endif
-// The longest we'll wait for a process, in milliseconds.
-const int kMaxWaitTimeMs = TestTimeouts::action_max_timeout_ms();
-
// Sleeps until file filename is created.
void WaitToDie(const char* filename) {
FILE *fp;
@@ -94,7 +91,7 @@
base::PlatformThread::Sleep(kIntervalMs);
waited += kIntervalMs;
} while (status == base::TERMINATION_STATUS_STILL_RUNNING &&
- waited < kMaxWaitTimeMs);
+ waited < TestTimeouts::action_max_timeout_ms());
return status;
}
@@ -116,7 +113,8 @@
TEST_F(ProcessUtilTest, SpawnChild) {
base::ProcessHandle handle = this->SpawnChild("SimpleChildProcess", false);
ASSERT_NE(base::kNullProcessHandle, handle);
- EXPECT_TRUE(base::WaitForSingleProcess(handle, kMaxWaitTimeMs));
+ EXPECT_TRUE(base::WaitForSingleProcess(
+ handle, TestTimeouts::action_max_timeout_ms()));
base::CloseProcessHandle(handle);
}
@@ -130,7 +128,8 @@
base::ProcessHandle handle = this->SpawnChild("SlowChildProcess", false);
ASSERT_NE(base::kNullProcessHandle, handle);
SignalChildren(kSignalFileSlow);
- EXPECT_TRUE(base::WaitForSingleProcess(handle, kMaxWaitTimeMs));
+ EXPECT_TRUE(base::WaitForSingleProcess(
+ handle, TestTimeouts::action_max_timeout_ms()));
base::CloseProcessHandle(handle);
remove(kSignalFileSlow);
}
« no previous file with comments | « no previous file | base/test/test_timeouts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698