| OLD | NEW |
| 1 Call db.close() in the complete handler for a version change transaction, before
the success event associated with the open call fires | 1 Call db.close() in the complete handler for a version change transaction, before
the success event associated with the open call fires |
| 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; | 6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; |
| 7 | 7 |
| 8 dbname = "intversion-close-in-oncomplete.html" | 8 dbname = "intversion-close-in-oncomplete.html" |
| 9 indexedDB.deleteDatabase(dbname) | 9 indexedDB.deleteDatabase(dbname) |
| 10 request = indexedDB.open(dbname, 7) | 10 request = indexedDB.open(dbname, 7) |
| 11 | 11 |
| 12 upgradeNeeded(): | 12 upgradeNeeded(): |
| 13 db = event.target.result | 13 db = event.target.result |
| 14 PASS event.newVersion is 7 | 14 PASS event.newVersion is 7 |
| 15 db.createObjectStore('os') | 15 db.createObjectStore('os') |
| 16 transaction = event.target.transaction | 16 transaction = event.target.transaction |
| 17 | 17 |
| 18 transaction.oncomplete: | 18 transaction.oncomplete: |
| 19 sawTransactionComplete = true | 19 sawTransactionComplete = true |
| 20 db.close() | 20 db.close() |
| 21 | 21 |
| 22 openError(): | 22 openError(): |
| 23 PASS sawTransactionComplete is true | 23 PASS sawTransactionComplete is true |
| 24 PASS event.target.result is null | 24 PASS event.target.result is undefined. |
| 25 PASS event.target.error is non-null. |
| 25 PASS event.target.error.name is "AbortError" | 26 PASS event.target.error.name is "AbortError" |
| 26 Expecting exception from transaction = db.transaction('os', 'readwrite') | 27 Expecting exception from transaction = db.transaction('os', 'readwrite') |
| 27 PASS Exception was thrown. | 28 PASS Exception was thrown. |
| 28 PASS code is DOMException.INVALID_STATE_ERR | 29 PASS code is DOMException.INVALID_STATE_ERR |
| 29 PASS ename is 'InvalidStateError' | 30 PASS ename is 'InvalidStateError' |
| 30 Exception message: Failed to execute 'transaction' on 'IDBDatabase': The databas
e connection is closing. | 31 Exception message: Failed to execute 'transaction' on 'IDBDatabase': The databas
e connection is closing. |
| 31 PASS successfullyParsed is true | 32 PASS successfullyParsed is true |
| 32 | 33 |
| 33 TEST COMPLETE | 34 TEST COMPLETE |
| 34 | 35 |
| OLD | NEW |