blob: 1bedb29a047a2cd7e4b6026e7e61ec35100bab5c [file] [log] [blame]
Test IndexedDB IDBDatabase internal delete pending flag
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
dbname = "database-deletepending-flag.html"
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname, 5)
connection.createObjectStore('store')
PASS connection.objectStoreNames.length is 1
Issue a delete request against the database - should be blocked by the open connection:
deleteRequest = indexedDB.deleteDatabase(dbname)
state = 0
Open a second connection - should be delayed:
openRequest = indexedDB.open(dbname)
connection received versionchange event - ignoring.
PASS ++state is 1
deleteRequest received blocked event.
PASS ++state is 2
connection.close()
deleteRequest should now be unblocked.
deleteRequest received success event.
PASS ++state is 3
openRequest should now be unblocked.
PASS openRequest received success event.
PASS ++state is 4
connection2 = openRequest.result
connection2 should reference a different database:
PASS connection2.version == connection.version is false
PASS connection2.objectStoreNames.length is 0
PASS successfullyParsed is true
TEST COMPLETE