Home | History | Annotate | Download | only in indexeddb
      1 Test read-only transactions in IndexedDB.
      2 
      3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
      4 
      5 
      6 PASS 'webkitIndexedDB' in window is true
      7 PASS webkitIndexedDB == null is false
      8 webkitIndexedDB.open('transaction-read-only')
      9 openSuccess():
     10 db = event.target.result
     11 result = db.setVersion('version 1')
     12 Deleted all object stores.
     13 store = db.createObjectStore('store')
     14 store.put('x', 'y')
     15 trans = db.transaction()
     16 Expecting exception from trans.objectStore('store').put('a', 'b')
     17 PASS Exception was thrown.
     18 PASS code is webkitIDBDatabaseException.READ_ONLY_ERR
     19 trans = db.transaction()
     20 Expecting exception from trans.objectStore('store').delete('x')
     21 PASS Exception was thrown.
     22 PASS code is webkitIDBDatabaseException.READ_ONLY_ERR
     23 trans = db.transaction()
     24 cur = trans.objectStore('store').openCursor()
     25 PASS !event.target.result is false
     26 Expecting exception from event.target.result.delete()
     27 PASS Exception was thrown.
     28 PASS code is webkitIDBDatabaseException.READ_ONLY_ERR
     29 PASS successfullyParsed is true
     30 
     31 TEST COMPLETE
     32 
     33