blob: 4b3aa2a75d1e90847acedd85cd4523a01e173ce7 [file] [log] [blame]
Test that deleteDatabase is delayed if a VERSION_CHANGE transaction is running
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
prepareDatabase():
versionChangeComplete = false
h = event.target.result
blockedCalled = false
indexedDB.deleteDatabase(dbname)
h.createObjectStore('testObjectStore').put('bar', 'foo')
onVersionChange():
PASS event.target.version is 1
PASS event.oldVersion is 1
PASS event.newVersion is null
transactionOnComplete():
versionChangeComplete = true
onOpenSuccess():
PASS blockedCalled is true
h = event.target.result
h.close()
deleteDatabaseOnSuccess():
PASS versionChangeComplete is true
PASS successfullyParsed is true
TEST COMPLETE