summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-05 04:51:53 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-05 04:51:53 +0000
commit630a8b33a1c9bcc369a4666407122ab8d643f13b (patch)
tree310f179ef1a30cfd6522582b0e057fcacca66764 /chrome_frame
parent9d69bb302d6772442ce9cf976a69a5eabe6852c8 (diff)
downloadchromium_src-630a8b33a1c9bcc369a4666407122ab8d643f13b.zip
chromium_src-630a8b33a1c9bcc369a4666407122ab8d643f13b.tar.gz
chromium_src-630a8b33a1c9bcc369a4666407122ab8d643f13b.tar.bz2
GTTF: Do not use the new test launcher for ash_unittests and chrome_frame_tests
This reverts parts of the following CLs committed ~week ago: https://codereview.chromium.org/85503004 https://codereview.chromium.org/86773003 TBR=sky,erikwright BUG=236893 Review URL: https://codereview.chromium.org/105803003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238895 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/test/run_all_unittests.cc52
1 files changed, 18 insertions, 34 deletions
diff --git a/chrome_frame/test/run_all_unittests.cc b/chrome_frame/test/run_all_unittests.cc
index c1deee4..8d42783 100644
--- a/chrome_frame/test/run_all_unittests.cc
+++ b/chrome_frame/test/run_all_unittests.cc
@@ -7,7 +7,6 @@
#include "base/command_line.h"
#include "base/process/kill.h"
#include "base/process/memory.h"
-#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
#include "base/threading/platform_thread.h"
#include "base/win/scoped_com_initializer.h"
@@ -45,17 +44,31 @@ void PureCall() {
__debugbreak();
}
-namespace {
-
-int RunTests(int argc, char** argv) {
+int main(int argc, char **argv) {
// For ATL in VS2010 and up, ChromeFrameUnittestsModule::InitializeCom() is
// not called, so we init COM here.
base::win::ScopedCOMInitializer com_initializer_;
ScopedChromeFrameRegistrar::RegisterAndExitProcessIfDirected();
+ base::EnableTerminationOnHeapCorruption();
+ base::PlatformThread::SetName("ChromeFrame tests");
+
+ _set_purecall_handler(PureCall);
base::TestSuite test_suite(argc, argv);
+ SetConfigBool(kChromeFrameHeadlessMode, true);
+ SetConfigBool(kChromeFrameAccessibleMode, true);
+
+ base::ProcessHandle crash_service = NULL;
+ google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad;
+
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(kNoCrashService)) {
+ crash_service = chrome_frame_test::StartCrashService();
+
+ breakpad.reset(InitializeCrashReporting(HEADLESS));
+ }
+
// Install the log collector before anything else that adds a Google Test
// event listener so that it's the last one to run after each test (the
// listeners are invoked in reverse order at the end of a test). This allows
@@ -88,39 +101,10 @@ int RunTests(int argc, char** argv) {
ret = test_suite.Run();
}
- return ret;
-}
-
-} // namespace
-
-int main(int argc, char **argv) {
- CommandLine::Init(argc, argv);
-
- base::EnableTerminationOnHeapCorruption();
-
- _set_purecall_handler(PureCall);
-
- SetConfigBool(kChromeFrameHeadlessMode, true);
- SetConfigBool(kChromeFrameAccessibleMode, true);
-
- base::ProcessHandle crash_service = NULL;
- google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad;
-
- if (!CommandLine::ForCurrentProcess()->HasSwitch(kNoCrashService)) {
- crash_service = chrome_frame_test::StartCrashService();
-
- breakpad.reset(InitializeCrashReporting(HEADLESS));
- }
-
- int exit_code = base::LaunchUnitTests(argc,
- argv,
- base::Bind(&RunTests, argc, argv));
-
DeleteConfigValue(kChromeFrameHeadlessMode);
DeleteConfigValue(kChromeFrameAccessibleMode);
if (crash_service)
base::KillProcess(crash_service, 0, false);
-
- return exit_code;
+ return ret;
}