blob: fe53b748c108f803acd0f4cbca93d8d1340f8add [file] [log] [blame]
Test IndexedDB's event.target.result after add() and put()
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)
objectStore = db.createObjectStore('foo', { autoIncrement: true });
request = objectStore.add({});
key1 = event.target.result;
request = objectStore.put({}, key1);
PASS event.target.result is key1
key2 = 10;
request = objectStore.put({}, key2);
PASS event.target.result is key2
key2 = 100;
request = objectStore.put({}, key2);
PASS event.target.result is key2
PASS successfullyParsed is true
TEST COMPLETE