1 Test IndexedDB transaction rollback.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 dbname = "transaction-rollback.html"
7 indexedDB.deleteDatabase(dbname)
9 db.createObjectStore('myObjectStore')
10 PASS db.objectStoreNames.length is 1
12 transaction = db.transaction(['myObjectStore'], 'readwrite')
13 store = transaction.objectStore('myObjectStore')
14 store.add('rollbackValue', 'rollbackKey123')
16 PASS event.target.result is "rollbackKey123"
19 cursor = event.target.result
21 Transaction was aborted.
22 transaction = db.transaction(['myObjectStore'], 'readonly')
23 store = transaction.objectStore('myObjectStore')
24 store.get('rollbackKey123')
26 PASS event.target.result is undefined
27 PASS cursor.value is "rollbackValue"
28 PASS successfullyParsed is true