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

Side by Side Diff: chrome/test/data/beforeunload_slow.html

Issue 1968933002: Fix: tabs slow to response to beforeunload are closed prematurely. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use whole rfhi::BeforeUnloadAck Created 4 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 <head> 2 <head>
3 <title>Loading...</title> 3 <title>Loading...</title>
4 <script> 4 <script>
5 window.onbeforeunload = function(e) { while(true); }; 5 window.onbeforeunload = function(e) {
6 var ms = 1500;
Charlie Reis 2016/05/19 22:11:56 Please put a comment saying this is expected to be
7 ms += new Date().getTime();
Charlie Reis 2016/05/19 22:11:56 nit: var finishTime = new Date().getTime() + delay
8 while (new Date() < ms) {}
9 return null;
10 };
6 </script> 11 </script>
7 </head> 12 </head>
8 <body> 13 <body>
9 <p>Navigate to another page to trigger beforeunload handler.</p> 14 <p>Navigate to another page to trigger beforeunload handler.</p>
10 </body> 15 </body>
11 </html> 16 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698