32 lines
759 B
Plaintext
32 lines
759 B
Plaintext
Ensure cursor wrappers are created correctly.
|
|
|
|
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')
|
|
store.put(0, 0)
|
|
|
|
verifyWrappers():
|
|
db = event.target.result
|
|
tx = db.transaction('store', 'readwrite')
|
|
request = tx.objectStore('store').openCursor()
|
|
|
|
onOpenCursorSuccess():
|
|
cursor = event.target.result
|
|
request = cursor.update(1)
|
|
|
|
onUpdateSuccess():
|
|
cursor = null
|
|
PASS request.source.toString() is "[object IDBCursorWithValue]"
|
|
PASS successfullyParsed is true
|
|
|
|
TEST COMPLETE
|
|
|