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;

dbname = "deleteIndex.html"
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
objectStore = db.createObjectStore('foo');
Expecting exception from objectStore.deleteIndex('first')
PASS Exception was thrown.
PASS code is DOMException.NOT_FOUND_ERR
PASS ename is 'NotFoundError'
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 DOMException.NOT_FOUND_ERR
PASS ename is 'NotFoundError'
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 DOMException.INVALID_STATE_ERR
PASS ename is 'InvalidStateError'
Expecting exception from objectStore.deleteIndex('second')
PASS Exception was thrown.
PASS code is 0
PASS ename is 'TransactionInactiveError'
PASS successfullyParsed is true

TEST COMPLETE

