diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-11 02:10:19 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-11 02:10:19 +0000 |
commit | 460a8e266f3f553ed175ceffa83e3a38a51fe08a (patch) | |
tree | 8153c254fbee8ff27cddba7205784378ca6e73c3 /chrome_frame | |
parent | 1c8427ebba2221442d739c0369f71733d1a8926a (diff) | |
download | chromium_src-460a8e266f3f553ed175ceffa83e3a38a51fe08a.zip chromium_src-460a8e266f3f553ed175ceffa83e3a38a51fe08a.tar.gz chromium_src-460a8e266f3f553ed175ceffa83e3a38a51fe08a.tar.bz2 |
Revert 70981 - Relanding this patch.
Prevent extract build failures on the ChromeFrame builders caused when the chrome frame
tests executable crashes while running a test by register an exception handler
and terminating the relevant processes.
BUG=none
TEST=none
TBR=amit
Review URL: http://codereview.chromium.org/6130006
TBR=ananta@chromium.org
Review URL: http://codereview.chromium.org/6139007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70987 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/test/run_all_unittests.cc | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/chrome_frame/test/run_all_unittests.cc b/chrome_frame/test/run_all_unittests.cc index 14add80..694c6c0 100644 --- a/chrome_frame/test/run_all_unittests.cc +++ b/chrome_frame/test/run_all_unittests.cc @@ -31,35 +31,13 @@ void PureCall() { __debugbreak(); } -// This class implements the Run method and registers an exception handler to -// ensure that any ChromeFrame processes like IE, Firefox, etc are terminated -// if there is a crash in the chrome frame test suite. -class ChromeFrameTestSuite : public base::TestSuite { - public: - ChromeFrameTestSuite(int argc, char** argv) - : base::TestSuite(argc, argv) {} - - int Run() { - int ret = -1; - __try { - ret = base::TestSuite::Run(); - } - _except(EXCEPTION_EXECUTE_HANDLER) { - LOG(ERROR) << "ChromeFrame tests crashed"; - chrome_frame_test::KillProcesses(L"iexplore.exe", 0, false); - chrome_frame_test::KillProcesses(L"firefox.exe", 0, false); - } - return ret; - } -}; - int main(int argc, char **argv) { base::EnableTerminationOnHeapCorruption(); base::PlatformThread::SetName("ChromeFrame tests"); _set_purecall_handler(PureCall); - ChromeFrameTestSuite test_suite(argc, argv); + TestSuite test_suite(argc, argv); SetConfigBool(kChromeFrameHeadlessMode, true); SetConfigBool(kChromeFrameAccessibleMode, true); @@ -73,6 +51,7 @@ int main(int argc, char **argv) { } else { // Register paths needed by the ScopedChromeFrameRegistrar. chrome::RegisterPathProvider(); + // This will register the chrome frame in the build directory. It currently // leaves that chrome frame registered once the tests are done. It must be // constructed AFTER the TestSuite is created since TestSuites create THE |