summaryrefslogtreecommitdiffstats
path: root/LayoutTests/storage/indexeddb/error-causes-abort-by-default-expected.txt
blob: dd8fd61be8fbd0ebb27189b5633fd02072863daa (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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('name')
PASS 'onsuccess' in result is true
PASS 'onerror' in result is true
PASS 'readyState' in result is true
An event should fire shortly...

Success event fired:
PASS 'result' in event is true
PASS 'code' in event is false
PASS 'message' in event is false
PASS 'source' in event is true
PASS event.source != null is true
PASS 'onsuccess' in event.target is true
PASS 'onerror' in event.target is true
PASS 'readyState' in event.target is true
PASS event.target.readyState is event.target.DONE

db = event.result
db.setVersion('new version')
PASS 'onsuccess' in result is true
PASS 'onerror' in result is true
PASS 'readyState' in result is true
An event should fire shortly...

setVersionSuccess():
Success event fired:
PASS 'result' in event is true
PASS 'code' in event is false
PASS 'message' in event is false
PASS 'source' in event is true
PASS event.source != null is true
PASS 'onsuccess' in event.target is true
PASS 'onerror' in event.target is true
PASS 'readyState' in event.target is true
PASS event.target.readyState is event.target.DONE

trans = event.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')
PASS 'onsuccess' in result is true
PASS 'onerror' in result is true
PASS 'readyState' in result is true
An event should fire shortly...

Success event fired:
PASS 'result' in event is true
PASS 'code' in event is false
PASS 'message' in event is false
PASS 'source' in event is true
PASS event.source != null is true
PASS 'onsuccess' in event.target is true
PASS 'onerror' in event.target is true
PASS 'readyState' in event.target is true
PASS event.target.readyState is event.target.DONE

event.source.add({x: 'value', y: 'zzz'}, 'key')
PASS 'onsuccess' in result is true
PASS 'onerror' in result is true
PASS 'readyState' in result is true
An event should fire shortly...

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')
PASS 'onsuccess' in result is true
PASS 'onerror' in result is true
PASS 'readyState' in result is true
An event should fire shortly...

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')
PASS 'onsuccess' in result is true
PASS 'onerror' in result is true
PASS 'readyState' in result is true
An event should fire shortly...

Omitting an onerror handler
PASS Transaction aborted
PASS successfullyParsed is true

TEST COMPLETE