blob: 3a5da1cdb9fa688a2e904280ea8d3dc0a5436c0c [file] [log] [blame]
Test IndexedDB behavior adding the same property twice
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
dbname = "add-twice-failure.html"
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
objectStore = db.createObjectStore('foo');
key = 10
request = objectStore.add({}, key);
PASS request.result is key
request = objectStore.add({}, key);
PASS event.target.result is undefined.
PASS event.target.error is non-null.
PASS event.target.error.name is 'ConstraintError'
PASS successfullyParsed is true
TEST COMPLETE