| Test IndexedDB's opening DB more than once |
| |
| 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) |
| 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 |
| |