| Index: chrome/browser/infobars/infobar_service.cc
|
| diff --git a/chrome/browser/infobars/infobar_service.cc b/chrome/browser/infobars/infobar_service.cc
|
| index 5cd95f14730507fe8338df815b820c1f4f3b1a02..f828f6758bc73d52dcdc5c590d29ca938122b972 100644
|
| --- a/chrome/browser/infobars/infobar_service.cc
|
| +++ b/chrome/browser/infobars/infobar_service.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/command_line.h"
|
| #include "chrome/browser/chrome_notification_types.h"
|
| +#include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/render_messages.h"
|
| #include "components/infobars/core/infobar.h"
|
| #include "content/public/browser/navigation_details.h"
|
| @@ -47,6 +48,11 @@ InfoBarService::InfoBarService(content::WebContents* web_contents)
|
| : content::WebContentsObserver(web_contents),
|
| ignore_next_reload_(false) {
|
| DCHECK(web_contents);
|
| + // Infobar animations cause viewport resizes. Disable them for automated
|
| + // tests, since they could lead to flakiness.
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableAutomation))
|
| + set_animations_enabled(false);
|
| }
|
|
|
| InfoBarService::~InfoBarService() {
|
|
|