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

Side by Side Diff: content/test/data/hang_before_unload.html

Issue 1825523002: Do not reset navigation state when BeforeUnload is cancelled by a commit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + addressed nit Created 4 years, 8 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
(Empty)
1 <html>
2
3 <head><title>BeforeUnload dialog</title>
4 <script>
5 function clickLink() {
6 var evt = document.createEvent("MouseEvents");
7 evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, fals e,
8 false, false, 0, null);
9 var target = document.getElementById("link");
10 target.dispatchEvent(evt);
11 }
12
13 function clickLinkSoon() {
14 window.setTimeout(clickLink, 100);
15 return true;
16 }
17
18 window.addEventListener("beforeunload", function(e) {
19 var confirmationMessage = "foo";
20 e.returnValue = confirmationMessage;
21 return confirmationMessage;
22 });
23
24 </script>
25 </head>
26
27 <a href="title2.html" id="link">link</a><br>
28
29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698