2 <title>IndexedDB: Regression test - create store/put/delete store should not crash
</title>
3 <script src=
"../../resources/testharness.js"></script>
4 <script src=
"../../resources/testharnessreport.js"></script>
6 var t
= async_test('Create store/put/delete store should not crash');
8 var dbName
= 'db' + location
.pathname
;
9 var deleteRequest
= indexedDB
.deleteDatabase(dbName
);
10 deleteRequest
.onsuccess
= t
.step_func(function() {
11 var openRequest
= indexedDB
.open(dbName
);
12 openRequest
.onupgradeneeded
= t
.step_func(function(e
) {
13 var db
= openRequest
.result
;
14 var store
= db
.createObjectStore('store');
15 store
.put('value', 'key');
16 db
.deleteObjectStore('store');
18 openRequest
.onsuccess
= t
.step_func(function(e
) {
19 var db
= openRequest
.result
;
20 assert_array_equals(db
.objectStoreNames
, []);