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

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: breakpad_dump_location, revert test change 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
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..b6995d4edd2c535789635f7606ffacbf2e1f5dd2 100644
--- a/chrome/test/base/chrome_test_launcher.cc
+++ b/chrome/test/base/chrome_test_launcher.cc
@@ -16,10 +16,13 @@
#include "base/test/test_file_util.h"
#include "chrome/app/chrome_main_delegate.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_paths.h"
#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 +43,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 +115,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);
}

Powered by Google App Engine
This is Rietveld 408576698