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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 // Tests that the button at the given |index| is displaying that it wants | 88 // Tests that the button at the given |index| is displaying that it wants |
89 // to run. | 89 // to run. |
90 bool ActionButtonWantsToRun(size_t index); | 90 bool ActionButtonWantsToRun(size_t index); |
91 | 91 |
92 // Sets the current width of the browser actions container without resizing | 92 // Sets the current width of the browser actions container without resizing |
93 // the underlying controller. This is to simulate e.g. when the browser window | 93 // the underlying controller. This is to simulate e.g. when the browser window |
94 // is too small for the preferred width. | 94 // is too small for the preferred width. |
95 void SetWidth(int width); | 95 void SetWidth(int width); |
96 | 96 |
| 97 // Returns true if the container is currently highlighting in preparation for |
| 98 // showing the icon surfacing bubble. |
| 99 bool IsHighlightingForSurfacingBubble(); |
| 100 |
97 // Returns the ToolbarActionsBar. | 101 // Returns the ToolbarActionsBar. |
98 ToolbarActionsBar* GetToolbarActionsBar(); | 102 ToolbarActionsBar* GetToolbarActionsBar(); |
99 | 103 |
100 // Creates and returns a BrowserActionTestUtil with an "overflow" container, | 104 // Creates and returns a BrowserActionTestUtil with an "overflow" container, |
101 // with this object's container as the main bar. | 105 // with this object's container as the main bar. |
102 scoped_ptr<BrowserActionTestUtil> CreateOverflowBar(); | 106 scoped_ptr<BrowserActionTestUtil> CreateOverflowBar(); |
103 | 107 |
104 // Returns the minimum allowed size of an extension popup. | 108 // Returns the minimum allowed size of an extension popup. |
105 static gfx::Size GetMinPopupSize(); | 109 static gfx::Size GetMinPopupSize(); |
106 | 110 |
107 // Returns the maximum allowed size of an extension popup. | 111 // Returns the maximum allowed size of an extension popup. |
108 static gfx::Size GetMaxPopupSize(); | 112 static gfx::Size GetMaxPopupSize(); |
109 | 113 |
110 private: | 114 private: |
111 // A private constructor to create an overflow version. | 115 // A private constructor to create an overflow version. |
112 BrowserActionTestUtil(Browser* browser, BrowserActionTestUtil* main_bar); | 116 BrowserActionTestUtil(Browser* browser, BrowserActionTestUtil* main_bar); |
113 | 117 |
114 Browser* browser_; // weak | 118 Browser* browser_; // weak |
115 | 119 |
116 // Our test helper, which constructs and owns the views if we don't have a | 120 // Our test helper, which constructs and owns the views if we don't have a |
117 // real browser window, or if this is an overflow version. | 121 // real browser window, or if this is an overflow version. |
118 scoped_ptr<TestToolbarActionsBarHelper> test_helper_; | 122 scoped_ptr<TestToolbarActionsBarHelper> test_helper_; |
119 | 123 |
120 DISALLOW_COPY_AND_ASSIGN(BrowserActionTestUtil); | 124 DISALLOW_COPY_AND_ASSIGN(BrowserActionTestUtil); |
121 }; | 125 }; |
122 | 126 |
123 #endif // CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ | 127 #endif // CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ |
OLD | NEW |