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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/before-unload-reloads.html

Issue 2801813005: Only show a beforeunload dialog if a frame has had a user gesture since its load. (Closed)
Patch Set: one last bit Created 3 years, 7 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
Index: third_party/WebKit/LayoutTests/fast/events/before-unload-reloads.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/before-unload-reloads.html b/third_party/WebKit/LayoutTests/fast/events/before-unload-reloads.html
index 06a267899aa619c0729391a77589bdf8ea7e0a92..cd582afdaceddb4486239ef1b0cb7f621c9bfa31 100644
--- a/third_party/WebKit/LayoutTests/fast/events/before-unload-reloads.html
+++ b/third_party/WebKit/LayoutTests/fast/events/before-unload-reloads.html
@@ -6,6 +6,12 @@ window.onload = function ()
testRunner.setShouldStayOnPageAfterHandlingBeforeUnload(true);
testRunner.waitUntilDone();
}
+ // JavaScript onbeforeunload dialogs require a user gesture.
+ if (window.eventSender) {
+ eventSender.mouseMoveTo(5, 5);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ }
if (sessionStorage.fail) {
if (window.testRunner)
testRunner.notifyDone();

Powered by Google App Engine
This is Rietveld 408576698