Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / storage / indexeddb / intversion-open-in-upgradeneeded-expected.txt
blobff237d39a3ea43585ffa4ef54b91558c5f79dac9
1 Test calling db.open in upgradeneeded.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 dbname = "intversion-open-in-upgradeneeded.html"
7 indexedDB.deleteDatabase(dbname)
8 request = indexedDB.open(dbname, 1)
9 request.onupgradeneeded = upgradeNeeded1
10 request.onsuccess = openSuccess1
12 upgradeNeeded1():
13 db = event.target.result
14 PASS event.newVersion is 1
15 transaction = event.target.transaction
16 db.createObjectStore('os')
17 db.onversionchange = onVersionChange
18 request = indexedDB.open(dbname, 3)
19 request.onupgradeneeded = upgradeNeeded2
20 request.onsuccess = openSuccess2
22 transactionOnComplete():
23 sawTransactionComplete = true
25 openSuccess1():
26 PASS sawTransactionComplete is true
27 db = event.target.result
28 PASS db.version is 1
29 Start a transaction to ensure the connection is still open.
30 transaction = db.transaction('os')
32 onVersionChange():
33 db.close()
35 upgradeNeeded2():
36 db = event.target.result
37 PASS event.newVersion is 3
39 openSuccess2():
40 db = event.target.result
41 PASS db.version is 3
42 PASS successfullyParsed is true
44 TEST COMPLETE