OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TEST_UI_TEST_UTILS_H_ | 5 #ifndef CHROME_TEST_UI_TEST_UTILS_H_ |
6 #define CHROME_TEST_UI_TEST_UTILS_H_ | 6 #define CHROME_TEST_UI_TEST_UTILS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <queue> | 10 #include <queue> |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // Waits for a |browser_action| to be updated. | 109 // Waits for a |browser_action| to be updated. |
110 void WaitForBrowserActionUpdated(ExtensionAction* browser_action); | 110 void WaitForBrowserActionUpdated(ExtensionAction* browser_action); |
111 | 111 |
112 // Waits for a load stop for the specified |tab|'s controller, if the tab is | 112 // Waits for a load stop for the specified |tab|'s controller, if the tab is |
113 // currently loading. Otherwise returns immediately. | 113 // currently loading. Otherwise returns immediately. |
114 void WaitForLoadStop(TabContents* tab); | 114 void WaitForLoadStop(TabContents* tab); |
115 | 115 |
116 // Waits for a new browser to be created, returning the browser. | 116 // Waits for a new browser to be created, returning the browser. |
117 Browser* WaitForNewBrowser(); | 117 Browser* WaitForNewBrowser(); |
118 | 118 |
| 119 // Waits for a new browser not in set |excluded_browsers|. |
| 120 Browser* WaitForBrowserNotInSet(std::set<Browser*> excluded_browsers); |
| 121 |
119 // Opens |url| in an incognito browser window with the incognito profile of | 122 // Opens |url| in an incognito browser window with the incognito profile of |
120 // |profile|, blocking until the navigation finishes. This will create a new | 123 // |profile|, blocking until the navigation finishes. This will create a new |
121 // browser if a browser with the incognito profile does not exist. | 124 // browser if a browser with the incognito profile does not exist. |
122 void OpenURLOffTheRecord(Profile* profile, const GURL& url); | 125 void OpenURLOffTheRecord(Profile* profile, const GURL& url); |
123 | 126 |
124 // Navigates the selected tab of |browser| to |url|, blocking until the | 127 // Navigates the selected tab of |browser| to |url|, blocking until the |
125 // navigation finishes. | 128 // navigation finishes. |
126 void NavigateToURL(Browser* browser, const GURL& url); | 129 void NavigateToURL(Browser* browser, const GURL& url); |
127 | 130 |
128 // Navigates the specified tab of |browser| to |url|, blocking until the | 131 // Navigates the specified tab of |browser| to |url|, blocking until the |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 | 554 |
552 // Takes a snapshot of the entire page, according to the width and height | 555 // Takes a snapshot of the entire page, according to the width and height |
553 // properties of the DOM's document. Returns true on success. DOMAutomation | 556 // properties of the DOM's document. Returns true on success. DOMAutomation |
554 // must be enabled. | 557 // must be enabled. |
555 bool TakeEntirePageSnapshot(RenderViewHost* rvh, | 558 bool TakeEntirePageSnapshot(RenderViewHost* rvh, |
556 SkBitmap* bitmap) WARN_UNUSED_RESULT; | 559 SkBitmap* bitmap) WARN_UNUSED_RESULT; |
557 | 560 |
558 } // namespace ui_test_utils | 561 } // namespace ui_test_utils |
559 | 562 |
560 #endif // CHROME_TEST_UI_TEST_UTILS_H_ | 563 #endif // CHROME_TEST_UI_TEST_UTILS_H_ |
OLD | NEW |