Chromium Code Reviews| 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> |