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

Unified Diff: chrome/test/data/extensions/unload_listener/page.js

Issue 2355183002: [Extensions] Don't run unload listeners when an extension is removed (Closed)
Patch Set: Remove terminated extensions reference Created 4 years, 3 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
« no previous file with comments | « chrome/test/data/extensions/unload_listener/page.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/unload_listener/page.js
diff --git a/chrome/test/data/extensions/unload_listener/page.js b/chrome/test/data/extensions/unload_listener/page.js
new file mode 100644
index 0000000000000000000000000000000000000000..205375e6711c40f612a0622abdf4cbf0619f7a79
--- /dev/null
+++ b/chrome/test/data/extensions/unload_listener/page.js
@@ -0,0 +1,12 @@
+// Copyright 2016 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.
+
+function onUnload() {
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', 'https://www.example.com/', true);
+ xhr.send();
+}
+
+window.onbeforeunload = onUnload;
+window.onunload = onUnload;
« no previous file with comments | « chrome/test/data/extensions/unload_listener/page.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698