Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: chrome/browser/infobars/infobar_service.cc

Issue 2705293008: Disable info bar animations during automated testing. (Closed)
Patch Set: make InfoBarContainer check whether animations are enabled Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/infobars/core/infobar_container.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « no previous file | components/infobars/core/infobar_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698