Commit 983406b3 authored by Alexander Timin's avatar Alexander Timin Committed by Commit Bot

[content] Use RFHT::SimulateLoadingCompleted in NavigationSimulator

R=clamy@chromium.org,ahemery@chromium.org
BUG=1011770

Change-Id: Ic4935b2f74d2fffe9ea6df0db0f796e6d4fe6f1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1836091
Commit-Queue: Alexander Timin <altimin@chromium.org>
Reviewed-by: default avatarCamille Lamy <clamy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704382}
parent a2bc64bc
......@@ -1341,8 +1341,7 @@ void NavigationSimulatorImpl::SetKeepLoading(bool keep_loading) {
void NavigationSimulatorImpl::StopLoading() {
CHECK(render_frame_host_);
render_frame_host_->OnMessageReceived(
FrameHostMsg_DidStopLoading(render_frame_host_->GetRoutingID()));
render_frame_host_->SimulateLoadingCompleted();
}
void NavigationSimulatorImpl::FailLoading(
......
......@@ -693,4 +693,8 @@ TestRenderFrameHost::CreateStubBrowserInterfaceBrokerReceiver() {
.InitWithNewPipeAndPassReceiver();
}
void TestRenderFrameHost::SimulateLoadingCompleted() {
OnDidStopLoading();
}
} // namespace content
......@@ -207,6 +207,10 @@ class TestRenderFrameHost : public RenderFrameHostImpl,
return navigation_requests_;
}
// Simulates RenderFrameHost finishing loading and dispatching all relevant
// callbacks.
void SimulateLoadingCompleted();
protected:
void SendCommitNavigation(
mojom::NavigationClient* navigation_client,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment