1 Test that a deleteDatabase called while handling an upgradeneeded event is queued and fires its events at the right time. The close() call to unblock the delete occurs in the connection's 'versionchange' event handler.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 dbname = "delete-in-upgradeneeded-close-in-versionchange.html"
7 indexedDB.deleteDatabase(dbname)
10 request = indexedDB.open(dbname, 1)
12 upgradeNeededCallback():
13 PASS sawUpgradeNeeded is false
14 sawUpgradeNeeded = true
15 PASS event.oldVersion is 0
16 PASS event.newVersion is 1
17 db = event.target.result
18 deleteRequest = indexedDB.deleteDatabase(dbname)
19 request2.onsuccess = deleteSuccessCallback
21 versionChangeCallback():
22 PASS event.oldVersion is 1
23 PASS event.newVersion is null
24 sawVersionChange = true
25 Closing the connection before the IDBOpenDBRequest's success fires will cause the open to fail.
28 deleteSuccessCallback():
29 PASS sawVersionChange is true
30 PASS sawUpgradeNeeded is true
31 PASS successfullyParsed is true