Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(8)

Issue 2801813005: Only show a beforeunload dialog if a frame has had a user gesture since its load. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 months, 2 weeks ago by Avi (ping after 24h)
Modified:
4 months, 2 weeks ago
CC:
chromium-reviews, caseq+blink_chromium.org, sof, creis+watch_chromium.org, blink-reviews-dom_chromium.org, eae+blinkwatch, nasko+codewatch_chromium.org, jam, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, dglazkov+blink, darin-cc_chromium.org, devtools-reviews_chromium.org, blink-reviews, apavlov+blink_chromium.org, rwlbuis, android-webview-reviews_chromium.org, pfeldman, kozyatinskiy+blink_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Only show a beforeunload dialog if a frame has had a user gesture since its load. https://www.chromestatus.com/feature/5082396709879808 BUG=707007 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2801813005 Cr-Commit-Position: refs/heads/master@{#469891} Committed: https://chromium.googlesource.com/chromium/src/+/336125f7f83771a5fc4a44affdd66327549ab1d7

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : cleanup #

Total comments: 2

Patch Set 4 : aw #

Total comments: 9

Patch Set 5 : test #

Patch Set 6 : test fix #

Total comments: 5

Patch Set 7 : one last bit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+221 lines, -109 lines) Patch
M android_webview/javatests/src/org/chromium/android_webview/test/WebViewModalDialogOverrideTest.java View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/ModalDialogTest.java View 1 2 3 4 5 chunks +37 lines, -1 line 0 comments Download
M chrome/browser/devtools/devtools_sanity_browsertest.cc View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/lifetime/browser_close_manager_browsertest.cc View 1 2 3 4 5 6 23 chunks +32 lines, -36 lines 0 comments Download
M chrome/browser/ui/browser_browsertest.cc View 1 2 3 4 6 chunks +7 lines, -15 lines 0 comments Download
M chrome/browser/unload_browsertest.cc View 1 2 3 4 11 chunks +17 lines, -50 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl_browsertest.cc View 1 2 3 4 5 2 chunks +43 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/test/browser_test_utils.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/test/browser_test_utils.cc View 1 2 3 4 1 chunk +12 lines, -0 lines 0 comments Download
A + content/test/data/render_frame_host/beforeunload.html View 1 chunk +5 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/before-unload-reloads.html View 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/before-unload-returnValue.html View 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/loader/form-submission-after-beforeunload-cancel.html View 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/loader/resources/iframe-with-beforeunload.html View 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/loader/show-only-one-beforeunload-dialog.html View 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/misc/resources/reentrant-beforeunload-helper.html View 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector-protocol/page/javascriptDialogEvents.html View 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
Commit queue not available (can’t edit this change).

Messages

