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
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
26 PASS sawTransactionComplete is true
27 db = event.target.result
29 Start a transaction to ensure the connection is still open.
30 transaction = db.transaction('os')
36 db = event.target.result
37 PASS event.newVersion is 3
40 db = event.target.result
42 PASS successfullyParsed is true