1 Test that only the first open call gets an upgradeneeded
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 dbname = "intversion-two-opens-no-versions.html"
7 indexedDB.deleteDatabase(dbname)
9 request.onsuccess = connection1OpenSuccess
10 request.onupgradeneeded = connection1UpgradeNeeded
11 indexedDB.open(dbname)
12 request.onsuccess = connection2OpenSuccess
13 request.onupgradeneeded = connection2UpgradeNeeded
15 connection1UpgradeNeeded():
16 gotFirstUpgradeNeededEvent = true
17 PASS event.oldVersion is 0
18 PASS event.newVersion is 1
20 connection1OpenSuccess():
21 db = event.target.result
22 PASS gotFirstUpgradeNeededEvent is true
25 connection2OpenSuccess():
26 db = event.target.result
27 PASS gotSecondUpgradeNeededEvent is false
29 PASS successfullyParsed is true