Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1484)

Unified Diff: chrome_frame/test/run_all_unittests.cc

Issue 126143005: Remove Chrome Frame code and resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to r244038 Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome_frame/test/run_all_unittests.cc
diff --git a/chrome_frame/test/run_all_unittests.cc b/chrome_frame/test/run_all_unittests.cc
deleted file mode 100644
index 8d4278343b6bc6f7f437e2b4148949aee37e5966..0000000000000000000000000000000000000000
--- a/chrome_frame/test/run_all_unittests.cc
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (c) 2012 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.
-
-#include <atlbase.h>
-
-#include "base/command_line.h"
-#include "base/process/kill.h"
-#include "base/process/memory.h"
-#include "base/test/test_suite.h"
-#include "base/threading/platform_thread.h"
-#include "base/win/scoped_com_initializer.h"
-#include "chrome/common/chrome_paths.h"
-#include "chrome/test/logging/win/test_log_collector.h"
-#include "chrome_frame/crash_server_init.h"
-#include "chrome_frame/test/chrome_frame_test_utils.h"
-#include "chrome_frame/test/chrome_frame_ui_test_utils.h"
-#include "chrome_frame/test/ie_configurator.h"
-#include "chrome_frame/test/test_scrubber.h"
-#include "chrome_frame/test_utils.h"
-#include "chrome_frame/utils.h"
-#include "components/variations/entropy_provider.h"
-
-// To enable ATL-based code to run in this module
-class ChromeFrameUnittestsModule
- : public CAtlExeModuleT<ChromeFrameUnittestsModule> {
- public:
- // Called at static init time, for versions of ATL included in VS2008 and
- // earlier only. The default implementation initializes COM in MTA mode,
- // which we don't want. We could init STA mode here, but since we have to
- // init in main() for VS2010 and above anyway, we simply do nothing, since
- // nothing needs COM before main() runs.
- static HRESULT InitializeCom() { return S_OK; }
- static void UninitializeCom() {}
-};
-
-ChromeFrameUnittestsModule _AtlModule;
-
-const char kNoCrashService[] = "no-crash-service";
-const char kNoLogCollector[] = "no-log-collector";
-const char kNoRegistrationSwitch[] = "no-registration";
-
-void PureCall() {
- __debugbreak();
-}
-
-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
- // the collector to emit logs if other listeners ADD_FAILURE or EXPECT_*.
- if (!CommandLine::ForCurrentProcess()->HasSwitch(kNoLogCollector))
- logging_win::InstallTestLogCollector(testing::UnitTest::GetInstance());
-
- chrome_frame_test::InstallIEConfigurator();
-
- chrome_frame_test::InstallTestScrubber(testing::UnitTest::GetInstance());
-
- int ret = -1;
- // If mini_installer is used to register CF, we use the switch
- // --no-registration to avoid repetitive registration.
- if (CommandLine::ForCurrentProcess()->HasSwitch(kNoRegistrationSwitch)) {
- ret = test_suite.Run();
- } else {
- // 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
- // AtExitManager.
- // TODO(robertshield): Make these tests restore the original registration
- // once done.
- ScopedChromeFrameRegistrar registrar(chrome_frame_test::GetTestBedType());
-
- // Register IAccessible2 proxy stub DLL, needed for some tests.
- ScopedChromeFrameRegistrar ia2_registrar(
- chrome_frame_test::GetIAccessible2ProxyStubPath().value(),
- ScopedChromeFrameRegistrar::SYSTEM_LEVEL);
- ret = test_suite.Run();
- }
-
- DeleteConfigValue(kChromeFrameHeadlessMode);
- DeleteConfigValue(kChromeFrameAccessibleMode);
-
- if (crash_service)
- base::KillProcess(crash_service, 0, false);
- return ret;
-}
« no previous file with comments | « chrome_frame/test/reliability/run_all_unittests.cc ('k') | chrome_frame/test/simple_resource_loader_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698