blob: 5bebe360e712281e07cc2bb9bb495b18a1fd514a [file] [log] [blame]
Test IndexedDB's IDBObjectStore.deleteObjectStore().
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
dbname = "objectstore-removeobjectstore.html"
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
store = db.createObjectStore('storeName', null)
store.createIndex('indexName', '')
PASS store.indexNames.contains('indexName') is true
store.add('value', 'key')
db.transaction(['storeName'])
store = transaction.objectStore('storeName')
store.get('key')
PASS event.target.result is "value"
db.close()
indexedDB.open(dbname, 2)
db.deleteObjectStore('storeName')
db.createObjectStore('storeName', null)
db.transaction(['storeName'])
store = transaction.objectStore('storeName')
store.get('key')
PASS event.target.result is undefined
PASS event.target.source.indexNames.contains('indexName') is false
PASS successfullyParsed is true
TEST COMPLETE