blob: ac5717923fb9950fc29d8815d2228990bd53c0af [file] [log] [blame]
This test does basic testing of IDBObjectStore.add(), making sure that an attempt to overwrite an already-existing key fails with the appropriate error.
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)
Upgrade needed: Old version - 0 New version - 1
[object IDBTransaction] - versionchange
[object IDBDatabase]
put 1 succeeded - key was 'foo'
put 2 failed - error
get succeeded - key was 'bar'
version change transaction completed
PASS successfullyParsed is true
TEST COMPLETE