| Index: chrome/browser/ui/toolbar/toolbar_actions_bar.h
|
| diff --git a/chrome/browser/ui/toolbar/toolbar_actions_bar.h b/chrome/browser/ui/toolbar/toolbar_actions_bar.h
|
| index 9f9d5e91f046ff63e9147f63381fdaefbceab53f..b65f7b223530ead86ea1eb2516570e228df2e30a 100644
|
| --- a/chrome/browser/ui/toolbar/toolbar_actions_bar.h
|
| +++ b/chrome/browser/ui/toolbar/toolbar_actions_bar.h
|
| @@ -119,7 +119,9 @@ class ToolbarActionsBar : public extensions::ExtensionToolbarModel::Observer,
|
| }
|
| bool enabled() const { return model_ != nullptr; }
|
| bool suppress_layout() const { return suppress_layout_; }
|
| - bool suppress_animation() const { return suppress_animation_; }
|
| + bool suppress_animation() const {
|
| + return suppress_animation_ || disable_animations_for_testing_;
|
| + }
|
| bool is_highlighting() const { return model_ && model_->is_highlighting(); }
|
| const PlatformSettings& platform_settings() const {
|
| return platform_settings_;
|
| @@ -127,6 +129,11 @@ class ToolbarActionsBar : public extensions::ExtensionToolbarModel::Observer,
|
|
|
| ToolbarActionsBarDelegate* delegate_for_test() { return delegate_; }
|
|
|
| + // During testing we can disable animations by setting this flag to true,
|
| + // so that the bar resizes instantly, instead of having to poll it while it
|
| + // animates to open/closed status.
|
| + static bool disable_animations_for_testing_;
|
| +
|
| private:
|
| using ToolbarActions = ScopedVector<ToolbarActionViewController>;
|
|
|
|
|