OLD | NEW |
1 Test IndexedDB adding property with invalid keypath | 1 Test IndexedDB adding property with invalid keypath |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; | |
7 | |
8 dbname = "bad-keypath.html" | 6 dbname = "bad-keypath.html" |
9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
11 objectStore = db.createObjectStore('foo', { keyPath: 'keyPath' }); | 9 objectStore = db.createObjectStore('foo', { keyPath: 'keyPath' }); |
12 request = objectStore.add({ keyPath: 'foo' }); | 10 request = objectStore.add({ keyPath: 'foo' }); |
13 Expecting exception from request = objectStore.add({}); | 11 Expecting exception from request = objectStore.add({}); |
14 PASS Exception was thrown. | 12 PASS Exception was thrown. |
15 PASS code is 0 | 13 PASS code is 0 |
16 PASS ename is 'DataError' | 14 PASS ename is 'DataError' |
17 Exception message: Failed to execute 'add' on 'IDBObjectStore': Evaluating the o
bject store's key path did not yield a value. | 15 Exception message: Failed to execute 'add' on 'IDBObjectStore': Evaluating the o
bject store's key path did not yield a value. |
18 PASS successfullyParsed is true | 16 PASS successfullyParsed is true |
19 | 17 |
20 TEST COMPLETE | 18 TEST COMPLETE |
21 | 19 |
OLD | NEW |