3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
7
8 indexedDB.deleteDatabase(dbname)
9 request = indexedDB.open(dbname, 2)
10
11 firstUpgradeNeededCallback():
12 db = event.target.result
13 db.createObjectStore('some os')
14
15 openSuccess():
16 db = event.target.result
17 PASS db.version is 2
18 db.close()
19 request = indexedDB.open(dbname, 3)
20 request.onupgradeneeded = secondUpgradeNeededCallback
21 request.onerror = errorAfterAbortCallback
22
23 secondUpgradeNeededCallback():
24 db = event.target.result
25 db.createObjectStore('some os 2')
26 event.target.transaction.abort()
27
28 errorAfterAbortCallback():
29 PASS db.version is 2
30 request = indexedDB.open(dbname)
31 request.onsuccess = finalSuccessCallback
32
33 finalSuccessCallback():
34 db = event.target.result
35 PASS db.version is 2
36 PASS db.objectStoreNames.length is 1
37 PASS db.objectStoreNames[0] is "some os"
38 PASS successfullyParsed is true
39
40 TEST COMPLETE
41