blob: eabb8722b524c402e0125fb9b4ab00bd6c4af88a [file] [log] [blame]
Test IndexedDB's creating unique index and updating indexNames
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('a', { keyPath: 'id', autoIncrement: true });
index = objectStore.createIndex(indexName, indexKeyPath, { unique: true });
PASS index.name is indexName
PASS index.keyPath is indexKeyPath
PASS index.unique is true
PASS objectStore.indexNames.length is 1
PASS foundNewlyCreatedIndex is true
PASS event.target.transaction.db is db
PASS event.target.transaction.mode is 'versionchange'
PASS successfullyParsed is true
TEST COMPLETE