Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / storage / indexeddb / transaction-readwrite-exclusive-expected.txt
blob98244c1029b9de890d89653977447627e85f8967
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)
9 openConnection1():
10 indexedDB.open(dbname, 1)
12 openOnUpgradeNeeded1():
13 db = event.target.result
14 store = db.createObjectStore('store')
16 openOnSuccess():
17 db1 = event.target.result
19 openConnection2():
20 indexedDB.open(dbname, 1)
22 openOnSuccess2():
23 db2 = event.target.result
25 startWork():
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
34 count = 0
35 transaction1.objectStore('store').put(1, count++)
36 transaction2.objectStore('store').put(2, 0)
38 put1OnSuccess():
39 transaction1PutSuccess = true
40 transaction1.objectStore('store').put(1, count++)
42 put1OnSuccess():
43 transaction1PutSuccess = true
44 transaction1.objectStore('store').put(1, count++)
46 put1OnSuccess():
47 transaction1PutSuccess = true
48 transaction1.objectStore('store').put(1, count++)
50 put1OnSuccess():
51 transaction1PutSuccess = true
52 transaction1.objectStore('store').put(1, count++)
54 put1OnSuccess():
55 transaction1PutSuccess = true
57 onTransaction1Complete():
58 transaction1Complete = true
59 PASS transaction2PutSuccess is false
60 PASS transaction2Complete is false
62 put2OnSuccess():
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
73 TEST COMPLETE