| 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 <memory> | 10 #include <memory> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 BrowserActionTestUtil(Browser* browser, bool is_real_window); | 42 BrowserActionTestUtil(Browser* browser, bool is_real_window); |
| 43 | 43 |
| 44 ~BrowserActionTestUtil(); | 44 ~BrowserActionTestUtil(); |
| 45 | 45 |
| 46 // Returns the number of browser action buttons in the window toolbar. | 46 // Returns the number of browser action buttons in the window toolbar. |
| 47 int NumberOfBrowserActions(); | 47 int NumberOfBrowserActions(); |
| 48 | 48 |
| 49 // Returns the number of browser action currently visible. | 49 // Returns the number of browser action currently visible. |
| 50 int VisibleBrowserActions(); | 50 int VisibleBrowserActions(); |
| 51 | 51 |
| 52 // Returns true if the overflow chevron is completely shown in the browser | |
| 53 // actions container (i.e., is visible and is within the bounds of the | |
| 54 // container). | |
| 55 bool IsChevronShowing(); | |
| 56 | |
| 57 // Inspects the extension popup for the action at the given index. | 52 // Inspects the extension popup for the action at the given index. |
| 58 void InspectPopup(int index); | 53 void InspectPopup(int index); |
| 59 | 54 |
| 60 // Returns whether the browser action at |index| has a non-null icon. Note | 55 // Returns whether the browser action at |index| has a non-null icon. Note |
| 61 // that the icon is loaded asynchronously, in which case you can wait for it | 56 // that the icon is loaded asynchronously, in which case you can wait for it |
| 62 // to load by calling WaitForBrowserActionUpdated. | 57 // to load by calling WaitForBrowserActionUpdated. |
| 63 bool HasIcon(int index); | 58 bool HasIcon(int index); |
| 64 | 59 |
| 65 // Returns icon for the browser action at |index|. | 60 // Returns icon for the browser action at |index|. |
| 66 gfx::Image GetIcon(int index); | 61 gfx::Image GetIcon(int index); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 Browser* browser_; // weak | 109 Browser* browser_; // weak |
| 115 | 110 |
| 116 // Our test helper, which constructs and owns the views if we don't have a | 111 // 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. | 112 // real browser window, or if this is an overflow version. |
| 118 std::unique_ptr<TestToolbarActionsBarHelper> test_helper_; | 113 std::unique_ptr<TestToolbarActionsBarHelper> test_helper_; |
| 119 | 114 |
| 120 DISALLOW_COPY_AND_ASSIGN(BrowserActionTestUtil); | 115 DISALLOW_COPY_AND_ASSIGN(BrowserActionTestUtil); |
| 121 }; | 116 }; |
| 122 | 117 |
| 123 #endif // CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ | 118 #endif // CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ |
| OLD | NEW |