OLD | NEW |
1 Test IndexedDB transaction internal active flag. | 1 Test IndexedDB transaction internal active flag. |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; | |
7 | |
8 dbname = "transaction-active-flag.html" | 6 dbname = "transaction-active-flag.html" |
9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
11 store = db.createObjectStore('store') | 9 store = db.createObjectStore('store') |
12 store.createIndex('index', 'keypath') | 10 store.createIndex('index', 'keypath') |
13 | 11 |
14 runTransaction(): | 12 runTransaction(): |
15 transaction = db.transaction('store', 'readwrite') | 13 transaction = db.transaction('store', 'readwrite') |
16 | 14 |
17 Verify that transactions are created with |active| flag set: | 15 Verify that transactions are created with |active| flag set: |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 transactionComplete(): | 255 transactionComplete(): |
258 Expecting exception from store = transaction.objectStore('store') | 256 Expecting exception from store = transaction.objectStore('store') |
259 PASS Exception was thrown. | 257 PASS Exception was thrown. |
260 PASS code is DOMException.INVALID_STATE_ERR | 258 PASS code is DOMException.INVALID_STATE_ERR |
261 PASS ename is 'InvalidStateError' | 259 PASS ename is 'InvalidStateError' |
262 Exception message: Failed to execute 'objectStore' on 'IDBTransaction': The tran
saction has finished. | 260 Exception message: Failed to execute 'objectStore' on 'IDBTransaction': The tran
saction has finished. |
263 PASS successfullyParsed is true | 261 PASS successfullyParsed is true |
264 | 262 |
265 TEST COMPLETE | 263 TEST COMPLETE |
266 | 264 |
OLD | NEW |