Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: chrome/test/base/ui_test_utils.cc

Issue 10823029: Move WaitForLoadStop from ui_test_utils to browser_test_utils so that it can be reused in content_b… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/base/ui_test_utils.h ('k') | chrome/test/perf/rendering/throughput_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/ui_test_utils.cc
===================================================================
--- chrome/test/base/ui_test_utils.cc (revision 148448)
+++ chrome/test/base/ui_test_utils.cc (working copy)
@@ -212,17 +212,6 @@
observer.Wait();
}
-void WaitForLoadStop(WebContents* tab) {
- content::WindowedNotificationObserver load_stop_observer(
- content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab->GetController()));
- // In many cases, the load may have finished before we get here. Only wait if
- // the tab still has a pending navigation.
- if (!tab->IsLoading())
- return;
- load_stop_observer.Wait();
-}
-
Browser* WaitForBrowserNotInSet(std::set<Browser*> excluded_browsers) {
Browser* new_browser = GetBrowserNotInSet(excluded_browsers);
if (new_browser == NULL) {
@@ -269,7 +258,7 @@
WindowOpenDisposition disposition,
int browser_test_flags) {
if (disposition == CURRENT_TAB && chrome::GetActiveWebContents(browser))
- WaitForLoadStop(chrome::GetActiveWebContents(browser));
+ content::WaitForLoadStop(chrome::GetActiveWebContents(browser));
NavigationController* controller =
chrome::GetActiveWebContents(browser) ?
&chrome::GetActiveWebContents(browser)->GetController() : NULL;
« no previous file with comments | « chrome/test/base/ui_test_utils.h ('k') | chrome/test/perf/rendering/throughput_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698