Total messages: 55 (36 generated)
Avi (ping after 24h)
Ted for chrome/android Bo Liu for aw/ Nico for chrome/* Charlie for content/ Rick for ...
5 months, 2 weeks ago (2017-04-06 21:20:51 UTC) #11
boliu
https://codereview.chromium.org/2801813005/diff/40001/android_webview/javatests/src/org/chromium/android_webview/test/WebViewModalDialogOverrideTest.java File android_webview/javatests/src/org/chromium/android_webview/test/WebViewModalDialogOverrideTest.java (right): https://codereview.chromium.org/2801813005/diff/40001/android_webview/javatests/src/org/chromium/android_webview/test/WebViewModalDialogOverrideTest.java#newcode180 android_webview/javatests/src/org/chromium/android_webview/test/WebViewModalDialogOverrideTest.java:180: AwTestTouchUtils.simulateTouchCenterOfView(view); should write a comment explaining this?
5 months, 2 weeks ago (2017-04-06 21:30:13 UTC) #12
Avi (ping after 24h)
https://codereview.chromium.org/2801813005/diff/40001/android_webview/javatests/src/org/chromium/android_webview/test/WebViewModalDialogOverrideTest.java File android_webview/javatests/src/org/chromium/android_webview/test/WebViewModalDialogOverrideTest.java (right): https://codereview.chromium.org/2801813005/diff/40001/android_webview/javatests/src/org/chromium/android_webview/test/WebViewModalDialogOverrideTest.java#newcode180 android_webview/javatests/src/org/chromium/android_webview/test/WebViewModalDialogOverrideTest.java:180: AwTestTouchUtils.simulateTouchCenterOfView(view); On 2017/04/06 21:30:13, boliu wrote: > should write ...
5 months, 2 weeks ago (2017-04-06 22:29:19 UTC) #15
boliu
lgtm
5 months, 2 weeks ago (2017-04-06 22:30:18 UTC) #16
Ted C
On 2017/04/06 22:30:18, boliu wrote: > lgtm chrome/android - lgtm
5 months, 2 weeks ago (2017-04-06 23:10:24 UTC) #17
Rick Byers
WebKit LGTM
5 months, 2 weeks ago (2017-04-07 18:09:03 UTC) #28
Nico
chrome lgtm, but looks pretty copy-pasta-y https://codereview.chromium.org/2801813005/diff/60001/chrome/browser/ui/browser_browsertest.cc File chrome/browser/ui/browser_browsertest.cc (right): https://codereview.chromium.org/2801813005/diff/60001/chrome/browser/ui/browser_browsertest.cc#newcode627 chrome/browser/ui/browser_browsertest.cc:627: // JavaScript onbeforeunload ...
5 months, 2 weeks ago (2017-04-07 20:05:28 UTC) #29
Charlie Reis
Thanks for doing this! It seems like a good change and it's nice that there's ...
5 months, 2 weeks ago (2017-04-10 06:20:10 UTC) #30
Avi (ping after 24h)
Charlie, Nico, please take a look. https://codereview.chromium.org/2801813005/diff/60001/chrome/browser/lifetime/browser_close_manager_browsertest.cc File chrome/browser/lifetime/browser_close_manager_browsertest.cc (right): https://codereview.chromium.org/2801813005/diff/60001/chrome/browser/lifetime/browser_close_manager_browsertest.cc#newcode300 chrome/browser/lifetime/browser_close_manager_browsertest.cc:300: void PrepareForDialog(content::WebContents* web_contents) ...
4 months, 2 weeks ago (2017-05-05 15:30:04 UTC) #39
Nico
What files? chrome/?
4 months, 2 weeks ago (2017-05-05 16:19:46 UTC) #40
Avi (ping after 24h)
On 2017/05/05 16:19:46, Nico wrote: > What files? chrome/? Yep.
4 months, 2 weeks ago (2017-05-05 16:33:50 UTC) #41
Nico
chrome/ lgtm https://codereview.chromium.org/2801813005/diff/100001/chrome/browser/devtools/devtools_sanity_browsertest.cc File chrome/browser/devtools/devtools_sanity_browsertest.cc (right): https://codereview.chromium.org/2801813005/diff/100001/chrome/browser/devtools/devtools_sanity_browsertest.cc#newcode391 chrome/browser/devtools/devtools_sanity_browsertest.cc:391: content::PrepContentsForBeforeUnloadTest(web_contents); :-) https://codereview.chromium.org/2801813005/diff/100001/chrome/browser/lifetime/browser_close_manager_browsertest.cc File chrome/browser/lifetime/browser_close_manager_browsertest.cc (right): https://codereview.chromium.org/2801813005/diff/100001/chrome/browser/lifetime/browser_close_manager_browsertest.cc#newcode299 ...
4 months, 2 weeks ago (2017-05-05 16:36:47 UTC) #42
Avi (ping after 24h)
https://codereview.chromium.org/2801813005/diff/100001/chrome/browser/lifetime/browser_close_manager_browsertest.cc File chrome/browser/lifetime/browser_close_manager_browsertest.cc (right): https://codereview.chromium.org/2801813005/diff/100001/chrome/browser/lifetime/browser_close_manager_browsertest.cc#newcode299 chrome/browser/lifetime/browser_close_manager_browsertest.cc:299: content::PrepContentsForBeforeUnloadTest( On 2017/05/05 16:36:47, Nico wrote: > nit: If ...
4 months, 2 weeks ago (2017-05-05 19:29:07 UTC) #43
Charlie Reis
Thanks for the extra test! content/ LGTM. https://codereview.chromium.org/2801813005/diff/100001/chrome/browser/lifetime/browser_close_manager_browsertest.cc File chrome/browser/lifetime/browser_close_manager_browsertest.cc (right): https://codereview.chromium.org/2801813005/diff/100001/chrome/browser/lifetime/browser_close_manager_browsertest.cc#newcode299 chrome/browser/lifetime/browser_close_manager_browsertest.cc:299: content::PrepContentsForBeforeUnloadTest( On ...
4 months, 2 weeks ago (2017-05-05 21:27:02 UTC) #44
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/2801813005/120001
4 months, 2 weeks ago (2017-05-05 22:19:51 UTC) #47
Avi (ping after 24h)
https://codereview.chromium.org/2801813005/diff/100001/chrome/browser/lifetime/browser_close_manager_browsertest.cc File chrome/browser/lifetime/browser_close_manager_browsertest.cc (right): https://codereview.chromium.org/2801813005/diff/100001/chrome/browser/lifetime/browser_close_manager_browsertest.cc#newcode299 chrome/browser/lifetime/browser_close_manager_browsertest.cc:299: content::PrepContentsForBeforeUnloadTest( On 2017/05/05 21:27:02, Charlie Reis wrote: > On ...
4 months, 2 weeks ago (2017-05-05 22:22:01 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/262970)
4 months, 2 weeks ago (2017-05-05 23:05:26 UTC) #50
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/2801813005/120001
4 months, 2 weeks ago (2017-05-06 19:24:29 UTC) #52
commit-bot: I haz the power
4 months, 2 weeks ago (2017-05-06 22:26:15 UTC) #55
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/336125f7f83771a5fc4a44affdd6...
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld b40b6558b