summaryrefslogtreecommitdiffstats
path: root/LayoutTests/storage/indexeddb/error-causes-abort-by-default-expected.txt
blob: 96f4b65f6471772037b77b24809b19867d3bd833 (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
Verify that a transaction with an error aborts unless preventDefault() is called.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


webkitIndexedDB.open('error-causes-abort-by-default')
db = event.target.result
db.setVersion('new version')
setVersionSuccess():
trans = event.target.result
PASS trans !== null is true
trans.oncomplete = addData
Deleted all object stores.
db.createObjectStore('storeName', null)
trans = db.transaction([], webkitIDBTransaction.READ_WRITE)
trans.onabort = unexpectedAbortCallback
trans.oncomplete = transactionCompleted
store = trans.objectStore('storeName')
store.add({x: 'value', y: 'zzz'}, 'key')
event.target.source.add({x: 'value', y: 'zzz'}, 'key')
event.preventDefault()
PASS Transaction completed


trans = db.transaction([], webkitIDBTransaction.READ_WRITE)
trans.onabort = transactionAborted1
trans.oncomplete = unexpectedCompleteCallback
store = trans.objectStore('storeName')
store.add({x: 'value', y: 'zzz'}, 'key')
Doing nothing to prevent the default action...
PASS Transaction aborted


trans = db.transaction([], webkitIDBTransaction.READ_WRITE)
trans.onabort = transactionAborted2
trans.oncomplete = unexpectedCompleteCallback
store = trans.objectStore('storeName')
store.add({x: 'value', y: 'zzz'}, 'key')
Omitting an onerror handler
PASS Transaction aborted
PASS successfullyParsed is true

TEST COMPLETE