1 Test the order when there are pending setVersion, delete and open calls.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 dbname = "deletedatabase-delayed-by-versionchange.html"
7 indexedDB.deleteDatabase(dbname)
11 setVersionBlockedEventFired = false
12 versionChangeComplete = false
13 deleteDatabaseBlockedEventFired = false
14 deleteDatabaseComplete = false
15 h1 = event.target.result
17 indexedDB.open(dbname)
21 indexedDB.open(dbname, 2)
22 indexedDB.deleteDatabase(dbname)
25 PASS event.target.version is 1
26 PASS event.oldVersion is 1
27 PASS event.newVersion is 2
30 PASS event.target.version is 1
31 PASS event.oldVersion is 1
32 PASS event.newVersion is 2
34 h1SecondOnVersionChange():
35 PASS event.target.version is 1
36 PASS event.oldVersion is 1
37 PASS event.newVersion is null
39 h2OnSecondVersionChange():
40 PASS event.target.version is 1
41 PASS event.oldVersion is 1
42 PASS event.newVersion is null
45 setVersionBlockedEventFired = true
47 indexedDB.open(dbname)
50 deleteDatabaseOnBlocked():
51 deleteDatabaseBlockedEventFired = true
56 transactionOnComplete():
57 versionChangeComplete = true
62 deleteDatabaseOnSuccess():
63 deleteDatabaseComplete = true
66 PASS setVersionBlockedEventFired is true
67 PASS versionChangeComplete is true
68 PASS deleteDatabaseBlockedEventFired is true
69 PASS deleteDatabaseComplete is true
70 PASS successfullyParsed is true