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

Unified Diff: content/browser/frame_host/navigation_controller_impl_browsertest.cc

Issue 2662463002: Convert NavigationControllerBrowserTest to use the new navigation callbacks. (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_controller_impl_browsertest.cc
diff --git a/content/browser/frame_host/navigation_controller_impl_browsertest.cc b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
index af3a4999865428e40593d9cde1d99fc5b55f3435..c6bcc56ae13897c74abfefa77f5f107bd5f48b00 100644
--- a/content/browser/frame_host/navigation_controller_impl_browsertest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
@@ -714,17 +714,17 @@ class LoadCommittedCapturer : public WebContentsObserver {
frame_tree_node_id_ = frame_tree_node_id;
}
- void DidCommitProvisionalLoadForFrame(
- RenderFrameHost* render_frame_host,
- const GURL& url,
- ui::PageTransition transition_type) override {
+ void DidFinishNavigation(NavigationHandle* navigation_handle) override {
+ if (!navigation_handle->HasCommitted())
+ return;
+
DCHECK_NE(0, frame_tree_node_id_);
- RenderFrameHostImpl* rfh =
- static_cast<RenderFrameHostImpl*>(render_frame_host);
- if (rfh->frame_tree_node()->frame_tree_node_id() != frame_tree_node_id_)
+ if (navigation_handle->GetRenderFrameHost()->GetFrameTreeNodeId() !=
+ frame_tree_node_id_) {
return;
+ }
- transition_type_ = transition_type;
+ transition_type_ = navigation_handle->GetPageTransition();
if (!web_contents()->IsLoading())
message_loop_runner_->Quit();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698