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

Unified Diff: chrome/common/ipc_tests.cc

Issue 18003: Call logging::InitLogging. The lack of this was causing some hangs (and poss... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | « base/test_suite.h ('k') | chrome/installer/util/run_all_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/ipc_tests.cc
===================================================================
--- chrome/common/ipc_tests.cc (revision 7931)
+++ chrome/common/ipc_tests.cc (working copy)
@@ -16,8 +16,7 @@
#include "base/command_line.h"
#include "base/debug_on_start.h"
#include "base/perftimer.h"
-#include "base/process_util.h"
-#include "base/scoped_nsautorelease_pool.h"
+#include "base/perf_test_suite.h"
#include "base/test_suite.h"
#include "base/thread.h"
#include "chrome/common/chrome_switches.h"
@@ -435,41 +434,11 @@
#endif // PERFORMANCE_TEST
-#if defined(OS_WIN)
-// All fatal log messages (e.g. DCHECK failures) imply unit test failures
-static void IPCTestAssertHandler(const std::string& str) {
- FAIL() << str;
-}
-
-// Disable crash dialogs so that it doesn't gum up the buildbot
-static void SuppressErrorDialogs() {
- UINT new_flags = SEM_FAILCRITICALERRORS |
- SEM_NOGPFAULTERRORBOX |
- SEM_NOOPENFILEERRORBOX;
-
- // Preserve existing error mode, as discussed at http://t/dmea
- UINT existing_flags = SetErrorMode(new_flags);
- SetErrorMode(existing_flags | new_flags);
-}
-#endif // defined(OS_WIN)
-
int main(int argc, char** argv) {
- base::ScopedNSAutoreleasePool scoped_pool;
- base::EnableTerminationOnHeapCorruption();
-
-#if defined(OS_WIN)
- // suppress standard crash dialogs and such unless a debugger is present.
- if (!IsDebuggerPresent()) {
- SuppressErrorDialogs();
- logging::SetLogAssertHandler(IPCTestAssertHandler);
- }
-#endif // defined(OS_WIN)
-
- int retval = TestSuite(argc, argv).Run();
-
#ifdef PERFORMANCE_TEST
- if (!InitPerfLog("ipc_perf_child.log"))
- return 1;
+ int retval = PerfTestSuite(argc, argv).Run();
+#else
+ int retval = TestSuite(argc, argv).Run();
#endif
return retval;
}
« no previous file with comments | « base/test_suite.h ('k') | chrome/installer/util/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698