OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <queue> | 9 #include <queue> |
10 #include <set> | 10 #include <set> |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 // Generate the URL for testing a particular test. | 142 // Generate the URL for testing a particular test. |
143 // HTML for the tests is all located in | 143 // HTML for the tests is all located in |
144 // test_root_directory/dir/<file> | 144 // test_root_directory/dir/<file> |
145 // The returned path is GURL format. | 145 // The returned path is GURL format. |
146 GURL GetTestUrl(const FilePath& dir, const FilePath& file); | 146 GURL GetTestUrl(const FilePath& dir, const FilePath& file); |
147 | 147 |
148 // Blocks until an application modal dialog is showns and returns it. | 148 // Blocks until an application modal dialog is showns and returns it. |
149 AppModalDialog* WaitForAppModalDialog(); | 149 AppModalDialog* WaitForAppModalDialog(); |
150 | 150 |
151 // Causes the specified tab to crash. Blocks until it is crashed. | |
152 void CrashTab(content::WebContents* tab); | |
153 | |
154 // Performs a find in the page of the specified tab. Returns the number of | 151 // Performs a find in the page of the specified tab. Returns the number of |
155 // matches found. |ordinal| is an optional parameter which is set to the index | 152 // matches found. |ordinal| is an optional parameter which is set to the index |
156 // of the current match. | 153 // of the current match. |
157 int FindInPage(TabContents* tab, | 154 int FindInPage(TabContents* tab, |
158 const string16& search_string, | 155 const string16& search_string, |
159 bool forward, | 156 bool forward, |
160 bool case_sensitive, | 157 bool case_sensitive, |
161 int* ordinal); | 158 int* ordinal); |
162 | 159 |
163 // Closes all infobars |tab| has open, if any. Tests that depend on there being | 160 // Closes all infobars |tab| has open, if any. Tests that depend on there being |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 // ui_controls_linux.cc and ui_controls_mac.cc | 444 // ui_controls_linux.cc and ui_controls_mac.cc |
448 void ClickTask(ui_controls::MouseButton button, | 445 void ClickTask(ui_controls::MouseButton button, |
449 int state, | 446 int state, |
450 const base::Closure& followup); | 447 const base::Closure& followup); |
451 | 448 |
452 } // namespace internal | 449 } // namespace internal |
453 | 450 |
454 } // namespace ui_test_utils | 451 } // namespace ui_test_utils |
455 | 452 |
456 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ | 453 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
OLD | NEW |