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 18 matching lines...) Expand all Loading... |
29 #include "webkit/glue/window_open_disposition.h" | 29 #include "webkit/glue/window_open_disposition.h" |
30 | 30 |
31 #if defined(TOOLKIT_VIEWS) | 31 #if defined(TOOLKIT_VIEWS) |
32 #include "ui/views/view.h" | 32 #include "ui/views/view.h" |
33 #endif | 33 #endif |
34 | 34 |
35 class AppModalDialog; | 35 class AppModalDialog; |
36 class BookmarkModel; | 36 class BookmarkModel; |
37 class Browser; | 37 class Browser; |
38 class FilePath; | 38 class FilePath; |
| 39 class LocationBar; |
39 class Profile; | 40 class Profile; |
40 class SkBitmap; | 41 class SkBitmap; |
41 class TabContents; | 42 class TabContents; |
42 class TemplateURLService; | 43 class TemplateURLService; |
43 | 44 |
44 namespace chrome { | 45 namespace chrome { |
45 struct NavigateParams; | 46 struct NavigateParams; |
46 } | 47 } |
47 | 48 |
48 namespace content { | 49 namespace content { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 166 |
166 // Blocks until |service| finishes loading. | 167 // Blocks until |service| finishes loading. |
167 void WaitForTemplateURLServiceToLoad(TemplateURLService* service); | 168 void WaitForTemplateURLServiceToLoad(TemplateURLService* service); |
168 | 169 |
169 // Blocks until the |history_service|'s history finishes loading. | 170 // Blocks until the |history_service|'s history finishes loading. |
170 void WaitForHistoryToLoad(HistoryService* history_service); | 171 void WaitForHistoryToLoad(HistoryService* history_service); |
171 | 172 |
172 // Download the given file and waits for the download to complete. | 173 // Download the given file and waits for the download to complete. |
173 void DownloadURL(Browser* browser, const GURL& download_url); | 174 void DownloadURL(Browser* browser, const GURL& download_url); |
174 | 175 |
| 176 // Send the given text to the omnibox and wait until it's updated. |
| 177 void SendToOmniboxAndSubmit(LocationBar* location_bar, |
| 178 const std::string& input); |
| 179 |
175 // Brings the native window for |browser| to the foreground. Returns true on | 180 // Brings the native window for |browser| to the foreground. Returns true on |
176 // success. | 181 // success. |
177 bool BringBrowserWindowToFront(const Browser* browser) WARN_UNUSED_RESULT; | 182 bool BringBrowserWindowToFront(const Browser* browser) WARN_UNUSED_RESULT; |
178 | 183 |
179 // Gets the first browser that is not in the specified set. | 184 // Gets the first browser that is not in the specified set. |
180 Browser* GetBrowserNotInSet(std::set<Browser*> excluded_browsers); | 185 Browser* GetBrowserNotInSet(std::set<Browser*> excluded_browsers); |
181 | 186 |
182 // Sends a key press, blocking until the key press is received or the test times | 187 // Sends a key press, blocking until the key press is received or the test times |
183 // out. This uses ui_controls::SendKeyPress, see it for details. Returns true | 188 // out. This uses ui_controls::SendKeyPress, see it for details. Returns true |
184 // if the event was successfully sent and received. | 189 // if the event was successfully sent and received. |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 std::vector<GURL> urls_; | 461 std::vector<GURL> urls_; |
457 | 462 |
458 CancelableRequestConsumer consumer_; | 463 CancelableRequestConsumer consumer_; |
459 | 464 |
460 DISALLOW_COPY_AND_ASSIGN(HistoryEnumerator); | 465 DISALLOW_COPY_AND_ASSIGN(HistoryEnumerator); |
461 }; | 466 }; |
462 | 467 |
463 } // namespace ui_test_utils | 468 } // namespace ui_test_utils |
464 | 469 |
465 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ | 470 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
OLD | NEW |