Test IndexedDB's webkitIDBObjectStore.clear().

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


webkitIndexedDB.open('objectstore-clear')
db = event.target.result
db.setVersion('new version')
trans = event.target.result
PASS trans !== null is true
Deleted all object stores.
store = db.createObjectStore('storeName', null)
store.createIndex('indexName', '')
PASS store.indexNames.contains('indexName') is true
store.add('value', 'key')
otherStore = db.createObjectStore('otherStoreName', null)
otherStore.add('value', 'key')
store.clear()
PASS event.target.result is undefined.
store.openCursor()
PASS event.target.result is null
index = store.index('indexName')
index.openKeyCursor()
openKeyCursorSuccess():
PASS event.target.result is null
db.transaction({mode: webkitIDBTransaction.READ_WRITE})
otherStore = transaction.objectStore('otherStoreName')
otherStore.get('key')
PASS event.target.result is "value"
PASS successfullyParsed is true

TEST COMPLETE

