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

Unified Diff: content/public/test/browser_test_utils.h

Issue 2630683003: Revert of Convert more test helpers to base::RunLoop, fix page title checks. (Closed)
Patch Set: Created 3 years, 11 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 | « content/public/test/browser_test_base.cc ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/browser_test_utils.h
diff --git a/content/public/test/browser_test_utils.h b/content/public/test/browser_test_utils.h
index 7434184877101e15358ca46e9fd40a11be94532b..e39416c789bd79e3bded26d7690201a40d3915a4 100644
--- a/content/public/test/browser_test_utils.h
+++ b/content/public/test/browser_test_utils.h
@@ -15,7 +15,6 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/process/process.h"
-#include "base/run_loop.h"
#include "base/strings/string16.h"
#include "build/build_config.h"
#include "cc/output/compositor_frame.h"
@@ -347,15 +346,10 @@
#endif
-// Watches title changes on a WebContents, blocking until a title is set.
-// Can wait unitl a specific expected title appears.
+// Watches title changes on a WebContents, blocking until an expected title is
+// set.
class TitleWatcher : public WebContentsObserver {
public:
- // |web_contents| must be non-NULL and needs to stay alive for the
- // entire lifetime of |this|. Will wait for any (non-empty) title unless
- // |AlsoWaitForTitle| is called before waiting.
- explicit TitleWatcher(WebContents* web_contents);
-
// |web_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.
@@ -379,7 +373,7 @@
void TestTitle();
std::vector<base::string16> expected_titles_;
- base::RunLoop run_loop_;
+ scoped_refptr<MessageLoopRunner> message_loop_runner_;
// The most recently observed expected title, if any.
base::string16 observed_title_;
« no previous file with comments | « content/public/test/browser_test_base.cc ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698