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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // thread |thread_id| have been processed. | 96 // thread |thread_id| have been processed. |
97 void RunAllPendingInMessageLoop(content::BrowserThread::ID thread_id); | 97 void RunAllPendingInMessageLoop(content::BrowserThread::ID thread_id); |
98 | 98 |
99 // Puts the current tab title in |title|. Returns true on success. | 99 // Puts the current tab title in |title|. Returns true on success. |
100 bool GetCurrentTabTitle(const Browser* browser, string16* title); | 100 bool GetCurrentTabTitle(const Browser* browser, string16* title); |
101 | 101 |
102 // Waits for a new tab to be added to |browser|. TODO(gbillock): remove this | 102 // Waits for a new tab to be added to |browser|. TODO(gbillock): remove this |
103 // race hazard. Use WindowedNotificationObserver instead. | 103 // race hazard. Use WindowedNotificationObserver instead. |
104 void WaitForNewTab(Browser* browser); | 104 void WaitForNewTab(Browser* browser); |
105 | 105 |
106 // Waits for a load stop for the specified |tab|'s controller, if the tab is | |
107 // currently loading. Otherwise returns immediately. | |
108 void WaitForLoadStop(content::WebContents* tab); | |
109 | |
110 // Opens |url| in an incognito browser window with the incognito profile of | 106 // Opens |url| in an incognito browser window with the incognito profile of |
111 // |profile|, blocking until the navigation finishes. This will create a new | 107 // |profile|, blocking until the navigation finishes. This will create a new |
112 // browser if a browser with the incognito profile does not exist. Returns the | 108 // browser if a browser with the incognito profile does not exist. Returns the |
113 // incognito window Browser. | 109 // incognito window Browser. |
114 Browser* OpenURLOffTheRecord(Profile* profile, const GURL& url); | 110 Browser* OpenURLOffTheRecord(Profile* profile, const GURL& url); |
115 | 111 |
116 // Performs the provided navigation process, blocking until the navigation | 112 // Performs the provided navigation process, blocking until the navigation |
117 // finishes. May change the params in some cases (i.e. if the navigation | 113 // finishes. May change the params in some cases (i.e. if the navigation |
118 // opens a new browser window). Uses chrome::Navigate. | 114 // opens a new browser window). Uses chrome::Navigate. |
119 void NavigateToURL(chrome::NavigateParams* params); | 115 void NavigateToURL(chrome::NavigateParams* params); |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 // ui_controls_linux.cc and ui_controls_mac.cc | 447 // ui_controls_linux.cc and ui_controls_mac.cc |
452 void ClickTask(ui_controls::MouseButton button, | 448 void ClickTask(ui_controls::MouseButton button, |
453 int state, | 449 int state, |
454 const base::Closure& followup); | 450 const base::Closure& followup); |
455 | 451 |
456 } // namespace internal | 452 } // namespace internal |
457 | 453 |
458 } // namespace ui_test_utils | 454 } // namespace ui_test_utils |
459 | 455 |
460 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ | 456 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
OLD | NEW |