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

Issue 2373273002: Run unload handlers when navigating to about:blank using PlzNavigate. (Closed)

Created:
4 years, 2 months ago by jam
Modified:
4 years, 2 months ago
Reviewers:
Charlie Reis
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

Run unload handlers when navigating to about:blank using PlzNavigate. Previously, NavigatorImpl::RequestNavigation would only run the unload handler if ShouldMakeNetworkRequestForURL returns true for the URL. However ShouldMakeNetworkRequestForURL returns false for some urls that cause navigation, e.g. about:blank. So specifically check for javascript scheme, as that's the only one we don't want to run unload handlers for as it's not a real navigation. This fixes the following tests: BrowserTest.BeforeUnloadVsBeforeReload BrowserTest.CancelBeforeUnloadResetsURL BrowserTest.ReloadThenCancelBeforeUnload BUG=504347 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/b618e0bb2169495e61072983f2a101c97fab9b63 Cr-Commit-Position: refs/heads/master@{#422302}

Patch Set 1 #

Patch Set 2 : test class fix #

Patch Set 3 : fix test #

Total comments: 10

Patch Set 4 : review comments #

Total comments: 4

Patch Set 5 : review nit #

Patch Set 6 : undo incorrect change that broke chrome://crash #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -14 lines) Patch
M chrome/browser/crash_recovery_browsertest.cc View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_resource_request_policy_apitest.cc View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/ui/browser_browsertest.cc View 1 2 3 7 chunks +34 lines, -1 line 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 1 2 3 4 5 3 chunks +7 lines, -9 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 3 chunks +5 lines, -3 lines 0 comments Download
M content/test/test_render_frame_host.cc View 1 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (33 generated)
jam
4 years, 2 months ago (2016-09-29 15:35:00 UTC) #7
jam
4 years, 2 months ago (2016-09-29 17:00:54 UTC) #13
jam
Switching to Charlie since Camille is OOO.
4 years, 2 months ago (2016-09-29 23:13:34 UTC) #22
Charlie Reis
Thanks! A few thoughts on getting the condition right. Is there a typo in the ...
4 years, 2 months ago (2016-09-30 17:36:10 UTC) #25
jam
https://codereview.chromium.org/2373273002/diff/60001/chrome/browser/ui/browser_browsertest.cc File chrome/browser/ui/browser_browsertest.cc (right): https://codereview.chromium.org/2373273002/diff/60001/chrome/browser/ui/browser_browsertest.cc#newcode914 chrome/browser/ui/browser_browsertest.cc:914: // Test that when a page has an onunload ...
4 years, 2 months ago (2016-09-30 22:42:07 UTC) #29
Charlie Reis
Thanks! LGTM with nit. https://codereview.chromium.org/2373273002/diff/80001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (right): https://codereview.chromium.org/2373273002/diff/80001/content/browser/frame_host/navigator_impl.cc#newcode414 content/browser/frame_host/navigator_impl.cc:414: IsRendererDebugURL(dest_url)) { Interesting. This is ...
4 years, 2 months ago (2016-09-30 22:54:42 UTC) #31
jam
https://codereview.chromium.org/2373273002/diff/80001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (right): https://codereview.chromium.org/2373273002/diff/80001/content/browser/frame_host/navigator_impl.cc#newcode414 content/browser/frame_host/navigator_impl.cc:414: IsRendererDebugURL(dest_url)) { On 2016/09/30 22:54:42, Charlie Reis wrote: > ...
4 years, 2 months ago (2016-09-30 23:07:50 UTC) #34
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/2373273002/100001
4 years, 2 months ago (2016-09-30 23:08:13 UTC) #35
jam
https://codereview.chromium.org/2373273002/diff/60001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (right): https://codereview.chromium.org/2373273002/diff/60001/content/browser/frame_host/navigator_impl.cc#newcode1062 content/browser/frame_host/navigator_impl.cc:1062: url::kJavaScriptScheme)) { On 2016/09/30 22:42:07, jam wrote: > On ...
4 years, 2 months ago (2016-09-30 23:11:41 UTC) #36
Charlie Reis
https://codereview.chromium.org/2373273002/diff/60001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (right): https://codereview.chromium.org/2373273002/diff/60001/content/browser/frame_host/navigator_impl.cc#newcode1062 content/browser/frame_host/navigator_impl.cc:1062: url::kJavaScriptScheme)) { On 2016/09/30 23:11:41, jam wrote: > On ...
4 years, 2 months ago (2016-09-30 23:20:08 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/307907)
4 years, 2 months ago (2016-10-01 00:57:19 UTC) #39
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/2373273002/140001
4 years, 2 months ago (2016-10-01 04:00:12 UTC) #43
commit-bot: I haz the power
Committed patchset #6 (id:140001)
4 years, 2 months ago (2016-10-01 05:28:43 UTC) #45
commit-bot: I haz the power
4 years, 2 months ago (2016-10-01 05:30:58 UTC) #47
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/b618e0bb2169495e61072983f2a101c97fab9b63
Cr-Commit-Position: refs/heads/master@{#422302}

Powered by Google App Engine
This is Rietveld 408576698