OLD | NEW |
(Empty) | |
| 1 Ensure IndexedDB's cursor prefetch cache requests are invalidated |
| 2 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 |
| 5 |
| 6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; |
| 7 |
| 8 dbname = "prefetch-race.html" |
| 9 indexedDB.deleteDatabase(dbname) |
| 10 indexedDB.open(dbname) |
| 11 |
| 12 prepareDatabase(): |
| 13 db = event.target.result |
| 14 store = db.createObjectStore('store') |
| 15 Populate with even records... |
| 16 |
| 17 onOpenSuccess(): |
| 18 db = event.target.result |
| 19 tx = db.transaction('store', 'readwrite') |
| 20 store = tx.objectStore('store') |
| 21 request = store.openCursor() |
| 22 |
| 23 cursorSuccess(): |
| 24 PASS cursor.key is 0 |
| 25 cursor.continue() |
| 26 |
| 27 cursorSuccess(): |
| 28 PASS cursor.key is 2 |
| 29 cursor.continue() |
| 30 |
| 31 cursorSuccess(): |
| 32 PASS cursor.key is 4 |
| 33 cursor.continue() |
| 34 |
| 35 That should have triggered a prefetch, injecting odd records... |
| 36 |
| 37 cursorSuccess(): |
| 38 PASS cursor.key is 6 |
| 39 cursor.continue() |
| 40 |
| 41 cursorSuccess(): |
| 42 PASS cursor.key is 7 |
| 43 cursor.continue() |
| 44 |
| 45 cursorSuccess(): |
| 46 PASS cursor.key is 8 |
| 47 cursor.continue() |
| 48 |
| 49 cursorSuccess(): |
| 50 PASS cursor.key is 9 |
| 51 cursor.continue() |
| 52 |
| 53 cursorSuccess(): |
| 54 PASS continueCount is 7 |
| 55 PASS successfullyParsed is true |
| 56 |
| 57 TEST COMPLETE |
| 58 |
OLD | NEW |