haikuwebkit/LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-fai...

22 lines
1.4 KiB
Plaintext

This tests some obvious failures that can happen while calling IDBDatabase.transaction()
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)
Upgrade needed: Old version - 0 New version - 1
Failed to start a transaction while a versionChange transaction was in progress - InvalidStateError: Failed to execute 'transaction' on 'IDBDatabase': A version change transaction is running.
versionchange transaction completed
Failed to start a transaction with an empty set of object stores - InvalidAccessError: Failed to execute 'transaction' on 'IDBDatabase': The storeNames parameter was empty.
Failed to start a transaction to a nonexistent object store - NotFoundError: Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.
Failed to start a transaction with an invalid mode - TypeError: Argument 2 ('mode') to IDBDatabase.transaction must be one of: "readonly", "readwrite", "versionchange"
Failed to explicitly start a versionchange transaction - TypeError: Type error
Failed to explicitly start a transaction with the close pending flag set - InvalidStateError: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
PASS successfullyParsed is true
TEST COMPLETE