1 Test the basics of IndexedDB's IDBDatabase. 2 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 6 webkitIndexedDB.open('database-basics') 7 db = event.target.result 8 db.setVersion('new version') 9 setVersionSuccess(): 10 trans = event.target.result 11 PASS trans !== null is true 12 Deleted all object stores. 13 Testing setVersion. 14 db.setVersion("version a") 15 db.setVersion("version b") 16 PASS db.version is "version b" 17 PASS db.name is "database-basics" 18 PASS db.objectStoreNames is [] 19 PASS db.objectStoreNames.length is 0 20 PASS db.objectStoreNames.contains('') is false 21 PASS db.objectStoreNames[0] is null 22 PASS db.objectStoreNames.item(0) is null 23 db.createObjectStore("test123") 24 PASS db.objectStoreNames is ['test123'] 25 PASS db.objectStoreNames.length is 1 26 PASS db.objectStoreNames.contains('') is false 27 PASS db.objectStoreNames.contains('test456') is false 28 PASS db.objectStoreNames.contains('test123') is true 29 db.setVersion("version c") 30 PASS db.version is "version c" 31 PASS db.name is "database-basics" 32 PASS db.objectStoreNames is ['test123'] 33 PASS db.objectStoreNames.length is 1 34 PASS db.objectStoreNames.contains('') is false 35 PASS db.objectStoreNames.contains('test456') is false 36 PASS db.objectStoreNames.contains('test123') is true 37 db.createObjectStore("test456") 38 setVersionTrans = event.target.result 39 PASS setVersionTrans !== null is true 40 PASS db.version is "version b" 41 PASS db.objectStoreNames is ['test123'] 42 PASS db.objectStoreNames.length is 1 43 PASS db.objectStoreNames.contains('') is false 44 PASS db.objectStoreNames.contains('test456') is false 45 PASS db.objectStoreNames.contains('test123') is true 46 PASS successfullyParsed is true 47 48 TEST COMPLETE 49 50