| Test IndexedDB's event.target.result after add() and put() |
| |
| 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('foo', { autoIncrement: true }); |
| request = objectStore.add({}); |
| key1 = event.target.result; |
| request = objectStore.put({}, key1); |
| PASS event.target.result is key1 |
| key2 = 10; |
| request = objectStore.put({}, key2); |
| PASS event.target.result is key2 |
| key2 = 100; |
| request = objectStore.put({}, key2); |
| PASS event.target.result is key2 |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |