blob: 2996d4e23a47249774ab7ef452f2e9acd86a51ca [file] [log] [blame]
This test exercises the obvious ways that IDBDatabase.createObjectStore can fail.
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)
Initial upgrade needed: Old version - 0 New version - 1
Failed to create object store with both autoincrement and an empty keypath: InvalidAccessError: Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
Object store names:
Failed to create object store with both autoincrement and a sequence keypath: InvalidAccessError: Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
Object store names:
Failed to create object store with invalid keyPath: SyntaxError: Failed to execute 'createObjectStore' on 'IDBDatabase': The keyPath option is not a valid key path.
Object store names:
Actually created an object store
Object store names:
TestObjectStore1
Failed to create TestObjectStore a second time: ConstraintError: Failed to execute 'createObjectStore' on 'IDBDatabase': An object store with the specified name already exists.
Object store names:
TestObjectStore1
Initial upgrade versionchange transaction complete
Object store names:
TestObjectStore1
Failed to create object store while there is no version change transaction: InvalidStateError: Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
Object store names:
TestObjectStore1
Failed to create object store outside of onupgradeneeded: InvalidStateError: Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
Object store names:
TestObjectStore1
PASS successfullyParsed is true
TEST COMPLETE