1 [Worker] Test IndexedDB workers, recursion, and transaction termination.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 Starting worker: resources/transaction-complete-workers.js
7 [Worker] dbname = "transaction-complete-workers.js"
8 [Worker] indexedDB.deleteDatabase(dbname)
9 [Worker] indexedDB.open(dbname)
11 [Worker] prepareDatabase():
12 [Worker] db.createObjectStore('store')
14 [Worker] createTransaction():
15 [Worker] transaction = db.transaction('store')
16 [Worker] store = transaction.objectStore('store')
17 PASS [Worker] Transaction completed
18 [Worker] Expecting exception from store.get(0)
19 PASS [Worker] Exception was thrown.
20 PASS [Worker] code is 0
21 PASS [Worker] ename is 'TransactionInactiveError'
22 [Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
24 [Worker] recursionTest():
25 [Worker] transaction = db.transaction('store')
26 [Worker] store = transaction.objectStore('store')
28 PASS [Worker] transaction is active
29 [Worker] recursion depth: 1
31 PASS [Worker] transaction is still active
32 [Worker] recursion depth: 2
34 PASS [Worker] transaction is still active
35 [Worker] recursion depth: 3
37 PASS [Worker] transaction is still active
38 [Worker] recursion depth: 3
40 PASS [Worker] transaction is still active
41 [Worker] recursion depth: 2
43 PASS [Worker] transaction is still active
44 [Worker] recursion depth: 1
46 PASS [Worker] transaction is still active
47 PASS [Worker] transaction completed
48 [Worker] Expecting exception from store.get(0)
49 PASS [Worker] Exception was thrown.
50 PASS [Worker] code is 0
51 PASS [Worker] ename is 'TransactionInactiveError'
52 [Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
54 [Worker] trying a timeout callback:
55 [Worker] setTimeout(timeoutTest, 0)
57 [Worker] timeoutTest():
58 [Worker] transaction = db.transaction('store')
59 [Worker] store = transaction.objectStore('store')
60 PASS [Worker] transaction started in setTimeout() callback completed
61 [Worker] Expecting exception from store.get(0)
62 PASS [Worker] Exception was thrown.
63 PASS [Worker] code is 0
64 PASS [Worker] ename is 'TransactionInactiveError'
65 [Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
68 [Worker] self.old_onerror = self.onerror
69 [Worker] self.onerror = errorHandler
71 [Worker] errorHandler():
72 [Worker] self.onerror = self.old_onerror
73 [Worker] transaction = db.transaction('store')
74 [Worker] store = transaction.objectStore('store')
75 Got expected error from worker, ignoring
76 event.preventDefault()
77 PASS [Worker] Transaction completed
78 [Worker] Expecting exception from store.get(0)
79 PASS [Worker] Exception was thrown.
80 PASS [Worker] code is 0
81 PASS [Worker] ename is 'TransactionInactiveError'
82 [Worker] Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
83 PASS successfullyParsed is true