| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // Causes the specified tab to crash. Blocks until it is crashed. | 108 // Causes the specified tab to crash. Blocks until it is crashed. |
| 109 void CrashTab(TabContents* tab); | 109 void CrashTab(TabContents* tab); |
| 110 | 110 |
| 111 // Waits for the focus to change in the specified RenderViewHost. | 111 // Waits for the focus to change in the specified RenderViewHost. |
| 112 void WaitForFocusChange(RenderViewHost* rvh); | 112 void WaitForFocusChange(RenderViewHost* rvh); |
| 113 | 113 |
| 114 // Waits for the renderer to return focus to the browser (happens through tab | 114 // Waits for the renderer to return focus to the browser (happens through tab |
| 115 // traversal). | 115 // traversal). |
| 116 void WaitForFocusInBrowser(Browser* browser); | 116 void WaitForFocusInBrowser(Browser* browser); |
| 117 | 117 |
| 118 // Waits for the language of the page to have been detected and returns it. |
| 119 // This should be called right after a navigation notification was received. |
| 120 std::string WaitForLanguageDetection(TabContents* tab_contents); |
| 121 |
| 118 // Performs a find in the page of the specified tab. Returns the number of | 122 // Performs a find in the page of the specified tab. Returns the number of |
| 119 // matches found. |ordinal| is an optional parameter which is set to the index | 123 // matches found. |ordinal| is an optional parameter which is set to the index |
| 120 // of the current match. | 124 // of the current match. |
| 121 int FindInPage(TabContents* tab, | 125 int FindInPage(TabContents* tab, |
| 122 const string16& search_string, | 126 const string16& search_string, |
| 123 bool forward, | 127 bool forward, |
| 124 bool case_sensitive, | 128 bool case_sensitive, |
| 125 int* ordinal); | 129 int* ordinal); |
| 126 | 130 |
| 127 // Returns true if the View is focused. | 131 // Returns true if the View is focused. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 MessageLoop* loop_; | 169 MessageLoop* loop_; |
| 166 bool owned_; | 170 bool owned_; |
| 167 bool quit_loop_invoked_; | 171 bool quit_loop_invoked_; |
| 168 | 172 |
| 169 DISALLOW_COPY_AND_ASSIGN(TimedMessageLoopRunner); | 173 DISALLOW_COPY_AND_ASSIGN(TimedMessageLoopRunner); |
| 170 }; | 174 }; |
| 171 | 175 |
| 172 } // namespace ui_test_utils | 176 } // namespace ui_test_utils |
| 173 | 177 |
| 174 #endif // CHROME_TEST_UI_TEST_UTILS_H_ | 178 #endif // CHROME_TEST_UI_TEST_UTILS_H_ |
| OLD | NEW |