blob: db16dc5142098b4abbc279f61eed8778cd128ca1 [file] [log] [blame]
[Worker] Test IndexedDB workers, recursion, and transaction termination.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Starting worker: resources/transaction-complete-workers.js
[Worker] dbname = "transaction-complete-workers.js"
[Worker] indexedDB.deleteDatabase(dbname)
[Worker] indexedDB.open(dbname)
[Worker]
[Worker] prepareDatabase():
[Worker] db.createObjectStore('store')
[Worker]
[Worker] createTransaction():
[Worker] transaction = db.transaction('store')
[Worker] store = transaction.objectStore('store')
PASS [Worker] Transaction completed
[Worker] Expecting exception from store.get(0)
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'TransactionInactiveError'
[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
[Worker]
[Worker] recursionTest():
[Worker] transaction = db.transaction('store')
[Worker] store = transaction.objectStore('store')
[Worker] store.get(0)
PASS [Worker] transaction is active
[Worker] recursion depth: 1
[Worker] store.get(0)
PASS [Worker] transaction is still active
[Worker] recursion depth: 2
[Worker] store.get(0)
PASS [Worker] transaction is still active
[Worker] recursion depth: 3
[Worker] store.get(0)
PASS [Worker] transaction is still active
[Worker] recursion depth: 3
[Worker] store.get(0)
PASS [Worker] transaction is still active
[Worker] recursion depth: 2
[Worker] store.get(0)
PASS [Worker] transaction is still active
[Worker] recursion depth: 1
[Worker] store.get(0)
PASS [Worker] transaction is still active
PASS [Worker] transaction completed
[Worker] Expecting exception from store.get(0)
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'TransactionInactiveError'
[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
[Worker]
[Worker] trying a timeout callback:
[Worker] setTimeout(timeoutTest, 0)
[Worker]
[Worker] timeoutTest():
[Worker] transaction = db.transaction('store')
[Worker] store = transaction.objectStore('store')
PASS [Worker] transaction started in setTimeout() callback completed
[Worker] Expecting exception from store.get(0)
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'TransactionInactiveError'
[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
[Worker]
[Worker] errorTest():
[Worker] self.old_onerror = self.onerror
[Worker] self.onerror = errorHandler
[Worker]
[Worker] errorHandler():
[Worker] self.onerror = self.old_onerror
[Worker] transaction = db.transaction('store')
[Worker] store = transaction.objectStore('store')
Got expected error from worker, ignoring
event.preventDefault()
PASS [Worker] Transaction completed
[Worker] Expecting exception from store.get(0)
PASS [Worker] Exception was thrown.
PASS [Worker] code is 0
PASS [Worker] ename is 'TransactionInactiveError'
[Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
PASS successfullyParsed is true
TEST COMPLETE