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

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

Issue 2381503003: PlzNav: Fix NavigationControllerBrowserTest.EnsureSamePageNavigationUpdatesFrameNaviga… (Closed)
Patch Set: remove logging Created 4 years, 1 month 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 | testing/buildbot/filters/browser-side-navigation.linux.content_browsertests.filter » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_controller_impl.cc
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index 420e3fd1d6e77c6cd68710293df92ea490739f3b..d96400cf672bd7d711cd9059a95de59b6832afaf 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -1789,6 +1789,19 @@ void NavigationControllerImpl::NavigateToPendingEntry(ReloadType reload_type) {
CancelForNavigation();
}
+ // Note that we don't want to convert to a reload for history navigations, so
Charlie Reis 2016/11/01 21:18:40 nit: It's not obvious what this block is doing at
scottmg 2016/11/01 22:14:30 Done.
+ // this must be above the retrieval of the pending_entry_ below when
+ // pending_entry_index_ is used.
+ if (reload_type == ReloadType::NONE && GetLastCommittedEntry() &&
+ pending_entry_ && pending_entry_->frame_tree_node_id() == -1 &&
+ pending_entry_->GetURL() == GetLastCommittedEntry()->GetURL() &&
+ !pending_entry_->GetHasPostData() &&
+ // This check is required for Android WebView loadDataWithBaseURL.
+ GetLastCommittedEntry()->GetVirtualURL() ==
+ pending_entry_->GetVirtualURL()) {
Charlie Reis 2016/11/01 21:18:40 Just as a sanity check, I patched this in and trie
scottmg 2016/11/01 22:14:30 Thanks for checking!
+ reload_type = ReloadType::MAIN_RESOURCE;
+ }
+
// For session history navigations only the pending_entry_index_ is set.
if (!pending_entry_) {
CHECK_NE(pending_entry_index_, -1);
« no previous file with comments | « no previous file | testing/buildbot/filters/browser-side-navigation.linux.content_browsertests.filter » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698