| 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_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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // Creates an observer that waits for |download_manager| to report that it | 192 // Creates an observer that waits for |download_manager| to report that it |
| 193 // has a total of |count| downloads that have been handles | 193 // has a total of |count| downloads that have been handles |
| 194 void WaitForDownloadCount(DownloadManager* download_manager, size_t count); | 194 void WaitForDownloadCount(DownloadManager* download_manager, size_t count); |
| 195 | 195 |
| 196 // Blocks until an application modal dialog is showns and returns it. | 196 // Blocks until an application modal dialog is showns and returns it. |
| 197 AppModalDialog* WaitForAppModalDialog(); | 197 AppModalDialog* WaitForAppModalDialog(); |
| 198 | 198 |
| 199 // Causes the specified tab to crash. Blocks until it is crashed. | 199 // Causes the specified tab to crash. Blocks until it is crashed. |
| 200 void CrashTab(TabContents* tab); | 200 void CrashTab(TabContents* tab); |
| 201 | 201 |
| 202 // Waits for the focus to change in the specified RenderViewHost. | 202 // Waits for the focus to change in the specified tab. |
| 203 void WaitForFocusChange(RenderViewHost* rvh); | 203 void WaitForFocusChange(TabContents* tab_contents); |
| 204 | 204 |
| 205 // Waits for the renderer to return focus to the browser (happens through tab | 205 // Waits for the renderer to return focus to the browser (happens through tab |
| 206 // traversal). | 206 // traversal). |
| 207 void WaitForFocusInBrowser(Browser* browser); | 207 void WaitForFocusInBrowser(Browser* browser); |
| 208 | 208 |
| 209 // Performs a find in the page of the specified tab. Returns the number of | 209 // Performs a find in the page of the specified tab. Returns the number of |
| 210 // matches found. |ordinal| is an optional parameter which is set to the index | 210 // matches found. |ordinal| is an optional parameter which is set to the index |
| 211 // of the current match. | 211 // of the current match. |
| 212 int FindInPage(TabContents* tab, | 212 int FindInPage(TabContents* tab, |
| 213 const string16& search_string, | 213 const string16& search_string, |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 | 554 |
| 555 // 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 |
| 556 // properties of the DOM's document. Returns true on success. DOMAutomation | 556 // properties of the DOM's document. Returns true on success. DOMAutomation |
| 557 // must be enabled. | 557 // must be enabled. |
| 558 bool TakeEntirePageSnapshot(RenderViewHost* rvh, | 558 bool TakeEntirePageSnapshot(RenderViewHost* rvh, |
| 559 SkBitmap* bitmap) WARN_UNUSED_RESULT; | 559 SkBitmap* bitmap) WARN_UNUSED_RESULT; |
| 560 | 560 |
| 561 } // namespace ui_test_utils | 561 } // namespace ui_test_utils |
| 562 | 562 |
| 563 #endif // CHROME_TEST_UI_TEST_UTILS_H_ | 563 #endif // CHROME_TEST_UI_TEST_UTILS_H_ |
| OLD | NEW |