summaryrefslogtreecommitdiffstats
path: root/LayoutTests/storage/indexeddb/exception-in-event-aborts-expected.txt
blob: 25c91e2e65faf9192cd64b9ef6b2d92103d166f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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