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

Unified Diff: chrome/test/in_process_browser_test.cc

Issue 7489019: Fix up various browser tests not to use WaitForNavigation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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
Index: chrome/test/in_process_browser_test.cc
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
index f8f882d0b338c5f1ee0d6cfa8d7b7845b14661b9..2b99c50eea41b13196c6ed53d6549ac3ec9ce421 100644
--- a/chrome/test/in_process_browser_test.cc
+++ b/chrome/test/in_process_browser_test.cc
@@ -57,16 +57,15 @@
namespace {
void InitializeBrowser(Browser* browser) {
+ ui_test_utils::WindowedNotificationObserver observer(
+ content::NOTIFICATION_LOAD_STOP,
+ NotificationService::AllSources());
browser->AddSelectedTabWithURL(GURL(chrome::kAboutBlankURL),
PageTransition::START_PAGE);
-
// Wait for the page to finish loading.
- ui_test_utils::WaitForNavigation(
- &browser->GetSelectedTabContents()->controller());
-
+ observer.Wait();
browser->window()->Show();
}
-
} // namespace
extern int BrowserMain(const MainFunctionParams&);

Powered by Google App Engine
This is Rietveld 408576698