1 Test IndexedDB's IDBCursor.continue() with a key parameter. 2 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 6 webkitIndexedDB.open('cursor-continue') 7 db = event.target.result 8 db.setVersion('new version') 9 trans = event.target.result 10 PASS trans !== null is true 11 Deleted all object stores. 12 db.createObjectStore('someObjectStore') 13 objectStore.createIndex('someIndex', 'x') 14 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 15 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 16 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 17 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 18 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 19 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 20 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 21 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 22 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 23 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 24 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 25 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 26 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 27 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 28 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 29 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 30 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 31 objectStore.add({'x': testData[nextToAdd]}, nextToAdd) 32 33 indexObject.openKeyCursor(null, webkitIDBCursor.NEXT) 34 PASS event.target.result.primaryKey is 0 35 event.target.result.continue(3.14159) 36 PASS event.target.result.primaryKey is 3 37 event.target.result.continue(3.14159) 38 PASS event.target.result.primaryKey is 4 39 event.target.result.continue(3.14159) 40 PASS event.target.result.primaryKey is 5 41 event.target.result.continue(12) 42 PASS event.target.result.primaryKey is 7 43 event.target.result.continue(date) 44 PASS event.target.result.primaryKey is 9 45 event.target.result.continue(date) 46 PASS event.target.result.primaryKey is 10 47 event.target.result.continue(date) 48 PASS event.target.result.primaryKey is 11 49 event.target.result.continue('A bit1') 50 PASS event.target.result.primaryKey is 14 51 event.target.result.continue('A bit3') 52 PASS event.target.result.primaryKey is 16 53 event.target.result.continue('the BIGGEST string') 54 PASS event.target.result.primaryKey is 17 55 event.target.result.continue('the BIGGEST string') 56 PASS event.target.result is null 57 58 indexObject.openKeyCursor(null, webkitIDBCursor.PREV) 59 PASS event.target.result.primaryKey is 17 60 event.target.result.continue('A bit2') 61 PASS event.target.result.primaryKey is 15 62 event.target.result.continue('A bit2') 63 PASS event.target.result.primaryKey is 14 64 event.target.result.continue(date) 65 PASS event.target.result.primaryKey is 10 66 event.target.result.continue(date) 67 PASS event.target.result.primaryKey is 9 68 event.target.result.continue(1) 69 PASS event.target.result.primaryKey is 2 70 event.target.result.continue(1) 71 PASS event.target.result.primaryKey is 1 72 event.target.result.continue(1) 73 PASS event.target.result.primaryKey is 0 74 event.target.result.continue(1) 75 PASS event.target.result is null 76 PASS successfullyParsed is true 77 78 TEST COMPLETE 79 80