1 Verify that a transaction with an error aborts unless preventDefault() is called. 2 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 6 webkitIndexedDB.open('error-causes-abort-by-default') 7 db = event.target.result 8 db.setVersion('new version') 9 setVersionSuccess(): 10 trans = event.target.result 11 PASS trans !== null is true 12 trans.oncomplete = addData 13 Deleted all object stores. 14 db.createObjectStore('storeName', null) 15 trans = db.transaction([], webkitIDBTransaction.READ_WRITE) 16 trans.onabort = unexpectedAbortCallback 17 trans.oncomplete = transactionCompleted 18 store = trans.objectStore('storeName') 19 store.add({x: 'value', y: 'zzz'}, 'key') 20 event.target.source.add({x: 'value', y: 'zzz'}, 'key') 21 event.preventDefault() 22 PASS Transaction completed 23 24 25 trans = db.transaction([], webkitIDBTransaction.READ_WRITE) 26 trans.onabort = transactionAborted1 27 trans.oncomplete = unexpectedCompleteCallback 28 store = trans.objectStore('storeName') 29 store.add({x: 'value', y: 'zzz'}, 'key') 30 Doing nothing to prevent the default action... 31 PASS Transaction aborted 32 33 34 trans = db.transaction([], webkitIDBTransaction.READ_WRITE) 35 trans.onabort = transactionAborted2 36 trans.oncomplete = unexpectedCompleteCallback 37 store = trans.objectStore('storeName') 38 store.add({x: 'value', y: 'zzz'}, 'key') 39 Omitting an onerror handler 40 PASS Transaction aborted 41 PASS successfullyParsed is true 42 43 TEST COMPLETE 44 45