blob: 4a5fb02768ee44f09d306401f9d255b4a72b3935 [file] [log] [blame]
Ensure IndexedDB's cursor prefetch cache requests are invalidated
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')
Populate with even records...
onOpenSuccess():
db = event.target.result
tx = db.transaction('store', 'readwrite')
store = tx.objectStore('store')
request = store.openCursor()
cursorSuccess():
PASS cursor.key is 0
cursor.continue()
cursorSuccess():
PASS cursor.key is 2
cursor.continue()
cursorSuccess():
PASS cursor.key is 4
cursor.continue()
That should have triggered a prefetch, injecting odd records...
cursorSuccess():
PASS cursor.key is 6
cursor.continue()
cursorSuccess():
PASS cursor.key is 7
cursor.continue()
cursorSuccess():
PASS cursor.key is 8
cursor.continue()
cursorSuccess():
PASS cursor.key is 9
cursor.continue()
cursorSuccess():
PASS continueCount is 7
PASS successfullyParsed is true
TEST COMPLETE