Test IndexedDB's indexedDB.deleteDatabase().
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
dbname = "factory-deletedatabase.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', 'readwrite', {durability: 'relaxed'})
store = transaction.objectStore('storeName')
store.get('key')
PASS event.target.result is "value"
db.close()
indexedDB.open(dbname, 2)
db = event.target.result
request = indexedDB.deleteDatabase(dbname)
db.close()
PASS request.result is undefined.
indexedDB.open(dbname, 3)
db = event.target.result
PASS db.objectStoreNames.length is 0
PASS successfullyParsed is true
TEST COMPLETE