summaryrefslogtreecommitdiffstats
path: root/LayoutTests/storage/indexeddb/transaction-after-close-expected.txt
blob: 6be57956ab8797d2c555d55a9ecca440907cc30d (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
Test closing a database connection in IndexedDB.

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


PASS 'webkitIndexedDB' in window is true
PASS webkitIndexedDB == null is false
webkitIndexedDB.open('transaction-after-close')
openSuccess():
db = event.target.result
request = db.setVersion('version 1')
Deleted all object stores.
store = db.createObjectStore('store')
request = store.put('x', 'y')
PASS Put success
running first transaction
currentTransaction = db.transaction([], webkitIDBTransaction.READ_WRITE)
objectStore.put('a', 'b')
db.close()
Expecting exception from db.transaction([], webkitIDBTransaction.READ_WRITE)
PASS Exception was thrown.
PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR

verify that we can reopen the db after calling close
webkitIndexedDB.open('transaction-after-close')
second_db = event.target.result
currentTransaction = second_db.transaction([], webkitIDBTransaction.READ_WRITE)
request = store.put('1', '2')
PASS final put success
PASS successfullyParsed is true

TEST COMPLETE