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

Unified Diff: third_party/WebKit/LayoutTests/fast/loader/show-only-one-beforeunload-dialog.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/loader/show-only-one-beforeunload-dialog.html
diff --git a/third_party/WebKit/LayoutTests/fast/loader/show-only-one-beforeunload-dialog.html b/third_party/WebKit/LayoutTests/fast/loader/show-only-one-beforeunload-dialog.html
index 0549739f01373a4bee04a8a128514e565873d399..82a98dcb18bfa94dc9e41c9690be6914b9e2ccd9 100644
--- a/third_party/WebKit/LayoutTests/fast/loader/show-only-one-beforeunload-dialog.html
+++ b/third_party/WebKit/LayoutTests/fast/loader/show-only-one-beforeunload-dialog.html
@@ -7,6 +7,13 @@
testRunner.waitUntilDone();
}
+ // JavaScript onbeforeunload dialogs require a user gesture.
+ if (window.eventSender) {
+ eventSender.mouseMoveTo(5, 5);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ }
+
window.onload = function()
{
window.setTimeout("window.location.href = 'resources/notify-done.html';", 0);

Powered by Google App Engine
This is Rietveld 408576698