OLD | NEW |
1 Test IndexedDB's IDBCursor.continue() with a primary key parameter. | 1 Test IndexedDB's IDBCursor.continue() with a primary key parameter. |
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 = "cursor-continueprimarykey.html" | 6 dbname = "cursor-continueprimarykey.html" |
9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
11 | 9 |
12 prepareDatabase(): | 10 prepareDatabase(): |
13 db = event.target.result | 11 db = event.target.result |
14 store = db.createObjectStore('store') | 12 store = db.createObjectStore('store') |
15 index = store.createIndex('index', 'indexKey', {multiEntry: true}) | 13 index = store.createIndex('index', 'indexKey', {multiEntry: true}) |
16 store.put({indexKey: ['a', 'b']}, 1) | 14 store.put({indexKey: ['a', 'b']}, 1) |
17 store.put({indexKey: ['a', 'b']}, 2) | 15 store.put({indexKey: ['a', 'b']}, 2) |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 Expecting exception from cursor.continuePrimaryKey('a', null) | 163 Expecting exception from cursor.continuePrimaryKey('a', null) |
166 PASS Exception was thrown. | 164 PASS Exception was thrown. |
167 PASS code is 0 | 165 PASS code is 0 |
168 PASS ename is 'DataError' | 166 PASS ename is 'DataError' |
169 Exception message: Failed to execute 'continuePrimaryKey' on 'IDBCursor': The pa
rameter is not a valid key. | 167 Exception message: Failed to execute 'continuePrimaryKey' on 'IDBCursor': The pa
rameter is not a valid key. |
170 | 168 |
171 PASS successfullyParsed is true | 169 PASS successfullyParsed is true |
172 | 170 |
173 TEST COMPLETE | 171 TEST COMPLETE |
174 | 172 |
OLD | NEW |