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

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: Correct order of checks 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
(Empty)
1 <html>
2 <head>
3 <title>Loading...</title>
4 <script>
5 window.onbeforeunload = function(e) {
6 // Delay must be slightly bigger than
7 // RenderViewHostImpl::kUnloadTimeoutMS to trigger
8 // "renderer unresponsive".
9 var delay = 1500;
10 var finishTime = new Date().getTime() + delay;
11 while (new Date() < finishTime) {}
12 return null;
13 };
14 </script>
15 </head>
16 <body>
17 <p>Navigate to another page to trigger beforeunload handler.</p>
18 </body>
19 </html>
OLDNEW
« no previous file with comments | « chrome/browser/lifetime/browser_close_manager_browsertest.cc ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698