1 Ensure IndexedDB's write operations invalidate cursor prefetch caches
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 dbname = "prefetch-invalidation.html"
7 indexedDB.deleteDatabase(dbname)
11 db = event.target.result
12 store = db.createObjectStore('store')
15 db = event.target.result
17 -------------------------------------------
19 doPrefetchInvalidationTest():
20 store = db.transaction('store', 'readwrite').objectStore('store')
21 Populate the store with 200 records.
22 cursorRequest = store.openCursor()
25 PASS cursorRequest.result is non-null.
27 doOperationAndContinue():
28 store.delete(IDBKeyRange.bound(-Infinity, +Infinity))
29 cursor = cursorRequest.result
33 PASS cursorRequest.result is null
35 -------------------------------------------
37 doPrefetchInvalidationTest():
38 store = db.transaction('store', 'readwrite').objectStore('store')
39 Populate the store with 200 records.
40 cursorRequest = store.openCursor()
43 PASS cursorRequest.result is non-null.
45 doOperationAndContinue():
47 cursor = cursorRequest.result
51 PASS cursorRequest.result is null
52 PASS successfullyParsed is true