| CONSOLE MESSAGE: line 65: Uncaught this exception is expected |
| CONSOLE MESSAGE: line 65: Uncaught this exception is expected |
| Test exceptions in IDBRequest handlers cause aborts. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| webkitIndexedDB.open('exception-in-event-aborts') |
| db = event.target.result |
| db.setVersion('new version') |
| setVersionSuccess(): |
| trans = event.target.result |
| PASS trans !== null is true |
| trans.oncomplete = startTest |
| Deleted all object stores. |
| store = db.createObjectStore('storeName', null) |
| store.add({x: 'value', y: 'zzz'}, 'key') |
| |
| trans = db.transaction([], webkitIDBTransaction.READ_WRITE) |
| trans.onabort = transactionAborted1 |
| trans.oncomplete = unexpectedCompleteCallback |
| store = trans.objectStore('storeName') |
| store.add({x: 'value2', y: 'zzz2'}, 'key2') |
| |
| event.preventDefault() |
| Throwing |
| |
| PASS The transaction was aborted. |
| trans = db.transaction([], webkitIDBTransaction.READ_WRITE) |
| trans.onabort = transactionAborted2 |
| trans.oncomplete = unexpectedCompleteCallback |
| store = trans.objectStore('storeName') |
| store.add({x: 'value', y: 'zzz'}, 'key') |
| |
| event.preventDefault() |
| Throwing |
| |
| PASS The transaction was aborted. |
| trans = db.transaction([], webkitIDBTransaction.READ_WRITE) |
| trans.onabort = unexpectedAbortCallback |
| trans.oncomplete = transactionCompleted1 |
| store = trans.objectStore('storeName') |
| store.add({x: 'value3', y: 'zzz3'}, 'key3') |
| |
| event.preventDefault() |
| Throwing within a try block |
| |
| PASS The transaction completed. |
| trans = db.transaction([], webkitIDBTransaction.READ_WRITE) |
| trans.onabort = unexpectedAbortCallback |
| trans.oncomplete = transactionCompleted2 |
| store = trans.objectStore('storeName') |
| store.add({x: 'value4', y: 'zzz4'}, 'key4') |
| FAIL Success function called unexpectedly. |
| |
| PASS The transaction completed. |
| |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |