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

Issue 2580753002: Fix NavigationControllerBrowserTest. EnsureSamePageNavigationUpdatesFrameNavigationEntry browser nav (Closed)

Created:
4 years ago by ananta
Modified:
3 years, 12 months ago
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ensure that duplicate navigations are tagged as reload in the browser. This includes the cases where we are navigating to a URL which was committed previously or to a URL for which we haven't received a commit. scottmg's patch for reference is here https://codereview.chromium.org/2381503003. This was reverted due to failures on Android. The failure was seen in cases like this. Navigation to url1->url2->url1. If the first navigation is not committed yet, then we would treat the last navigation to url1 as a reload. This causes inbox on Android to hang. The proposed fix is to use the last pending navigation if it exists or the last committed navigation to compare whether the current navigation is a reload. This fixes the issues with Android Changes in this patch are as below: 1. Add members in the NavigationControllerImpl class to hold the last pending navigation entry, its index, and the last transient index. The last transient index is used to avoid treating navigations as reloads if we have an interstitial being displayed. 2. Add a flag in the NavigationEntryImpl class to indicate whether there was a SSL error in the navigation. This was added to fix browser test failures. We avoid treating navigations as reloads when the last pending navigation has a SSL error. 3. We compare the url of the last pending or committed entry with the current navigation entry to see if it is a reload. There are a number of cases to consider here. Please look at the code. 4. Added a unittest NavigationControllerTest.MultipleNavigationsAndReload which tests various combinations of pending and committed navigations to ensure that the navigation is tagged correctly as reload or not. The non plznavigate case does not have the bug when the EnsureSamePageNavigationUpdatesFrameNavigationEntry test because Blink tells us the correct navigation history, i.e. whether a navigation is a reload, etc. R=nasko@chromium.org,clamy@chromium.org BUG=630103, 475027, 536102, 664319, 676235 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/3bdd8aea0439f2c6a50d24c3c805bc7e579d5a2c Cr-Commit-Position: refs/heads/master@{#440443}

Patch Set 1 #

Patch Set 2 : Skip data urls #

Patch Set 3 : Fix compile failures #

Patch Set 4 : Fix redness #

Total comments: 2

Patch Set 5 : Check if the base URL is not empty #

Patch Set 6 : Added unittest NavigationControllerTest.MultipleNavigationsAndReload #

Patch Set 7 : Fix browser_tests redness. #

Patch Set 8 : Fix compile failures #

Patch Set 9 : Skip pending navigations with SSL errors. #

Patch Set 10 : Fix compile failures #

Patch Set 11 : Fix asan failures. #

Patch Set 12 : Fix page transition check to properly identify reloads. #

Patch Set 13 : Move the code which determines which transitions to treat as forced reloads to its own function Sho… #

Total comments: 4

Patch Set 14 : Address review comments #

Patch Set 15 : Set is_loading_ to true in RenderFrameHostImpl::OnBeginNavigate(). This identifies the start of a n… #

Patch Set 16 : Fix comment #

Patch Set 17 : Fix redness caused by a CHECK in WebContentsObserverSanityChecker for the is_loading_ flag. We need… #

Patch Set 18 : Avoid the is_loading_ check for PlzNavigate with a comment explaining why. #

Patch Set 19 : Revert changes to set is_loading_ to true in navigation request start as they are unrelated to the … #

