blob: c0a17499e13c7bd12fbd8b48f7f307796cf3dbc1 [file] [log] [blame]
Test IndexedDB adding property with invalid keypath
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
dbname = "bad-keypath.html"
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
objectStore = db.createObjectStore('foo', { keyPath: 'keyPath' });
request = objectStore.add({ keyPath: 'foo' });
Expecting exception from request = objectStore.add({});
PASS Exception was thrown.
PASS code is 0
PASS ename is 'DataError'
Exception message: Failed to execute 'add' on 'IDBObjectStore': Evaluating the object store's key path did not yield a value.
PASS successfullyParsed is true
TEST COMPLETE