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

Unified Diff: chrome/test/base/chrome_test_launcher.cc

Issue 1481703002: win: Move Crashpad all into chrome.exe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix and rebase Created 5 years 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
« no previous file with comments | « chrome/test/BUILD.gn ('k') | components/crash/content/app/crashpad_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « chrome/test/BUILD.gn ('k') | components/crash/content/app/crashpad_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698