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

Unified Diff: apps/app_shim/chrome_main_app_mode_mac.mm

Issue 316493002: [Mac] Add interactive App Shim test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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: apps/app_shim/chrome_main_app_mode_mac.mm
diff --git a/apps/app_shim/chrome_main_app_mode_mac.mm b/apps/app_shim/chrome_main_app_mode_mac.mm
index c04b9a40756d478f47baed1fc6b64fbf976d7ce4..3bea912a0af729427edb7f7daa7dc043b6d7d7d2 100644
--- a/apps/app_shim/chrome_main_app_mode_mac.mm
+++ b/apps/app_shim/chrome_main_app_mode_mac.mm
@@ -621,7 +621,11 @@ int ChromeAppModeStart(const app_mode::ChromeAppModeInfo* info) {
main_message_loop.set_thread_name("MainThread");
base::PlatformThread::SetName("CrAppShimMain");
- if (pid == -1) {
+ // In tests, launching Chrome does nothing, and we won't get a ping response,
+ // so just assume the socket exists.
+ if (pid == -1 &&
+ !CommandLine::ForCurrentProcess()->
+ HasSwitch(app_mode::kLaunchedForTest)) {
// Launch Chrome if it isn't already running.
ProcessSerialNumber psn;
CommandLine command_line(CommandLine::NO_PROGRAM);

Powered by Google App Engine
This is Rietveld 408576698