Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / storage / indexeddb / createObjectStore-put-deleteObjectStore.html
blob462b72254c13f4e7a0cfb80eb414404e6f3e1c64
1 <!DOCTYPE html>
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>
5 <script>
6 var t = async_test('Create store/put/delete store should not crash');
7 t.step(function() {
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');
17 });
18 openRequest.onsuccess = t.step_func(function(e) {
19 var db = openRequest.result;
20 assert_array_equals(db.objectStoreNames, []);
21 t.done();
22 });
23 });
24 });
25 </script>