Test IndexedDB adding property with invalid keypath 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; 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' PASS successfullyParsed is true TEST COMPLETE