From d9f9219691294710fface354ad0c99b32adf2300 Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Wed, 23 Jun 2010 14:51:32 +0000 Subject: 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 --- chrome_frame/test/reliability/run_all_unittests.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'chrome_frame/test/reliability') 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; } -- cgit v1.1