summaryrefslogtreecommitdiffstats
path: root/LayoutTests/storage/indexeddb/transaction-abort-expected.txt
blob: c3bcb7069a703f03c790d1ee91b47a18e76bd972 (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
Test transaction aborts send the proper onabort messages..

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


webkitIndexedDB.open('name')
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 = transactionAborted
trans.oncomplete = unexpectedCompleteCallback
store = trans.objectStore('storeName')
store.add({x: 'value2', y: 'zzz2'}, 'key2')
store.add({x: 'value3', y: 'zzz3'}, 'key3')
PASS event.target.errorCode is webkitIDBDatabaseException.ABORT_ERR
PASS firstError is false
PASS secondError is false
PASS abortFired is false
Expecting exception from store.add({x: 'value4', y: 'zzz4'}, 'key4')
PASS Exception was thrown.
PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
PASS event.target.errorCode is webkitIDBDatabaseException.ABORT_ERR
PASS firstError is true
PASS secondError is false
PASS abortFired is false
PASS firstError is true
PASS secondError is true
PASS abortFired is false
Expecting exception from store.add({x: 'value5', y: 'zzz5'}, 'key5')
PASS Exception was thrown.
PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
PASS successfullyParsed is true

TEST COMPLETE