Ensure pending open waits for version change transaction to complete.

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;

dbname = "version-change-exclusive.html"
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
calling open() - callback should wait until VERSION_CHANGE transaction is complete
indexedDB.open(dbname)
setVersion() callback
starting work in VERSION_CHANGE transaction
self.state = 'VERSION_CHANGE started'
store = db.createObjectStore('test-store')
Expecting exception from db.transaction('test-store')
PASS Exception was thrown.
PASS code is DOMException.INVALID_STATE_ERR
PASS ename is 'InvalidStateError'
Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.
store.put(0, 0)
in put's onsuccess
store.put(1, 1)
in put's onsuccess
store.put(2, 2)
in put's onsuccess
store.put(3, 3)
in put's onsuccess
store.put(4, 4)
in put's onsuccess
store.put(5, 5)
in put's onsuccess
store.put(6, 6)
in put's onsuccess
store.put(7, 7)
in put's onsuccess
store.put(8, 8)
in put's onsuccess
store.put(9, 9)
in put's onsuccess
ending work in VERSION_CHANGE transaction
self.state = 'VERSION_CHANGE finished'
open() callback - this should appear after VERSION_CHANGE transaction ends
PASS self.state is "VERSION_CHANGE finished"
PASS successfullyParsed is true

TEST COMPLETE

