| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 void Press(int index); | 62 void Press(int index); |
| 63 | 63 |
| 64 // Returns the extension id of the extension at |index|. | 64 // Returns the extension id of the extension at |index|. |
| 65 std::string GetExtensionId(int index); | 65 std::string GetExtensionId(int index); |
| 66 | 66 |
| 67 // Returns the current tooltip for the browser action button. | 67 // Returns the current tooltip for the browser action button. |
| 68 std::string GetTooltip(int index); | 68 std::string GetTooltip(int index); |
| 69 | 69 |
| 70 gfx::NativeView GetPopupNativeView(); | 70 gfx::NativeView GetPopupNativeView(); |
| 71 | 71 |
| 72 // Spins a RunLoop until the NativeWindow hosting |GetPopupNativeView()| is |
| 73 // reported as active by the OS. Returns true if successful. |
| 74 bool WaitForPopup(); |
| 75 |
| 72 // Returns whether a browser action popup is being shown currently. | 76 // Returns whether a browser action popup is being shown currently. |
| 73 bool HasPopup(); | 77 bool HasPopup(); |
| 74 | 78 |
| 75 // Returns the size of the current browser action popup. | 79 // Returns the size of the current browser action popup. |
| 76 gfx::Size GetPopupSize(); | 80 gfx::Size GetPopupSize(); |
| 77 | 81 |
| 78 // Hides the given popup and returns whether the hide was successful. | 82 // Hides the given popup and returns whether the hide was successful. |
| 79 bool HidePopup(); | 83 bool HidePopup(); |
| 80 | 84 |
| 81 // Tests that the button at the given |index| is displaying that it wants | 85 // Tests that the button at the given |index| is displaying that it wants |
| (...skipping 25 matching lines...) Expand all Loading... |
| 107 Browser* browser_; // weak | 111 Browser* browser_; // weak |
| 108 | 112 |
| 109 // Our test helper, which constructs and owns the views if we don't have a | 113 // Our test helper, which constructs and owns the views if we don't have a |
| 110 // real browser window, or if this is an overflow version. | 114 // real browser window, or if this is an overflow version. |
| 111 std::unique_ptr<TestToolbarActionsBarHelper> test_helper_; | 115 std::unique_ptr<TestToolbarActionsBarHelper> test_helper_; |
| 112 | 116 |
| 113 DISALLOW_COPY_AND_ASSIGN(BrowserActionTestUtil); | 117 DISALLOW_COPY_AND_ASSIGN(BrowserActionTestUtil); |
| 114 }; | 118 }; |
| 115 | 119 |
| 116 #endif // CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ | 120 #endif // CHROME_BROWSER_EXTENSIONS_BROWSER_ACTION_TEST_UTIL_H_ |
| OLD | NEW |