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

Unified Diff: content/public/test/test_frame_navigation_observer.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_frame_navigation_observer.h ('k') | content/public/test/test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/test_frame_navigation_observer.cc
diff --git a/content/public/test/test_frame_navigation_observer.cc b/content/public/test/test_frame_navigation_observer.cc
index 46f1906221118a97101fc6c4823083e604151c43..3f20309411b459ad6df3ae0860475d0ce024b00d 100644
--- a/content/public/test/test_frame_navigation_observer.cc
+++ b/content/public/test/test_frame_navigation_observer.cc
@@ -32,7 +32,9 @@
frame_tree_node_id_(ToRenderFrameHostImpl(adapter)->GetFrameTreeNodeId()),
navigation_started_(false),
has_committed_(false),
- wait_for_commit_(false) {
+ wait_for_commit_(false),
+ message_loop_runner_(
+ new MessageLoopRunner(MessageLoopRunner::QuitMode::IMMEDIATE)) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
}
@@ -41,7 +43,7 @@
void TestFrameNavigationObserver::Wait() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
wait_for_commit_ = false;
- run_loop_.Run();
+ message_loop_runner_->Run();
}
void TestFrameNavigationObserver::WaitForCommit() {
@@ -51,7 +53,7 @@
return;
wait_for_commit_ = true;
- run_loop_.Run();
+ message_loop_runner_->Run();
}
void TestFrameNavigationObserver::DidStartProvisionalLoadForFrame(
@@ -80,7 +82,7 @@
has_committed_ = true;
if (wait_for_commit_)
- run_loop_.Quit();
+ message_loop_runner_->Quit();
}
void TestFrameNavigationObserver::DidStopLoading() {
@@ -88,7 +90,7 @@
return;
navigation_started_ = false;
- run_loop_.Quit();
+ message_loop_runner_->Quit();
}
} // namespace content
« no previous file with comments | « content/public/test/test_frame_navigation_observer.h ('k') | content/public/test/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698