| Verify Indexed DB transactions are ordered per spec |
| |
| 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) |
| indexedDB.open(dbname) |
| |
| prepareDatabase(): |
| db = event.target.result |
| store = db.createObjectStore('store') |
| |
| onOpen(): |
| db = event.target.result |
| |
| Create in order tx1, tx2 |
| tx1 = db.transaction('store', 'readwrite') |
| tx2 = db.transaction('store', 'readwrite') |
| |
| Use in order tx2, tx1 |
| tx2.objectStore('store').get(0) |
| tx1.objectStore('store').get(0) |
| |
| order = [] |
| tx1 complete |
| tx1 complete |
| |
| done(): |
| PASS areArraysEqual(order, [ 1, 2 ]) is true |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |