summaryrefslogtreecommitdiffstats
path: root/base/process_util_unittest.cc
diff options
context:
space:
mode:
authorerikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-13 22:35:10 +0000
committererikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-13 22:35:10 +0000
commit302831b6e4e9d8a700ecbea7616f1879898bbfb9 (patch)
tree1325149eae7db9f1a302801d275ae9761b1aebf1 /base/process_util_unittest.cc
parentd3f6b195024afbf311e9eff816ebe17d853d9ab8 (diff)
downloadchromium_src-302831b6e4e9d8a700ecbea7616f1879898bbfb9.zip
chromium_src-302831b6e4e9d8a700ecbea7616f1879898bbfb9.tar.gz
chromium_src-302831b6e4e9d8a700ecbea7616f1879898bbfb9.tar.bz2
Call logging::InitLogging. The lack of this was causing some hangs (and possibly crashes) in ObserverListTest.BUG=6286
This CL has expanded to include some cleanup and refactoring of test_suite and related files, so that this logging change (and other improvements) are applied to all unit tests. Review URL: http://codereview.chromium.org/18003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7977 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_unittest.cc')
-rw-r--r--base/process_util_unittest.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc
index 5723a83..a6eb8a7 100644
--- a/base/process_util_unittest.cc
+++ b/base/process_util_unittest.cc
@@ -158,11 +158,13 @@ MULTIPROCESS_TEST_MAIN(ProcessUtilsLeakFDChildProcess) {
}
}
+ // InitLogging always opens a file at startup.
+ int expected_num_open_fds = 1;
#if defined(OS_LINUX)
// On Linux, '/etc/localtime' is opened before the test's main() enters.
- const int expected_num_open_fds = 1;
- num_open_files -= expected_num_open_fds;
+ expected_num_open_fds += 1;
#endif // defined(OS_LINUX)
+ num_open_files -= expected_num_open_fds;
write(write_pipe, &num_open_files, sizeof(num_open_files));
close(write_pipe);