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