1 Check that readwrite transactions with overlapping scopes do not run in parallel.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 dbname = "transaction-readwrite-exclusive.html"
7 indexedDB.deleteDatabase(dbname)
10 indexedDB.open(dbname, 1)
12 openOnUpgradeNeeded1():
13 db = event.target.result
14 store = db.createObjectStore('store')
17 db1 = event.target.result
20 indexedDB.open(dbname, 1)
23 db2 = event.target.result
26 transaction1 = db1.transaction('store', 'readwrite')
27 transaction2 = db2.transaction('store', 'readwrite')
28 transaction1PutSuccess = false
29 transaction1Complete = false
30 transaction2PutSuccess = false
31 transaction2Complete = false
33 Keep transaction1 alive for a while and ensure transaction2 doesn't start
35 transaction1.objectStore('store').put(1, count++)
36 transaction2.objectStore('store').put(2, 0)
39 transaction1PutSuccess = true
40 transaction1.objectStore('store').put(1, count++)
43 transaction1PutSuccess = true
44 transaction1.objectStore('store').put(1, count++)
47 transaction1PutSuccess = true
48 transaction1.objectStore('store').put(1, count++)
51 transaction1PutSuccess = true
52 transaction1.objectStore('store').put(1, count++)
55 transaction1PutSuccess = true
57 onTransaction1Complete():
58 transaction1Complete = true
59 PASS transaction2PutSuccess is false
60 PASS transaction2Complete is false
63 transaction2PutSuccess = true
64 PASS transaction1Complete is true
66 onTransaction2Complete():
67 transaction2Complete = true
68 PASS transaction1PutSuccess is true
69 PASS transaction1Complete is true
70 PASS transaction2PutSuccess is true
71 PASS successfullyParsed is true