blob: 42a29fb61897d68b81cc9e0ed62b0f42de964f7a [file] [log] [blame]
Test IndexedDB's creating and deleting indexes
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.deleteDatabase(dbname)
indexedDB.open(dbname)
objectStore = db.createObjectStore(objectStoreName, { keyPath: 'foo' });
PASS db.objectStoreNames.length is 1
PASS db.objectStoreNames.item(0) is objectStoreName
PASS objectStore.indexNames.length is 0
index = objectStore.createIndex(indexName, 'foo');
PASS objectStore.indexNames.length is 1
PASS objectStore.indexNames.item(0) is indexName
objectStore.deleteIndex(indexName);
PASS objectStore.indexNames.length is 0
PASS successfullyParsed is true
TEST COMPLETE