| OLD | NEW |
| 1 Test IndexedDB 'steps for closing a database connection' | 1 Test IndexedDB 'steps for closing a database connection' |
| 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 = "database-close.html" | 8 dbname = "database-close.html" |
| 9 indexedDB.deleteDatabase(dbname) | 9 indexedDB.deleteDatabase(dbname) |
| 10 indexedDB.open(dbname) | 10 indexedDB.open(dbname) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 awaiting_transaction_count = 2 | 25 awaiting_transaction_count = 2 |
| 26 trans1.objectStore('store').get('key1') | 26 trans1.objectStore('store').get('key1') |
| 27 trans2.objectStore('store').get('key2') | 27 trans2.objectStore('store').get('key2') |
| 28 | 28 |
| 29 NOTE: Once the closePending flag has been set to true no new transactions can be
created using connection. All functions that create transactions first check th
e closePending flag first and throw an exception if it is true. | 29 NOTE: Once the closePending flag has been set to true no new transactions can be
created using connection. All functions that create transactions first check th
e closePending flag first and throw an exception if it is true. |
| 30 | 30 |
| 31 Expecting exception from trans3 = connection.transaction('store') | 31 Expecting exception from trans3 = connection.transaction('store') |
| 32 PASS Exception was thrown. | 32 PASS Exception was thrown. |
| 33 PASS code is DOMException.INVALID_STATE_ERR | 33 PASS code is DOMException.INVALID_STATE_ERR |
| 34 PASS ename is 'InvalidStateError' | 34 PASS ename is 'InvalidStateError' |
| 35 Exception message: The database connection is closing. |
| 35 | 36 |
| 36 NOTE: Once the connection is closed, this can unblock the steps for deleting a d
atabase, which waits for connections to a given database to be closed before con
tinuing. | 37 NOTE: Once the connection is closed, this can unblock the steps for deleting a d
atabase, which waits for connections to a given database to be closed before con
tinuing. |
| 37 | 38 |
| 38 indexedDB.deleteDatabase(dbname) | 39 indexedDB.deleteDatabase(dbname) |
| 39 | 40 |
| 40 transaction #1 request successful | 41 transaction #1 request successful |
| 41 PASS event.target.result is "value1" | 42 PASS event.target.result is "value1" |
| 42 | 43 |
| 43 transaction #2 request successful | 44 transaction #2 request successful |
| 44 PASS event.target.result is "value2" | 45 PASS event.target.result is "value2" |
| 45 | 46 |
| 46 All transactions completed - database deletes should now be unblocked. | 47 All transactions completed - database deletes should now be unblocked. |
| 47 | 48 |
| 48 delete database unblocked | 49 delete database unblocked |
| 49 PASS awaiting_transaction_count is 0 | 50 PASS awaiting_transaction_count is 0 |
| 50 PASS successfullyParsed is true | 51 PASS successfullyParsed is true |
| 51 | 52 |
| 52 TEST COMPLETE | 53 TEST COMPLETE |
| 53 | 54 |
| OLD | NEW |