Patch Set 20 : Revert changes to browser-side-navigation.linux.content_browsertests.filter. Will do that in a sepa… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+209 lines, -8 lines) Patch
M content/browser/frame_host/navigation_controller_impl.h View 1 2 3 4 5 6 7 8 3 chunks +15 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +93 lines, -4 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +85 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_entry_impl.h View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_entry_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/ssl/ssl_manager.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 114 (85 generated)
ananta
4 years ago (2016-12-15 14:34:33 UTC) #16
Charlie Reis
Thanks-- seems like a good direction to mainly stick with the previous fix and look ...
4 years ago (2016-12-15 22:28:10 UTC) #17
ananta
https://codereview.chromium.org/2580753002/diff/60001/content/browser/frame_host/navigation_controller_impl.cc File content/browser/frame_host/navigation_controller_impl.cc (right): https://codereview.chromium.org/2580753002/diff/60001/content/browser/frame_host/navigation_controller_impl.cc#newcode1797 content/browser/frame_host/navigation_controller_impl.cc:1797: !pending_entry_->GetURL().SchemeIs(url::kDataScheme) && On 2016/12/15 22:28:09, Charlie Reis (OOO soon) ...
4 years ago (2016-12-16 00:42:28 UTC) #19
ananta
+boliu
4 years ago (2016-12-16 00:59:55 UTC) #23
Charlie Reis
Seems worth a try. boliu@ or sgurun@, is there any way to try this CL ...
4 years ago (2016-12-16 01:06:27 UTC) #25
sgurun-gerrit only
I will give it a try. However, is it possible to change the title to ...
4 years ago (2016-12-16 01:13:29 UTC) #26
sgurun-gerrit only
On 2016/12/16 01:13:29, sgurun wrote: > I will give it a try. However, is it ...
4 years ago (2016-12-16 01:28:02 UTC) #27
sgurun-gerrit only
On 2016/12/16 01:28:02, sgurun wrote: > On 2016/12/16 01:13:29, sgurun wrote: > > I will ...
4 years ago (2016-12-16 19:21:31 UTC) #30
Charlie Reis
On 2016/12/16 19:21:31, sgurun wrote: > On 2016/12/16 01:28:02, sgurun wrote: > > On 2016/12/16 ...
4 years ago (2016-12-16 19:32:08 UTC) #31
sgurun-gerrit only
On 2016/12/16 19:32:08, Charlie Reis (OOO soon) wrote: > On 2016/12/16 19:21:31, sgurun wrote: > ...
4 years ago (2016-12-16 19:33:32 UTC) #32
boliu
Ok, I don't understand what inbox is trying to do, but here's what happens. Each ...
4 years ago (2016-12-16 22:50:43 UTC) #33
boliu
On 2016/12/16 22:50:43, boliu wrote: > Ok, I don't understand what inbox is trying to ...
4 years ago (2016-12-16 22:52:53 UTC) #34
sgurun-gerrit only
On 2016/12/16 22:52:53, boliu wrote: > On 2016/12/16 22:50:43, boliu wrote: > > Ok, I ...
4 years ago (2016-12-16 22:55:12 UTC) #35
ananta
On 2016/12/16 22:55:12, sgurun wrote: > On 2016/12/16 22:52:53, boliu wrote: > > On 2016/12/16 ...
4 years ago (2016-12-16 23:09:52 UTC) #36
boliu
On 2016/12/16 23:09:52, ananta wrote: > On 2016/12/16 22:55:12, sgurun wrote: > > On 2016/12/16 ...
4 years ago (2016-12-16 23:18:59 UTC) #37
sgurun-gerrit only
On 2016/12/16 23:18:59, boliu wrote: > On 2016/12/16 23:09:52, ananta wrote: > > On 2016/12/16 ...
4 years ago (2016-12-16 23:48:36 UTC) #38
ananta
On 2016/12/16 23:48:36, sgurun wrote: > On 2016/12/16 23:18:59, boliu wrote: > > On 2016/12/16 ...
4 years ago (2016-12-17 03:09:30 UTC) #39
ananta
+nasko
4 years ago (2016-12-20 19:12:14 UTC) #74
scottmg
The last_navigation thing seems ok to me, but I'm not sure about the SSL bits. ...
4 years ago (2016-12-20 22:34:06 UTC) #75
scottmg
The site-isolation webkit_tests http/tests/intersection-observer/iframe-cross-origin.html failure could be related too? :( 10:24:51.154 21463 worker/1 http/tests/security/mixedContent/insecure-iframe-in-main-frame.html crashed, ...
4 years ago (2016-12-20 22:37:00 UTC) #76
ananta
The SSL change was to fix the CaptivePortalBrowserTest.InterstitialTimerNavigate* tests. I don't fully understand these tests ...
4 years ago (2016-12-20 23:14:10 UTC) #77
ananta
+clamy
4 years ago (2016-12-21 00:22:47 UTC) #79
ananta
On 2016/12/20 22:37:00, scottmg (OOO soon) wrote: > The site-isolation webkit_tests > http/tests/intersection-observer/iframe-cross-origin.html failure could ...
4 years ago (2016-12-21 00:25:48 UTC) #83
clamy
On 2016/12/21 00:25:48, ananta wrote: > On 2016/12/20 22:37:00, scottmg (OOO soon) wrote: > > ...
4 years ago (2016-12-21 13:01:55 UTC) #95
ananta
On 2016/12/21 13:01:55, clamy wrote: > On 2016/12/21 00:25:48, ananta wrote: > > On 2016/12/20 ...
4 years ago (2016-12-21 18:16:21 UTC) #96
clamy
Thanks! Lgtm.
4 years ago (2016-12-22 16:20:09 UTC) #106
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2580753002/400001
3 years, 12 months ago (2016-12-22 17:06:27 UTC) #109
commit-bot: I haz the power
Committed patchset #20 (id:400001)
3 years, 12 months ago (2016-12-22 17:12:36 UTC) #112
commit-bot: I haz the power
3 years, 12 months ago (2016-12-22 17:14:37 UTC) #114
Message was sent while issue was closed.
Patchset 20 (id:??) landed as
https://crrev.com/3bdd8aea0439f2c6a50d24c3c805bc7e579d5a2c
Cr-Commit-Position: refs/heads/master@{#440443}

Powered by Google App Engine
This is Rietveld 408576698