| Index: chrome/browser/ui/startup/startup_browser_creator_impl.cc | 
| diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc | 
| index 6ae4c738b143df6d62bb540fb52bab5f830c28c8..130d6669bd0de64a7698531629fb7dcdd660b4db 100644 | 
| --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc | 
| +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc | 
| @@ -810,8 +810,13 @@ void StartupBrowserCreatorImpl::AddInfoBarsIfNecessary( | 
| // The below info bars are only added to the first profile which is launched. | 
| // Other profiles might be restoring the browsing sessions asynchronously, | 
| // so we cannot add the info bars to the focused tabs here. | 
| +  // | 
| +  // These info bars are not shown when the browser is being controlled by a | 
| +  // test or a remote debugging client, so that they don't interfere with | 
| +  // automated tests that assume no info bars. | 
| if (is_process_startup == chrome::startup::IS_PROCESS_STARTUP && | 
| -      !command_line_.HasSwitch(switches::kTestType)) { | 
| +      !command_line_.HasSwitch(switches::kTestType) && | 
| +      !command_line_.HasSwitch(switches::kRemoteDebuggingPort)) { | 
| chrome::ShowBadFlagsPrompt(browser); | 
| GoogleApiKeysInfoBarDelegate::Create(InfoBarService::FromWebContents( | 
| browser->tab_strip_model()->GetActiveWebContents())); | 
|  |