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

Unified Diff: trunk/src/chrome/test/data/fast_tab_close/unload_sleep_before_cookie.html

Issue 14362028: Speculative Revert 195108 "Changes to closing contents with beforeunload/unl..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/chrome/test/data/fast_tab_close/unload_sleep_before_cookie.html
===================================================================
--- trunk/src/chrome/test/data/fast_tab_close/unload_sleep_before_cookie.html (revision 195133)
+++ trunk/src/chrome/test/data/fast_tab_close/unload_sleep_before_cookie.html (working copy)
@@ -1,28 +0,0 @@
-<!--
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
--->
-<html>
-<head>
- <title>unload_sleep_before_cookie</title>
-<script>
-function sleep_ms(ms) {
- var start_ms = Number(new Date());
- var remaining_ms = ms;
- while (remaining_ms > 0) {
- remaining_ms = ms - (Number(new Date()) - start_ms);
- }
-}
-addEventListener("unload", function() {
- sleep_ms(200);
-
- var expires = new Date();
- expires.setMinutes(expires.getMinutes() + 1);
- document.cookie = "unloaded=ohyeah;path=/;expires=" + expires.toUTCString();
- console.log("set the cookie");
-}, false);
-</script>
-</head>
-<body></body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698