| Index: chrome/test/base/chrome_test_launcher.cc
|
| diff --git a/chrome/test/base/chrome_test_launcher.cc b/chrome/test/base/chrome_test_launcher.cc
|
| index a1b317e4a18b901e81696b73ce2d46feeccbb29c..6e59b804c26cde8da2976833a8db98700ec3896f 100644
|
| --- a/chrome/test/base/chrome_test_launcher.cc
|
| +++ b/chrome/test/base/chrome_test_launcher.cc
|
| @@ -19,7 +19,9 @@
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/test/base/chrome_test_suite.h"
|
| #include "chrome/test/base/test_switches.h"
|
| +#include "components/crash/content/app/crashpad.h"
|
| #include "content/public/app/content_main.h"
|
| +#include "content/public/common/content_switches.h"
|
| #include "content/public/test/test_launcher.h"
|
| #include "content/public/test/test_utils.h"
|
| #include "ui/base/test/ui_controls.h"
|
| @@ -40,7 +42,7 @@
|
| #include "ash/test/ui_controls_factory_ash.h"
|
| #endif
|
|
|
| -#if defined(OS_LINUX) || defined(OS_ANDROID)
|
| +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN)
|
| #include "chrome/app/chrome_crash_reporter_client.h"
|
| #endif
|
|
|
| @@ -112,14 +114,22 @@ int LaunchChromeTests(int default_jobs,
|
| chrome_browser_application_mac::RegisterBrowserCrApp();
|
| #endif
|
|
|
| -#if defined(OS_LINUX) || defined(OS_ANDROID)
|
| - // We leak this pointer intentionally. The breakpad client needs to outlive
|
| +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN)
|
| + // We leak this pointer intentionally. The crash client needs to outlive
|
| // all other code.
|
| ChromeCrashReporterClient* crash_client = new ChromeCrashReporterClient();
|
| ANNOTATE_LEAKING_OBJECT_PTR(crash_client);
|
| crash_reporter::SetCrashReporterClient(crash_client);
|
| #endif
|
|
|
| +#if defined(OS_WIN)
|
| + base::CommandLine::Init(0, nullptr);
|
| + std::string process_type =
|
| + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
| + switches::kProcessType);
|
| + crash_reporter::InitializeCrashpad(process_type.empty(), process_type);
|
| +#endif
|
| +
|
| ChromeTestLauncherDelegate launcher_delegate(runner);
|
| return content::LaunchTests(&launcher_delegate, default_jobs, argc, argv);
|
| }
|
|
|