Regression test for WK82678 - don't commit after a blocked event

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)
db.onversionchange = onVersionChange
store = db.createObjectStore('store1')

holdConnection():
holding connection until versionchange event

Starting worker: resources/dont-commit-on-blocked-worker.js
[Worker] indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
[Worker] 
[Worker] opening database connection
[Worker] request = indexedDB.open('dont-commit-on-blocked.html', 2)
[Worker] state = 'setversion'
[Worker] request.onblocked = onSetVersionBlocked
[Worker] request.onupgradeneeded = onSetVersionSuccess
[Worker] spinning for 100ms to let events be queued but prevent dispatch
[Worker] done spinning
[Worker] 
[Worker] onSetVersionSuccess():
[Worker] db = event.target.result
FAIL [Worker] state should be blocked. Was setversion.
[Worker] state = 'success'
[Worker] creating object store - will fail if transaction commited after blocked event
[Worker] db.createObjectStore('store2')
[Worker] 
[Worker] onTransactionComplete
PASS [Worker] state is "success"
PASS [Worker] Number(db.version) is 2
FAIL [Worker] db.objectStoreNames.contains('store1') should be true. Was false.
PASS [Worker] db.objectStoreNames.contains('store2') is true
PASS successfullyParsed is true
Some tests failed.

TEST COMPLETE