blob: 7a06b3d49f4d6ec1a298c3b01fb87b0bc9ad3d92 [file] [log] [blame]
Test IndexedDB's opening DB more than once
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
dbname = "global-data.html"
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
db1.createObjectStore(objectStoreName, objectStoreOptions);
indexedDB.open(dbname);
db2 = event.target.result
PASS db1 !== db2 is true
PASS db1.objectStoreNames.length is 1
PASS db1.objectStoreNames.item(0) is objectStoreName
PASS db2.objectStoreNames.length is 1
PASS db2.objectStoreNames.item(0) is objectStoreName
objectStore1 = db1.transaction(objectStoreName).objectStore(objectStoreName);
PASS objectStore1.name is objectStoreName
PASS objectStore1.keyPath is objectStoreOptions.keyPath
objectStore2 = db2.transaction(objectStoreName).objectStore(objectStoreName);
PASS objectStore1 !== objectStore2 is true
PASS objectStore2.name is objectStoreName
PASS objectStore2.keyPath is objectStoreOptions.keyPath
PASS successfullyParsed is true
TEST COMPLETE