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

Unified Diff: content/public/test/test_frame_navigation_observer.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_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 3f20309411b459ad6df3ae0860475d0ce024b00d..46f1906221118a97101fc6c4823083e604151c43 100644
--- a/content/public/test/test_frame_navigation_observer.cc
+++ b/content/public/test/test_frame_navigation_observer.cc
@@ -32,9 +32,7 @@ TestFrameNavigationObserver::TestFrameNavigationObserver(
frame_tree_node_id_(ToRenderFrameHostImpl(adapter)->GetFrameTreeNodeId()),
navigation_started_(false),
has_committed_(false),
- wait_for_commit_(false),
- message_loop_runner_(
- new MessageLoopRunner(MessageLoopRunner::QuitMode::IMMEDIATE)) {
+ wait_for_commit_(false) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
}
@@ -43,7 +41,7 @@ TestFrameNavigationObserver::~TestFrameNavigationObserver() {}
void TestFrameNavigationObserver::Wait() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
wait_for_commit_ = false;
- message_loop_runner_->Run();
+ run_loop_.Run();
}
void TestFrameNavigationObserver::WaitForCommit() {
@@ -53,7 +51,7 @@ void TestFrameNavigationObserver::WaitForCommit() {
return;
wait_for_commit_ = true;
- message_loop_runner_->Run();
+ run_loop_.Run();
}
void TestFrameNavigationObserver::DidStartProvisionalLoadForFrame(
@@ -82,7 +80,7 @@ void TestFrameNavigationObserver::DidCommitProvisionalLoadForFrame(
has_committed_ = true;
if (wait_for_commit_)
- message_loop_runner_->Quit();
+ run_loop_.Quit();
}
void TestFrameNavigationObserver::DidStopLoading() {
@@ -90,7 +88,7 @@ void TestFrameNavigationObserver::DidStopLoading() {
return;
navigation_started_ = false;
- message_loop_runner_->Quit();
+ run_loop_.Quit();
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698