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

Unified Diff: LayoutTests/storage/indexeddb/createIndex-deleteObjectStore.htm

Issue 235883002: IndexedDB: Make sure indexing completes if object store is deleted (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « no previous file | LayoutTests/storage/indexeddb/createIndex-deleteObjectStore-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/storage/indexeddb/createIndex-deleteObjectStore.htm
diff --git a/LayoutTests/storage/indexeddb/createIndex-deleteObjectStore.htm b/LayoutTests/storage/indexeddb/createIndex-deleteObjectStore.htm
new file mode 100644
index 0000000000000000000000000000000000000000..a6f5999efee0e912360cd12842c2b8a2cc21e9d1
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/createIndex-deleteObjectStore.htm
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<title>IndexedDB: Deleting an object store with a new index should complete</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+var t = async_test('deleteDatabase success event type, existing DB');
+t.step(function() {
+ var dbName = 'db' + location.pathname;
+ var openRequest = indexedDB.open(dbName);
+ openRequest.onupgradeneeded = t.step_func(function(e) {
+ var db = openRequest.result;
+ var store = db.createObjectStore('store');
+ store.put('value', 'key');
+ store.createIndex('index', 'keyPath');
+ assert_array_equals(db.objectStoreNames, ['store'], 'One store should be present.');
+ assert_array_equals(store.indexNames, ['index'], 'One index should be present.');
+ db.deleteObjectStore('store');
+ assert_array_equals(db.objectStoreNames, [], 'No stores should be present.');
+ });
+ openRequest.onsuccess = t.step_func(function(e) {
+ var db = openRequest.result;
+ assert_array_equals(db.objectStoreNames, [], 'No stores should be present.');
+ t.done();
+ });
+});
+</script>
« no previous file with comments | « no previous file | LayoutTests/storage/indexeddb/createIndex-deleteObjectStore-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698