Home | History | Annotate | Download | only in indexeddb
      1 Test IndexedDB's openCursor.
      2 
      3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
      4 
      5 
      6 webkitIndexedDB.open('open-cursor')
      7 db = event.target.result
      8 db.setVersion('new version')
      9 setVersionSuccess():
     10 trans = event.target.result
     11 PASS trans !== null is true
     12 Deleted all object stores.
     13 objectStore = db.createObjectStore('test')
     14 objectStore.add('myValue', 'myKey')
     15 Opening cursor
     16 event.target.source.openCursor(keyRange)
     17 Cursor opened successfully.
     18 PASS event.target.result.direction is 0
     19 PASS event.target.result.key is 'myKey'
     20 PASS event.target.result.value is 'myValue'
     21 
     22 Passing an invalid key into .continue().
     23 PASS Caught exception: Error: TYPE_MISMATCH_ERR: DOM Exception 17
     24 
     25 Opening an empty cursor.
     26 objectStore.openCursor(keyRange)
     27 Empty cursor opened successfully.
     28 PASS successfullyParsed is true
     29 
     30 TEST COMPLETE
     31 
     32