diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-16 13:43:10 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-16 13:43:10 +0000 |
commit | 9abfae34812add5e6bac420fcd4cc915686afe22 (patch) | |
tree | 76b0c26bc62255ccc15600803b7280dc7dc4de7e /base/process_util_unittest.cc | |
parent | 40ecc904994be903e4a24d26650739275e5f0f4b (diff) | |
download | chromium_src-9abfae34812add5e6bac420fcd4cc915686afe22.zip chromium_src-9abfae34812add5e6bac420fcd4cc915686afe22.tar.gz chromium_src-9abfae34812add5e6bac420fcd4cc915686afe22.tar.bz2 |
This should make ProcessUtilTest.KillSlowChild not-flaky.
There is no need to check process count (which tends to induce flakiness).
In fact, we are already checking all important facts:
- after checking that process handle is a not-null handle we know
that the process started successfully
- after WaitForSingleProcess returns true we know that the process
finished successfully
BUG=8811
Review URL: http://codereview.chromium.org/42224
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11728 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_unittest.cc')
-rw-r--r-- | base/process_util_unittest.cc | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc index 578ac3f..acb60e0 100644 --- a/base/process_util_unittest.cc +++ b/base/process_util_unittest.cc @@ -50,22 +50,13 @@ MULTIPROCESS_TEST_MAIN(SlowChildProcess) { return 0; } -#if defined(OS_WIN) -#define EXE_SUFFIX L".exe" -#else -#define EXE_SUFFIX L"" -#endif - TEST_F(ProcessUtilTest, KillSlowChild) { remove("SlowChildProcess.die"); - int oldcount = GetProcessCount(L"base_unittests" EXE_SUFFIX, 0); ProcessHandle handle = this->SpawnChild(L"SlowChildProcess"); ASSERT_NE(static_cast<ProcessHandle>(NULL), handle); - EXPECT_EQ(oldcount+1, GetProcessCount(L"base_unittests" EXE_SUFFIX, 0)); FILE *fp = fopen("SlowChildProcess.die", "w"); fclose(fp); EXPECT_TRUE(base::WaitForSingleProcess(handle, 5000)); - EXPECT_EQ(oldcount, GetProcessCount(L"base_unittests" EXE_SUFFIX, 0)); base::CloseProcessHandle(handle); } |