1 Verify that that cursors accessed after being closed are well behaved
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 dbname = "closed-cursor.html"
7 indexedDB.deleteDatabase(dbname)
11 db = event.target.result
12 store = db.createObjectStore('store')
13 store.put({value: 'value'}, ['key'])
16 db = event.target.result
17 tx = db.transaction('store')
18 store = tx.objectStore('store')
19 cursorRequest = store.openCursor()
22 cursor = cursorRequest.result
23 Don't continue the cursor, so it retains its key/primaryKey/value
25 transactionComplete():
26 PASS JSON.stringify(cursor.key) is "[\"key\"]"
27 PASS JSON.stringify(cursor.primaryKey) is "[\"key\"]"
28 PASS JSON.stringify(cursor.value) is "{\"value\":\"value\"}"
29 PASS successfullyParsed is true