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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/misc/resources/reentrant-beforeunload-helper.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 unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <body> 2 <body>
3 <script> 3 <script>
4 // JavaScript onbeforeunload dialogs require a user gesture.
5 if (window.eventSender) {
6 eventSender.mouseMoveTo(5, 5);
7 eventSender.mouseDown();
8 eventSender.mouseUp();
9 }
10
4 window.onbeforeunload = function() { 11 window.onbeforeunload = function() {
5 window.close(); 12 window.close();
6 return "This should only appear once."; 13 return "This should only appear once.";
7 } 14 }
8 </script> 15 </script>
9 </body> 16 </body>
10 </html> 17 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698