| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| 11 | 11 |
| 12 class Browser; | 12 class Browser; |
| 13 class ToolbarActionsBar; |
| 13 class ToolbarActionsBarDelegate; | 14 class ToolbarActionsBarDelegate; |
| 14 | 15 |
| 15 namespace gfx { | 16 namespace gfx { |
| 16 class Image; | 17 class Image; |
| 17 class Rect; | 18 class Rect; |
| 18 class Size; | 19 class Size; |
| 19 } // namespace gfx | 20 } // namespace gfx |
| 20 | 21 |
| 21 class BrowserActionTestUtil { | 22 class BrowserActionTestUtil { |
| 22 public: | 23 public: |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 bool HidePopup(); | 75 bool HidePopup(); |
| 75 | 76 |
| 76 // Tests that the button at the given |index| is displaying that it wants | 77 // Tests that the button at the given |index| is displaying that it wants |
| 77 // to run. | 78 // to run. |
| 78 bool ActionButtonWantsToRun(size_t index); | 79 bool ActionButtonWantsToRun(size_t index); |
| 79 | 80 |
| 80 // Tests that the overflow button is displaying an overflowed action wants | 81 // Tests that the overflow button is displaying an overflowed action wants |
| 81 // to run. | 82 // to run. |
| 82 bool OverflowedActionButtonWantsToRun(); | 83 bool OverflowedActionButtonWantsToRun(); |
| 83 | 84 |
| 85 // Returns the ToolbarActionsBar. |
| 86 ToolbarActionsBar* GetToolbarActionsBar(); |
| 87 |
| 84 // Returns the minimum allowed size of an extension popup. | 88 // Returns the minimum allowed size of an extension popup. |
| 85 static gfx::Size GetMinPopupSize(); | 89 static gfx::Size GetMinPopupSize(); |
| 86 | 90 |
| 87 // Returns the maximum allowed size of an extension popup. | 91 // Returns the maximum allowed size of an extension popup. |
| 88 static gfx::Size GetMaxPopupSize(); | 92 static gfx::Size GetMaxPopupSize(); |
| 89 | 93 |
| 90 private: | 94 private: |
| 91 Browser* browser_; // weak | 95 Browser* browser_; // weak |
| 92 | 96 |
| 93 // If non-null, this is a set view to test with, rather than using the | 97 // If non-null, this is a set view to test with, rather than using the |
| 94 // |browser|'s default container. | 98 // |browser|'s default container. |
| 95 ToolbarActionsBarDelegate* bar_delegate_; // weak | 99 ToolbarActionsBarDelegate* bar_delegate_; // weak |
| 96 }; | 100 }; |
| 97 | 101 |
| 98 #endif // CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ | 102 #endif // CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ |
| OLD | NEW |