Test IndexedDB deleteIndex method

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;
PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true

indexedDB.open('deleteIndex')
db = event.target.result
request = db.setVersion('1')
transaction = event.target.result;
Deleted all object stores.
objectStore = db.createObjectStore('foo');
Expecting exception from objectStore.deleteIndex('first')
PASS Exception was thrown.
PASS code is IDBDatabaseException.NOT_FOUND_ERR
PASS objectStore.deleteIndex() threw exception TypeError: Not enough arguments.
index = objectStore.createIndex('first', 'first');
Expecting exception from objectStore.deleteIndex('FIRST')
PASS Exception was thrown.
PASS code is IDBDatabaseException.NOT_FOUND_ERR
index = objectStore.createIndex('second', 'second');
returnValue = objectStore.deleteIndex('first');
PASS returnValue is undefined
Expecting exception from db.createObjectStore('bar');
PASS Exception was thrown.
PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
Expecting exception from objectStore.deleteIndex('second')
PASS Exception was thrown.
PASS code is IDBDatabaseException.TRANSACTION_INACTIVE_ERR
PASS successfullyParsed is true

TEST COMPLETE

