| Index: chrome/browser/infobars/infobar_service.cc
|
| diff --git a/chrome/browser/infobars/infobar_service.cc b/chrome/browser/infobars/infobar_service.cc
|
| index c901e32340f3da3f9316a2b90b8a863f933e74e1..cb7c8595d499c7c303ad63064a02df89ba6101be 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"
|
| @@ -48,6 +49,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() {
|
|
|