chromium/third_party/blink/web_tests/storage/indexeddb/closed-cursor-expected.txt

Verify that that cursors accessed after being closed are well behaved

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

dbname = "closed-cursor.html"
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)


prepareDatabase():
db = event.target.result
store = db.createObjectStore('store')
store.put({value: 'value'}, ['key'])


onOpen():
db = event.target.result
tx = db.transaction('store', 'readonly', {durability: 'relaxed'})
store = tx.objectStore('store')
cursorRequest = store.openCursor()


openCursorSuccess():
cursor = cursorRequest.result
Don't continue the cursor, so it retains its key/primaryKey/value


transactionComplete():
PASS JSON.stringify(cursor.key) is "[\"key\"]"
PASS JSON.stringify(cursor.primaryKey) is "[\"key\"]"
PASS JSON.stringify(cursor.value) is "{\"value\":\"value\"}"
PASS successfullyParsed is true

TEST COMPLETE