Test IndexedDB's openCursor.

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.open('open-cursor')
db = event.target.result
db.setVersion('new version')
setVersionSuccess():
trans = event.target.result
PASS trans !== null is true
Deleted all object stores.
objectStore = db.createObjectStore('test')
objectStore.add('myValue', 'myKey')
Opening cursor
event.target.source.openCursor(keyRange)
Cursor opened successfully.
PASS cursor.direction is 0
PASS cursor.key is 'myKey'
PASS cursor.value is 'myValue'

Passing an invalid key into .continue({}).
Expecting exception from event.target.result.continue({})
PASS Exception was thrown.
PASS code is IDBDatabaseException.DATA_ERR

Opening an empty cursor.
objectStore.openCursor(keyRange)
Empty cursor opened successfully.
PASS cursor is null
Opening cursor
event.target.source.openCursor("myKey")
Cursor opened successfully.
PASS cursor.direction is 0
PASS cursor.key is 'myKey'
PASS cursor.value is 'myValue'

Passing an invalid key into .continue({}).
Expecting exception from cursor.continue({})
PASS Exception was thrown.
PASS code is IDBDatabaseException.DATA_ERR

Opening an empty cursor.
objectStore.openCursor("InexistentKey")
Empty cursor opened successfully.
PASS cursor is null
PASS successfullyParsed is true

TEST COMPLETE

