| OLD | NEW |
| 1 Verify Indexed DB transactions are ordered per spec | 1 Verify Indexed DB transactions are ordered per spec |
| 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-ordering.html" | 6 dbname = "transaction-ordering.html" |
| 9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
| 10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
| 11 | 9 |
| 12 prepareDatabase(): | 10 prepareDatabase(): |
| 13 db = event.target.result | 11 db = event.target.result |
| 14 store = db.createObjectStore('store') | 12 store = db.createObjectStore('store') |
| 15 | 13 |
| 16 onOpen(): | 14 onOpen(): |
| 17 db = event.target.result | 15 db = event.target.result |
| 18 | 16 |
| 19 Create in order tx1, tx2 | 17 Create in order tx1, tx2 |
| 20 tx1 = db.transaction('store', 'readwrite') | 18 tx1 = db.transaction('store', 'readwrite') |
| 21 tx2 = db.transaction('store', 'readwrite') | 19 tx2 = db.transaction('store', 'readwrite') |
| 22 | 20 |
| 23 Use in order tx2, tx1 | 21 Use in order tx2, tx1 |
| 24 tx2.objectStore('store').get(0) | 22 tx2.objectStore('store').get(0) |
| 25 tx1.objectStore('store').get(0) | 23 tx1.objectStore('store').get(0) |
| 26 | 24 |
| 27 order = [] | 25 order = [] |
| 28 tx1 complete | 26 tx1 complete |
| 29 tx1 complete | 27 tx1 complete |
| 30 | 28 |
| 31 done(): | 29 done(): |
| 32 PASS areArraysEqual(order, [ 1, 2 ]) is true | 30 PASS areArraysEqual(order, [ 1, 2 ]) is true |
| 33 PASS successfullyParsed is true | 31 PASS successfullyParsed is true |
| 34 | 32 |
| 35 TEST COMPLETE | 33 TEST COMPLETE |
| 36 | 34 |
| OLD | NEW |