blob: 08e88597eda2cebecc537d4779ae9cbbc110d26e [file] [log] [blame]
Check that read-only transactions within a database can run in parallel.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
dbname = "transaction-coordination-within-database.html"
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
prepareDatabase():
db = event.target.result
store = db.createObjectStore('store')
store.put('value', 'key')
runParallelTransactions():
db = event.target.result
transaction1 = db.transaction('store', 'readonly')
transaction2 = db.transaction('store', 'readonly')
transaction1GetSuccess = false
transaction2GetSuccess = false
Keep both transactions alive until each has reported at least one successful operation
onTransactionComplete():
first transaction complete, still waiting...
onTransactionComplete():
PASS transaction1GetSuccess is true
PASS transaction2GetSuccess is true
db.close()
PASS successfullyParsed is true
TEST COMPLETE