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

Unified Diff: chrome/test/ui_test_utils.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
« chrome/test/ui_test_utils.h ('K') | « chrome/test/ui_test_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/ui_test_utils.cc
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc
index b8990346d8a7c769962fe4484592977b0610e2c9..0cdd1f1178da714e0e0e646c29663dca37fda46e 100644
--- a/chrome/test/ui_test_utils.cc
+++ b/chrome/test/ui_test_utils.cc
@@ -860,6 +860,23 @@ WindowedNotificationObserver::WindowedNotificationObserver(
registrar_.Add(this, notification_type, waiting_for_);
}
+WindowedNotificationObserver::WindowedNotificationObserver(
+ const NavigationController& controller)
+ : seen_(false),
+ running_(false),
+ waiting_for_(Source<NavigationController>(&controller)) {
+ registrar_.Add(this, content::NOTIFICATION_LOAD_STOP, waiting_for_);
+}
+
+WindowedNotificationObserver::WindowedNotificationObserver(
+ const Browser& browser)
+ : seen_(false),
+ running_(false),
+ waiting_for_(Source<NavigationController>(
+ &browser.GetSelectedTabContentsWrapper()->controller())) {
+ registrar_.Add(this, content::NOTIFICATION_LOAD_STOP, waiting_for_);
+}
+
WindowedNotificationObserver::~WindowedNotificationObserver() {}
void WindowedNotificationObserver::Wait() {
« chrome/test/ui_test_utils.h ('K') | « chrome/test/ui_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698