Commit 64ec24df authored by earthdok@chromium.org's avatar earthdok@chromium.org

Do not show most startup infobars in browser tests.

Prevent startup infobars (e.g. when running with --no-sandbox) from interfering with tests which assume no pre-existing infobars.

BUG=315059
R=pkasting@chromium.org

Review URL: https://codereview.chromium.org/59073006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233452 0039d316-1c4b-4281-b951-d872f2087c98
parent 7b3b2fa4
...@@ -897,13 +897,11 @@ void StartupBrowserCreatorImpl::AddInfoBarsIfNecessary( ...@@ -897,13 +897,11 @@ void StartupBrowserCreatorImpl::AddInfoBarsIfNecessary(
// The below info bars are only added to the first profile which is launched. // The below info bars are only added to the first profile which is launched.
// Other profiles might be restoring the browsing sessions asynchronously, // Other profiles might be restoring the browsing sessions asynchronously,
// so we cannot add the info bars to the focused tabs here. // so we cannot add the info bars to the focused tabs here.
if (is_process_startup == chrome::startup::IS_PROCESS_STARTUP) { if (is_process_startup == chrome::startup::IS_PROCESS_STARTUP &&
!command_line_.HasSwitch(switches::kTestType)) {
chrome::ShowBadFlagsPrompt(browser); chrome::ShowBadFlagsPrompt(browser);
if (!command_line_.HasSwitch(switches::kTestType)) { GoogleApiKeysInfoBarDelegate::Create(InfoBarService::FromWebContents(
GoogleApiKeysInfoBarDelegate::Create(InfoBarService::FromWebContents( browser->tab_strip_model()->GetActiveWebContents()));
browser->tab_strip_model()->GetActiveWebContents()));
}
ObsoleteOSInfoBarDelegate::Create(InfoBarService::FromWebContents( ObsoleteOSInfoBarDelegate::Create(InfoBarService::FromWebContents(
browser->tab_strip_model()->GetActiveWebContents())); browser->tab_strip_model()->GetActiveWebContents()));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment