OLD | NEW |
1 Test IndexedDB's behavior put()ing with null key | 1 Test IndexedDB's behavior put()ing with null key |
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 = "key-requirements-put-null-key.html" | 6 dbname = "key-requirements-put-null-key.html" |
9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
11 objectStore = db.createObjectStore('bar'); | 9 objectStore = db.createObjectStore('bar'); |
12 Expecting exception from objectStore.put({}, null); | 10 Expecting exception from objectStore.put({}, null); |
13 PASS Exception was thrown. | 11 PASS Exception was thrown. |
14 PASS code is 0 | 12 PASS code is 0 |
15 PASS ename is 'DataError' | 13 PASS ename is 'DataError' |
16 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. | 14 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. |
17 PASS successfullyParsed is true | 15 PASS successfullyParsed is true |
18 | 16 |
19 TEST COMPLETE | 17 TEST COMPLETE |
20 | 18 |
OLD | NEW |