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

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

Issue 2601843002: Convert more test helpers to base::RunLoop, fix page title checks. (Closed)
Patch Set: Remove unneeded call. 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
Index: content/public/test/test_utils.cc
diff --git a/content/public/test/test_utils.cc b/content/public/test/test_utils.cc
index 4c6449df4a768ca0e90008041d931fabc39c98c3..e63bcfc3e2de2d657c6e621352a749c1bf5190fe 100644
--- a/content/public/test/test_utils.cc
+++ b/content/public/test/test_utils.cc
@@ -315,8 +315,8 @@ InProcessUtilityThreadHelper::~InProcessUtilityThreadHelper() {
if (child_thread_count_) {
DCHECK(BrowserThread::IsMessageLoopValid(BrowserThread::UI));
DCHECK(BrowserThread::IsMessageLoopValid(BrowserThread::IO));
- runner_ = new MessageLoopRunner;
- runner_->Run();
+ run_loop_.reset(new base::RunLoop);
+ run_loop_->Run();
}
BrowserChildProcessObserver::Remove(this);
RenderProcessHost::SetRunRendererInProcess(false);
@@ -332,8 +332,8 @@ void InProcessUtilityThreadHelper::BrowserChildProcessHostDisconnected(
if (--child_thread_count_)
return;
- if (runner_.get())
- runner_->Quit();
+ if (run_loop_)
+ run_loop_->Quit();
}
RenderFrameDeletedObserver::RenderFrameDeletedObserver(RenderFrameHost* rfh)
@@ -370,19 +370,19 @@ void RenderFrameDeletedObserver::WaitUntilDeleted() {
WebContentsDestroyedWatcher::WebContentsDestroyedWatcher(
WebContents* web_contents)
- : WebContentsObserver(web_contents),
- message_loop_runner_(new MessageLoopRunner) {
+ : WebContentsObserver(web_contents) {
EXPECT_TRUE(web_contents != NULL);
}
-WebContentsDestroyedWatcher::~WebContentsDestroyedWatcher() {}
+WebContentsDestroyedWatcher::~WebContentsDestroyedWatcher() {
+}
void WebContentsDestroyedWatcher::Wait() {
- message_loop_runner_->Run();
+ run_loop_.Run();
}
void WebContentsDestroyedWatcher::WebContentsDestroyed() {
- message_loop_runner_->Quit();
+ run_loop_.Quit();
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698