| Try to call db.close() after upgradeneeded but before the corresponding success event fires |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB; |
| |
| indexedDB.deleteDatabase(dbname) |
| |
| deleteSuccess(): |
| request = indexedDB.open(dbname, 7) |
| |
| upgradeNeeded(): |
| db = event.target.result |
| PASS event.newVersion is 7 |
| db.createObjectStore('objectstore') |
| transaction = event.target.transaction |
| |
| transactionComplete(): |
| sawTransactionComplete = true |
| |
| Now try and close the database after oncomplete but before onsuccess. |
| This will not happen in single process ports. In multi-process ports |
| it may and is fine; but flaky crashes would indicate a regression. |
| |
| setTimeout(closeDB, 0) |
| |
| checkFinished(): |
| Not done yet... |
| |
| checkFinished(): |
| PASS didCallCloseDB is true |
| PASS sawTransactionComplete is true |
| PASS db.version is 7 |
| PASS db.objectStoreNames.length is 1 |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |