IndexedDB: don't expose IDBDatabaseError to script
[WebKit-https.git] / LayoutTests / storage / indexeddb / version-change-exclusive-expected.txt
1 Ensure VERSION_CHANGE transaction doesn't run concurrently with other transactions
2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
7
8 self.state = 'starting'
9 indexedDB.open('version-change-exclusive')
10 db = event.target.result
11 calling setVersion() - callback should run immediately
12 db.setVersion('version 1')
13 calling open() - callback should wait until VERSION_CHANGE transaction is complete
14 indexedDB.open('version-change-exclusive')
15 setVersion() callback
16 starting work in VERSION_CHANGE transaction
17 self.state = 'VERSION_CHANGE started'
18 store = db.createObjectStore('test-store')
19 store.put(0, 0)
20 in put's onsuccess
21 store.put(1, 1)
22 in put's onsuccess
23 store.put(2, 2)
24 in put's onsuccess
25 store.put(3, 3)
26 in put's onsuccess
27 store.put(4, 4)
28 in put's onsuccess
29 store.put(5, 5)
30 in put's onsuccess
31 store.put(6, 6)
32 in put's onsuccess
33 store.put(7, 7)
34 in put's onsuccess
35 store.put(8, 8)
36 in put's onsuccess
37 store.put(9, 9)
38 in put's onsuccess
39 ending work in VERSION_CHANGE transaction
40 self.state = 'VERSION_CHANGE finished'
41 open() callback - this should appear after VERSION_CHANGE transaction ends
42 PASS self.state is "VERSION_CHANGE finished"
43 PASS successfullyParsed is true
44
45 TEST COMPLETE
46