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

Unified Diff: content/public/test/test_utils.cc

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/test_utils.h ('k') | content/test/content_browser_test_utils_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/test_utils.cc
diff --git a/content/public/test/test_utils.cc b/content/public/test/test_utils.cc
index e63bcfc3e2de2d657c6e621352a749c1bf5190fe..4c6449df4a768ca0e90008041d931fabc39c98c3 100644
--- a/content/public/test/test_utils.cc
+++ b/content/public/test/test_utils.cc
@@ -315,8 +315,8 @@
if (child_thread_count_) {
DCHECK(BrowserThread::IsMessageLoopValid(BrowserThread::UI));
DCHECK(BrowserThread::IsMessageLoopValid(BrowserThread::IO));
- run_loop_.reset(new base::RunLoop);
- run_loop_->Run();
+ runner_ = new MessageLoopRunner;
+ runner_->Run();
}
BrowserChildProcessObserver::Remove(this);
RenderProcessHost::SetRunRendererInProcess(false);
@@ -332,8 +332,8 @@
if (--child_thread_count_)
return;
- if (run_loop_)
- run_loop_->Quit();
+ if (runner_.get())
+ runner_->Quit();
}
RenderFrameDeletedObserver::RenderFrameDeletedObserver(RenderFrameHost* rfh)
@@ -370,19 +370,19 @@
WebContentsDestroyedWatcher::WebContentsDestroyedWatcher(
WebContents* web_contents)
- : WebContentsObserver(web_contents) {
+ : WebContentsObserver(web_contents),
+ message_loop_runner_(new MessageLoopRunner) {
EXPECT_TRUE(web_contents != NULL);
}
-WebContentsDestroyedWatcher::~WebContentsDestroyedWatcher() {
-}
+WebContentsDestroyedWatcher::~WebContentsDestroyedWatcher() {}
void WebContentsDestroyedWatcher::Wait() {
- run_loop_.Run();
+ message_loop_runner_->Run();
}
void WebContentsDestroyedWatcher::WebContentsDestroyed() {
- run_loop_.Quit();
+ message_loop_runner_->Quit();
}
} // namespace content
« no previous file with comments | « content/public/test/test_utils.h ('k') | content/test/content_browser_test_utils_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698