Index: chrome/test/ui_test_utils.h |
diff --git a/chrome/test/ui_test_utils.h b/chrome/test/ui_test_utils.h |
index 893c16069f2755e469a3c9fbc708df2ebd9fa633..4215d38ebd6165fc47a8779a6662618a4dc55de3 100644 |
--- a/chrome/test/ui_test_utils.h |
+++ b/chrome/test/ui_test_utils.h |
@@ -229,10 +229,14 @@ bool IsViewFocused(const Browser* browser, ViewID vid); |
void ClickOnView(const Browser* browser, ViewID vid); |
// Blocks until a notification for given |type| is received. |
+// TODO(gbillock): remove this race hazard. |
+// Use WindowedNotificationObserver instead. |
void WaitForNotification(int type); |
// Blocks until a notification for given |type| from the specified |source| |
// is received. |
+// TODO(gbillock): remove this race hazard. |
+// Use WindowedNotificationObserver instead. |
void WaitForNotificationFrom(int type, |
const NotificationSource& source); |
@@ -404,6 +408,16 @@ class WindowedNotificationObserver : public NotificationObserver { |
// NotificationService::AllSources(). |
WindowedNotificationObserver(int notification_type, |
const NotificationSource& source); |
+ |
+ // Convenience constructor which will use the given NavigationController. |
+ // Waits for a NOTIFICATION_LOAD_STOP event. |
+ explicit WindowedNotificationObserver(const NavigationController& controller); |
+ |
+ // Convenience constructor which will use the NavigationController from |
+ // the active tab in the given browser. |
+ // Waits for a NOTIFICATION_LOAD_STOP event. |
+ explicit WindowedNotificationObserver(const Browser& browser); |
Paweł Hajdan Jr.
2011/07/25 18:06:13
Please don't add those "magic constructors" here,
Greg Billock
2011/08/02 18:11:33
I can do that. Shall I make two new subclasses her
Paweł Hajdan Jr.
2011/08/02 20:11:19
Well, do we actually need those ctors? Why not do
|
+ |
virtual ~WindowedNotificationObserver(); |
// Wait until the specified notification occurs. If the notification was |