Index: chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc |
diff --git a/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc b/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc |
index 1d9fa4fb59667a78dff2dd16216aaae1ff56b55b..ab37a40274b450f52b9a9379501a99890ee8febb 100644 |
--- a/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc |
+++ b/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc |
@@ -104,10 +104,10 @@ std::string QuitWithAppsController::id() const { |
bool QuitWithAppsController::ShouldQuit() { |
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
- if (!CommandLine::ForCurrentProcess()->HasSwitch( |
+ // Quit immediately if this is a test. |
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType) && |
+ !CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kAppsKeepChromeAlive)) { |
tapted
2014/07/14 23:23:29
If we keep the switch, I think we should rename it
jackhou1
2014/07/15 05:21:37
Done.
|
- g_browser_process->local_state()->ClearPref( |
- prefs::kNotifyWhenAppsKeepChromeAlive); |
return true; |
} |