summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test/reliability
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/reliability
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/reliability')
-rw-r--r--chrome_frame/test/reliability/run_all_unittests.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome_frame/test/reliability/run_all_unittests.cc b/chrome_frame/test/reliability/run_all_unittests.cc
index 3b23a8a..3b2604d 100644
--- a/chrome_frame/test/reliability/run_all_unittests.cc
+++ b/chrome_frame/test/reliability/run_all_unittests.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,7 +6,9 @@
#include "base/command_line.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome_frame/test/chrome_frame_test_utils.h"
#include "chrome_frame/test_utils.h"
+#include "chrome_frame/utils.h"
const wchar_t kRegisterDllFlag[] = L"register";
@@ -22,6 +24,9 @@ int main(int argc, char **argv) {
// AtExitManager which some of the other stuff below relies on.
ReliabilityTestSuite test_suite(argc, argv);
+ SetConfigBool(kChromeFrameHeadlessMode, true);
+ base::ProcessHandle crash_service = chrome_frame_test::StartCrashService();
+
int result = -1;
if (cmd_line->HasSwitch(kRegisterDllFlag)) {
std::wstring dll_path = cmd_line->GetSwitchValue(kRegisterDllFlag);
@@ -34,6 +39,10 @@ int main(int argc, char **argv) {
result = test_suite.Run();
}
+ DeleteConfigValue(kChromeFrameHeadlessMode);
+ if (crash_service)
+ base::KillProcess(crash_service, 0, false);
+
return result;
}