1 Test IndexedDB transaction basics. 2 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 6 PASS 'webkitIndexedDB' in window is true 7 PASS webkitIndexedDB == null is false 8 webkitIndexedDB.open('transaction-basics') 9 openSuccess(): 10 db = event.target.result 11 request = db.setVersion('version 1') 12 Deleted all object stores. 13 PASS window.db.objectStoreNames is [] 14 PASS window.db.objectStoreNames.length is 0 15 PASS window.db.objectStoreNames.contains('storeFail') is false 16 request = startSetVersion('version fail') 17 addRemoveIDBObjects(): 18 trans = event.target.result 19 PASS trans !== null is true 20 store = db.createObjectStore('storeFail', null) 21 index = store.createIndex('indexFail', 'x', false) 22 db.deleteObjectStore('storeFail') 23 store.deleteIndex('indexFail') 24 PASS window.db.objectStoreNames is [] 25 PASS window.db.objectStoreNames.length is 0 26 PASS window.db.objectStoreNames.contains('storeFail') is false 27 request = startSetVersion('version fail') 28 addRemoveAddIDBObjects(): 29 trans = event.target.result 30 PASS trans !== null is true 31 store = db.createObjectStore('storeFail', null) 32 index = store.createIndex('indexFail', 'x', false) 33 db.deleteObjectStore('storeFail') 34 store.deleteIndex('indexFail') 35 store = db.createObjectStore('storeFail', null) 36 index = store.createIndex('indexFail', 'x', false) 37 PASS event.cancelable is false 38 PASS window.db.objectStoreNames is [] 39 PASS window.db.objectStoreNames.length is 0 40 PASS window.db.objectStoreNames.contains('storeFail') is false 41 request = startSetVersion('version fail') 42 addIDBObjects(): 43 trans = event.target.result 44 PASS trans !== null is true 45 store = db.createObjectStore('storeFail', null) 46 index = store.createIndex('indexFail', 'x', false) 47 PASS db.objectStoreNames is ['storeFail'] 48 PASS db.objectStoreNames.length is 1 49 PASS db.objectStoreNames.contains('storeFail') is true 50 request = startSetVersion('version fail') 51 removeIDBObjects(): 52 trans = event.target.result 53 PASS trans !== null is true 54 store = trans.objectStore('storeFail') 55 store.deleteIndex('indexFail') 56 db.deleteObjectStore('storeFail') 57 PASS db.objectStoreNames is ['storeFail'] 58 PASS db.objectStoreNames.length is 1 59 PASS db.objectStoreNames.contains('storeFail') is true 60 db.setVersion('new version') 61 setVersionSuccess(): 62 trans = event.target.result 63 PASS trans !== null is true 64 Deleted all object stores. 65 db.createObjectStore('storeName', null) 66 db.transaction({mode: webkitIDBTransaction.READ_WRITE}) 67 store = transaction.objectStore('storeName') 68 PASS store.name is "storeName" 69 PASS complete event fired 70 PASS event.cancelable is false 71 PASS complete event fired 72 PASS oncomplete event had fired 73 PASS successfullyParsed is true 74 75 TEST COMPLETE 76 77