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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 // Waits for |controller| to complete a navigation. This blocks until | 43 // Waits for |controller| to complete a navigation. This blocks until |
44 // the navigation finishes. | 44 // the navigation finishes. |
45 void WaitForNavigation(NavigationController* controller); | 45 void WaitForNavigation(NavigationController* controller); |
46 | 46 |
47 // Waits for |controller| to complete a navigation. This blocks until | 47 // Waits for |controller| to complete a navigation. This blocks until |
48 // the specified number of navigations complete. | 48 // the specified number of navigations complete. |
49 void WaitForNavigations(NavigationController* controller, | 49 void WaitForNavigations(NavigationController* controller, |
50 int number_of_navigations); | 50 int number_of_navigations); |
51 | 51 |
| 52 // Waits for a new tab to be added to |browser|. |
| 53 void WaitForNewTab(Browser* browser); |
| 54 |
| 55 // Waits for a load stop for the specified |controller|. |
| 56 void WaitForLoadStop(NavigationController* controller); |
| 57 |
52 // Navigates the selected tab of |browser| to |url|, blocking until the | 58 // Navigates the selected tab of |browser| to |url|, blocking until the |
53 // navigation finishes. | 59 // navigation finishes. |
54 void NavigateToURL(Browser* browser, const GURL& url); | 60 void NavigateToURL(Browser* browser, const GURL& url); |
55 | 61 |
56 // Navigates the selected tab of |browser| to |url|, blocking until the | 62 // Navigates the selected tab of |browser| to |url|, blocking until the |
57 // number of navigations specified complete. | 63 // number of navigations specified complete. |
58 void NavigateToURLBlockUntilNavigationsComplete(Browser* browser, | 64 void NavigateToURLBlockUntilNavigationsComplete(Browser* browser, |
59 const GURL& url, | 65 const GURL& url, |
60 int number_of_navigations); | 66 int number_of_navigations); |
61 | 67 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 void WaitForDownloadCount(DownloadManager* download_manager, size_t count); | 100 void WaitForDownloadCount(DownloadManager* download_manager, size_t count); |
95 | 101 |
96 // Blocks until an application modal dialog is showns and returns it. | 102 // Blocks until an application modal dialog is showns and returns it. |
97 AppModalDialog* WaitForAppModalDialog(); | 103 AppModalDialog* WaitForAppModalDialog(); |
98 | 104 |
99 // Causes the specified tab to crash. Blocks until it is crashed. | 105 // Causes the specified tab to crash. Blocks until it is crashed. |
100 void CrashTab(TabContents* tab); | 106 void CrashTab(TabContents* tab); |
101 } | 107 } |
102 | 108 |
103 #endif // CHROME_TEST_UI_TEST_UTILS_H_ | 109 #endif // CHROME_TEST_UI_TEST_UTILS_H_ |
OLD | NEW |