35 lines
941 B
Plaintext
35 lines
941 B
Plaintext
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".
|
|
|
|
|
|
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')
|
|
|
|
onOpen():
|
|
db = event.target.result
|
|
tx = db.transaction('store')
|
|
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
|
|
|