Verify that a request's result is dirtied when a cursor is continued
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
dbname = "request-result-cache.html"
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
prepareDatabase():
db = event.target.result
store = db.createObjectStore('store')
onOpen():
db = event.target.result
tx = db.transaction('store', 'readonly', {durability: 'relaxed'})
store = tx.objectStore('store')
cursorRequest = store.openCursor()
cursorRequestSuccess():
cursor = cursorRequest.result
cursor.continue()
Expecting exception from cursorRequest.result
PASS Exception was thrown.
PASS code is DOMException.INVALID_STATE_ERR
PASS ename is 'InvalidStateError'
Exception message: Failed to read the 'result' property from 'IDBRequest': The request has not finished.
cursorRequestSuccess():
PASS successfullyParsed is true
TEST COMPLETE