summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test/run_all_unittests.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-23 14:51:32 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-23 14:51:32 +0000
commitd9f9219691294710fface354ad0c99b32adf2300 (patch)
treed3514bc9be228415693381013d19c4b3ba5b9e74 /chrome_frame/test/run_all_unittests.cc
parent27ebf26a77cd8e69c7216331ad690d9bed06c720 (diff)
downloadchromium_src-d9f9219691294710fface354ad0c99b32adf2300.zip
chromium_src-d9f9219691294710fface354ad0c99b32adf2300.tar.gz
chromium_src-d9f9219691294710fface354ad0c99b32adf2300.tar.bz2
Ensure that the ChromeFrame reliability and perf tests startup in headless mode and also start crash_service.exe, which
would serve as the crash handler for the duration of the test runs. This ensures that the tests don't hang for 60 seconds while unloading the chrome frame dll which waits for the exception handler code to uninitialize which blocks on machines which don't have the official crash server running. Review URL: http://codereview.chromium.org/2810024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50594 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test/run_all_unittests.cc')
-rw-r--r--chrome_frame/test/run_all_unittests.cc27
1 files changed, 2 insertions, 25 deletions
diff --git a/chrome_frame/test/run_all_unittests.cc b/chrome_frame/test/run_all_unittests.cc
index fccdd5e..427fd84 100644
--- a/chrome_frame/test/run_all_unittests.cc
+++ b/chrome_frame/test/run_all_unittests.cc
@@ -15,6 +15,7 @@
#include "base/command_line.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome_frame/test/chrome_frame_test_utils.h"
#include "chrome_frame/test/http_server.h"
#include "chrome_frame/test_utils.h"
#include "chrome_frame/utils.h"
@@ -36,30 +37,6 @@ const wchar_t kNoRegistrationSwitch[] = L"no-registration";
// server is killed. Useful for debugging tests.
const wchar_t kRunAsServer[] = L"server";
-base::ProcessHandle LoadCrashService() {
- FilePath exe_dir;
- if (!PathService::Get(base::DIR_EXE, &exe_dir)) {
- DCHECK(false);
- return NULL;
- }
-
- base::ProcessHandle crash_service = NULL;
-
- FilePath crash_service_path = exe_dir.AppendASCII("crash_service.exe");
- if (!base::LaunchApp(crash_service_path.value(), false, false,
- &crash_service)) {
- printf("Couldn't start crash_service.exe, so this test run won't tell " \
- "you if any test crashes!\n");
- return NULL;
- }
-
- printf("Started crash_service.exe so you know if a test crashes!\n");
- // This sleep is to ensure that the crash service is done initializing, i.e
- // the pipe creation, etc.
- Sleep(500);
- return crash_service;
-}
-
void PureCall() {
__debugbreak();
}
@@ -93,7 +70,7 @@ int main(int argc, char **argv) {
SetConfigBool(kChromeFrameHeadlessMode, true);
- base::ProcessHandle crash_service = LoadCrashService();
+ base::ProcessHandle crash_service = chrome_frame_test::StartCrashService();
int ret = -1;
// If mini_installer is used to register CF, we use the switch
// --no-registration to avoid repetitive registration.