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

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

Issue 7553009: Add some browser tests for net-internals (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix test_view.js 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
« no previous file with comments | « chrome/common/url_constants.cc ('k') | chrome/test/base/ui_test_utils.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.h
===================================================================
--- chrome/test/base/ui_test_utils.h (revision 94917)
+++ chrome/test/base/ui_test_utils.h (working copy)
@@ -488,12 +488,17 @@
public:
// |tab_contents| must be non-NULL and needs to stay alive for the
// entire lifetime of |this|. |expected_title| is the title that |this|
- // will wait for.
- TitleWatcher(TabContents* tab_contents, const string16& expected_title);
+ // will wait for. If it's not an empty string, |this| will wait for
+ // |failure_title| is well.
+ TitleWatcher(TabContents* tab_contents, const string16& expected_title,
+ const string16& failure_title);
virtual ~TitleWatcher();
- // Waits until the title for the tab is set to the |expected_title|
- // passed into the constructor.
+ // Waits until the title for the tab is set to the |expected_title| or
+ // |failure_title| passed into the constructor or one of the titles added with
+ // AddTitle. Returns true if |expected_title| was seen, and false if
+ // |failure_title| was seen. If both are seen, returns false, however, it's
+ // probably best not to rely of that to avoid any races.
Paweł Hajdan Jr. 2011/08/02 20:19:16 How about returning the last seen title when the m
mmenke 2011/08/02 21:04:40 Sounds good to me. Done. Went ahead and switched
bool Wait() WARN_UNUSED_RESULT;
private:
@@ -504,8 +509,10 @@
TabContents* expected_tab_;
string16 expected_title_;
+ string16 failure_title_;
NotificationRegistrar notification_registrar_;
- bool title_observed_;
+ bool expected_title_observed_;
+ bool failure_title_observed_;
bool quit_loop_on_observation_;
DISALLOW_COPY_AND_ASSIGN(TitleWatcher);
« no previous file with comments | « chrome/common/url_constants.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698