| 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_BASE_UI_TEST_UTILS_H_ | 5 #ifndef CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
| 6 #define CHROME_TEST_BASE_UI_TEST_UTILS_H_ | 6 #define CHROME_TEST_BASE_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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 187 |
| 188 // Generate a URL for a file path including a query string. | 188 // Generate a URL for a file path including a query string. |
| 189 GURL GetFileUrlWithQuery(const FilePath& path, const std::string& query_string); | 189 GURL GetFileUrlWithQuery(const FilePath& path, const std::string& query_string); |
| 190 | 190 |
| 191 // Blocks until an application modal dialog is showns and returns it. | 191 // Blocks until an application modal dialog is showns and returns it. |
| 192 AppModalDialog* WaitForAppModalDialog(); | 192 AppModalDialog* WaitForAppModalDialog(); |
| 193 | 193 |
| 194 // Causes the specified tab to crash. Blocks until it is crashed. | 194 // Causes the specified tab to crash. Blocks until it is crashed. |
| 195 void CrashTab(TabContents* tab); | 195 void CrashTab(TabContents* tab); |
| 196 | 196 |
| 197 // Waits for the focus to change in the specified tab. | |
| 198 void WaitForFocusChange(TabContents* tab_contents); | |
| 199 | |
| 200 // Waits for the renderer to return focus to the browser (happens through tab | |
| 201 // traversal). | |
| 202 void WaitForFocusInBrowser(Browser* browser); | |
| 203 | |
| 204 // Performs a find in the page of the specified tab. Returns the number of | 197 // Performs a find in the page of the specified tab. Returns the number of |
| 205 // matches found. |ordinal| is an optional parameter which is set to the index | 198 // matches found. |ordinal| is an optional parameter which is set to the index |
| 206 // of the current match. | 199 // of the current match. |
| 207 int FindInPage(TabContentsWrapper* tab, | 200 int FindInPage(TabContentsWrapper* tab, |
| 208 const string16& search_string, | 201 const string16& search_string, |
| 209 bool forward, | 202 bool forward, |
| 210 bool case_sensitive, | 203 bool case_sensitive, |
| 211 int* ordinal); | 204 int* ordinal); |
| 212 | 205 |
| 213 // Returns true if the View is focused. | 206 // Returns true if the View is focused. |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 | 565 |
| 573 // Takes a snapshot of the entire page, according to the width and height | 566 // Takes a snapshot of the entire page, according to the width and height |
| 574 // properties of the DOM's document. Returns true on success. DOMAutomation | 567 // properties of the DOM's document. Returns true on success. DOMAutomation |
| 575 // must be enabled. | 568 // must be enabled. |
| 576 bool TakeEntirePageSnapshot(RenderViewHost* rvh, | 569 bool TakeEntirePageSnapshot(RenderViewHost* rvh, |
| 577 SkBitmap* bitmap) WARN_UNUSED_RESULT; | 570 SkBitmap* bitmap) WARN_UNUSED_RESULT; |
| 578 | 571 |
| 579 } // namespace ui_test_utils | 572 } // namespace ui_test_utils |
| 580 | 573 |
| 581 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ | 574 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
| OLD | NEW |