1 CONSOLE ERROR: line 36: Uncaught this exception is expected
2 CONSOLE ERROR: line 36: Uncaught this exception is expected
3 Test exceptions in IDBRequest handlers cause aborts.
5 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
8 dbname = "exception-in-event-aborts.html"
9 indexedDB.deleteDatabase(dbname)
10 indexedDB.open(dbname)
11 store = db.createObjectStore('storeName', null)
12 store.add({x: 'value', y: 'zzz'}, 'key')
14 trans = db.transaction(['storeName'], 'readwrite')
15 trans.onabort = transactionAborted1
16 trans.oncomplete = unexpectedCompleteCallback
17 store = trans.objectStore('storeName')
18 store.add({x: 'value2', y: 'zzz2'}, 'key2')
20 event.preventDefault()
23 PASS Got expected error: 'this exception is expected'
24 PASS The transaction was aborted.
25 trans = db.transaction(['storeName'], 'readwrite')
26 trans.onabort = transactionAborted2
27 trans.oncomplete = unexpectedCompleteCallback
28 store = trans.objectStore('storeName')
29 store.add({x: 'value', y: 'zzz'}, 'key')
31 event.preventDefault()
34 PASS Got expected error: 'this exception is expected'
35 PASS The transaction was aborted.
36 trans = db.transaction(['storeName'], 'readwrite')
37 trans.onabort = unexpectedAbortCallback
38 trans.oncomplete = transactionCompleted1
39 store = trans.objectStore('storeName')
40 store.add({x: 'value3', y: 'zzz3'}, 'key3')
42 event.preventDefault()
43 Throwing within a try block
45 PASS The transaction completed.
46 trans = db.transaction(['storeName'], 'readwrite')
47 trans.onabort = unexpectedAbortCallback
48 trans.oncomplete = transactionCompleted2
49 store = trans.objectStore('storeName')
50 store.add({x: 'value4', y: 'zzz4'}, 'key4')
53 PASS The transaction completed.
55 PASS successfullyParsed is true