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

Unified Diff: content/test/data/indexeddb/force_close_event.js

Issue 18660012: IndexedDB: Test for "close" event when connection is force-closed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More context simplification Created 7 years, 5 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: content/test/data/indexeddb/force_close_event.js
diff --git a/content/test/data/indexeddb/force_close_event.js b/content/test/data/indexeddb/force_close_event.js
new file mode 100644
index 0000000000000000000000000000000000000000..44861c6d31a02177edcf96bf3119a3e99c9c5d12
--- /dev/null
+++ b/content/test/data/indexeddb/force_close_event.js
@@ -0,0 +1,22 @@
+// Copyright (c) 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.
+
+function test() {
+ indexedDBTest(onUpgradeNeeded, onOpenSuccess);
+}
+
+function onUpgradeNeeded(e) {
+}
+
+function onOpenSuccess(e) {
+ // Don't let GC claim the connection
+ window.db = e.target.result;
+ window.db.onclose = onDatabaseClose;
+ document.title = 'connection ready';
+}
+
+function onDatabaseClose(e)
+{
+ document.title = 'connection closed';
+}

Powered by Google App Engine
This is Rietveld 408576698