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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/beforeunload_slow.html
diff --git a/chrome/test/data/beforeunload_hang.html b/chrome/test/data/beforeunload_slow.html
similarity index 51%
copy from chrome/test/data/beforeunload_hang.html
copy to chrome/test/data/beforeunload_slow.html
index a952084def394ee463290501ad7943168b028349..4be478fddbedbb673cd06cd11154ee409a8c4b88 100644
--- a/chrome/test/data/beforeunload_hang.html
+++ b/chrome/test/data/beforeunload_slow.html
@@ -2,7 +2,12 @@
<head>
<title>Loading...</title>
<script>
- window.onbeforeunload = function(e) { while(true); };
+ window.onbeforeunload = function(e) {
+ var ms = 1500;
Charlie Reis 2016/05/19 22:11:56 Please put a comment saying this is expected to be
+ ms += new Date().getTime();
Charlie Reis 2016/05/19 22:11:56 nit: var finishTime = new Date().getTime() + delay
+ while (new Date() < ms) {}
+ return null;
+ };
</script>
</head>
<body>

Powered by Google App Engine
This is Rietveld 408576698