1 Test that integer versions are reverted when their version transactions abort.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 dbname = "intversion-revert-on-abort.html"
7 indexedDB.deleteDatabase(dbname)
8 request = indexedDB.open(dbname, 2)
10 firstUpgradeNeededCallback():
11 db = event.target.result
12 db.createObjectStore('some os')
15 db = event.target.result
18 request = indexedDB.open(dbname, 3)
19 request.onupgradeneeded = secondUpgradeNeededCallback
20 request.onerror = errorAfterAbortCallback
22 secondUpgradeNeededCallback():
23 db = event.target.result
24 db.createObjectStore('some os 2')
25 event.target.transaction.abort()
27 errorAfterAbortCallback():
29 request = indexedDB.open(dbname)
30 request.onsuccess = finalSuccessCallback
32 finalSuccessCallback():
33 db = event.target.result
35 PASS db.objectStoreNames.length is 1
36 PASS db.objectStoreNames[0] is "some os"
37 PASS successfullyParsed is true