OLD | NEW |
1 Test IndexedDB cursor.advance(). | 1 Test IndexedDB cursor.advance(). |
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-advance.html" | 6 dbname = "cursor-advance.html" |
9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
11 | 9 |
12 prepareDatabase(): | 10 prepareDatabase(): |
13 objectStore = db.createObjectStore(objectStoreName); | 11 objectStore = db.createObjectStore(objectStoreName); |
14 Now create the indexes. | 12 Now create the indexes. |
15 objectStore.createIndex(indexData[i].name, indexData[i].keyPath, indexData[i].op
tions); | 13 objectStore.createIndex(indexData[i].name, indexData[i].keyPath, indexData[i].op
tions); |
16 objectStore.createIndex(indexData[i].name, indexData[i].keyPath, indexData[i].op
tions); | 14 objectStore.createIndex(indexData[i].name, indexData[i].keyPath, indexData[i].op
tions); |
17 objectStore.createIndex(indexData[i].name, indexData[i].keyPath, indexData[i].op
tions); | 15 objectStore.createIndex(indexData[i].name, indexData[i].keyPath, indexData[i].op
tions); |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 | 243 |
246 deleteSecond(): | 244 deleteSecond(): |
247 PASS expected is "{\"key\":\"237-23-7744\",\"value\":{\"name\":\"Pug\",\"height\
":66,\"weight\":110},\"primaryKey\":\"237-23-7744\"}" | 245 PASS expected is "{\"key\":\"237-23-7744\",\"value\":{\"name\":\"Pug\",\"height\
":66,\"weight\":110},\"primaryKey\":\"237-23-7744\"}" |
248 cursor.advance(1) | 246 cursor.advance(1) |
249 | 247 |
250 deleteSecond(): | 248 deleteSecond(): |
251 PASS successfullyParsed is true | 249 PASS successfullyParsed is true |
252 | 250 |
253 TEST COMPLETE | 251 TEST COMPLETE |
254 | 252 |
OLD | NEW |