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

Unified Diff: components/infobars/core/infobar_container.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 | « chrome/browser/infobars/infobar_service.cc ('k') | components/infobars/core/infobar_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/infobars/core/infobar_container.cc
diff --git a/components/infobars/core/infobar_container.cc b/components/infobars/core/infobar_container.cc
index c3bd8e2a9829b40096fed59613ce3f9d6d9a52b0..5013260b46c749dead590e2b01d32c3761249fd3 100644
--- a/components/infobars/core/infobar_container.cc
+++ b/components/infobars/core/infobar_container.cc
@@ -123,7 +123,8 @@ void InfoBarContainer::OnInfoBarAdded(InfoBar* infobar) {
}
void InfoBarContainer::OnInfoBarRemoved(InfoBar* infobar, bool animate) {
- infobar->Hide(animate);
+ DCHECK(infobar_manager_);
+ infobar->Hide(infobar_manager_->animations_enabled() && animate);
UpdateInfoBarArrowTargetHeights();
}
@@ -154,7 +155,8 @@ void InfoBarContainer::AddInfoBar(InfoBar* infobar,
UpdateInfoBarArrowTargetHeights();
PlatformSpecificAddInfoBar(infobar, position);
infobar->set_container(this);
- infobar->Show(animate);
+ DCHECK(infobar_manager_);
+ infobar->Show(infobar_manager_->animations_enabled() && animate);
// Record the infobar being displayed.
DCHECK_NE(InfoBarDelegate::INVALID, infobar->delegate()->GetIdentifier());
« no previous file with comments | « chrome/browser/infobars/infobar_service.cc ('k') | components/infobars/core/infobar_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698