1 CONSOLE MESSAGE: line 65: Uncaught this exception is expected 2 CONSOLE MESSAGE: line 65: Uncaught this exception is expected 3 Test exceptions in IDBRequest handlers cause aborts. 4 5 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 6 7 8 webkitIndexedDB.open('exception-in-event-aborts') 9 db = event.target.result 10 db.setVersion('new version') 11 setVersionSuccess(): 12 trans = event.target.result 13 PASS trans !== null is true 14 trans.oncomplete = startTest 15 Deleted all object stores. 16 store = db.createObjectStore('storeName', null) 17 store.add({x: 'value', y: 'zzz'}, 'key') 18 19 trans = db.transaction([], webkitIDBTransaction.READ_WRITE) 20 trans.onabort = transactionAborted1 21 trans.oncomplete = unexpectedCompleteCallback 22 store = trans.objectStore('storeName') 23 store.add({x: 'value2', y: 'zzz2'}, 'key2') 24 25 event.preventDefault() 26 Throwing 27 28 PASS The transaction was aborted. 29 trans = db.transaction([], webkitIDBTransaction.READ_WRITE) 30 trans.onabort = transactionAborted2 31 trans.oncomplete = unexpectedCompleteCallback 32 store = trans.objectStore('storeName') 33 store.add({x: 'value', y: 'zzz'}, 'key') 34 35 event.preventDefault() 36 Throwing 37 38 PASS The transaction was aborted. 39 trans = db.transaction([], webkitIDBTransaction.READ_WRITE) 40 trans.onabort = unexpectedAbortCallback 41 trans.oncomplete = transactionCompleted1 42 store = trans.objectStore('storeName') 43 store.add({x: 'value3', y: 'zzz3'}, 'key3') 44 45 event.preventDefault() 46 Throwing within a try block 47 48 PASS The transaction completed. 49 trans = db.transaction([], webkitIDBTransaction.READ_WRITE) 50 trans.onabort = unexpectedAbortCallback 51 trans.oncomplete = transactionCompleted2 52 store = trans.objectStore('storeName') 53 store.add({x: 'value4', y: 'zzz4'}, 'key4') 54 FAIL Success function called unexpectedly. 55 56 PASS The transaction completed. 57 58 PASS successfullyParsed is true 59 60 TEST COMPLETE 61 62