Test IndexedDB's clearing an object store

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


indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;

indexedDB.open(name, description)
db = event.target.result
request = db.setVersion('1')
Deleted all object stores.
objectStore = db.createObjectStore('foo', { autoIncrement: true });
request = objectStore.add({});
Expecting exception from db.transaction('foo').objectStore('foo').clear();
PASS Exception was thrown.
PASS code is IDBDatabaseException.READ_ONLY_ERR
db.transaction('foo', IDBTransaction.READ_WRITE).objectStore('foo').clear();
request = db.transaction('foo').objectStore('foo').openCursor();
cursor = request.result;
PASS cursor is null
PASS successfullyParsed is true

TEST COMPLETE

