OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/extensions/browser_action_test_util.h" | 5 #include "chrome/browser/extensions/browser_action_test_util.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/extensions/extension_action_manager.h" | 8 #include "chrome/browser/extensions/extension_action_manager.h" |
9 #include "chrome/browser/extensions/extension_toolbar_model.h" | 9 #include "chrome/browser/extensions/extension_toolbar_model.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 bool BrowserActionTestUtil::HidePopup() { | 89 bool BrowserActionTestUtil::HidePopup() { |
90 GetContainer(browser_)->HideActivePopup(); | 90 GetContainer(browser_)->HideActivePopup(); |
91 return !HasPopup(); | 91 return !HasPopup(); |
92 } | 92 } |
93 | 93 |
94 void BrowserActionTestUtil::SetIconVisibilityCount(size_t icons) { | 94 void BrowserActionTestUtil::SetIconVisibilityCount(size_t icons) { |
95 extensions::ExtensionToolbarModel::Get(browser_->profile())-> | 95 extensions::ExtensionToolbarModel::Get(browser_->profile())-> |
96 SetVisibleIconCount(icons); | 96 SetVisibleIconCount(icons); |
97 } | 97 } |
98 | 98 |
| 99 // static |
| 100 void BrowserActionTestUtil::DisableAnimations() { |
| 101 BrowserActionsContainer::disable_animations_during_testing_ = true; |
| 102 } |
| 103 |
| 104 // static |
| 105 void BrowserActionTestUtil::EnableAnimations() { |
| 106 BrowserActionsContainer::disable_animations_during_testing_ = false; |
| 107 } |
| 108 |
| 109 // static |
99 gfx::Size BrowserActionTestUtil::GetMinPopupSize() { | 110 gfx::Size BrowserActionTestUtil::GetMinPopupSize() { |
100 return gfx::Size(ExtensionPopup::kMinWidth, ExtensionPopup::kMinHeight); | 111 return gfx::Size(ExtensionPopup::kMinWidth, ExtensionPopup::kMinHeight); |
101 } | 112 } |
102 | 113 |
| 114 // static |
103 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() { | 115 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() { |
104 return gfx::Size(ExtensionPopup::kMaxWidth, ExtensionPopup::kMaxHeight); | 116 return gfx::Size(ExtensionPopup::kMaxWidth, ExtensionPopup::kMaxHeight); |
105 } | 117 } |
OLD | NEW |