| 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..07c38e32cbfbbe05a037f9b173afe434f9f67353 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);
|
|
|