| 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; |
| |
| 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 store record in an IDBObjectStore: Evaluating the object store's key path did not yield a value. |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |