Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / storage / indexeddb / createIndex-deleteObjectStore.htm
blob7b480315aeb9196199127d6a011296442f41ec5c
1 <!DOCTYPE html>
2 <title>IndexedDB: Deleting an object store with a new index should complete</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script>
6 var t = async_test('Deleting an object store with a new index should complete');
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 store.createIndex('index', 'keyPath');
17 assert_array_equals(db.objectStoreNames, ['store'], 'One store should be present.');
18 assert_array_equals(store.indexNames, ['index'], 'One index should be present.');
19 db.deleteObjectStore('store');
20 assert_array_equals(db.objectStoreNames, [], 'No stores should be present.');
21 });
22 openRequest.onsuccess = t.step_func(function(e) {
23 var db = openRequest.result;
24 assert_array_equals(db.objectStoreNames, [], 'No stores should be present.');
25 t.done();
26 });
27 });
28 });
29 </script>