| Test IndexedDB readyState property during different operations |
| |
| 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) |
| PASS openRequest.readyState is 'done' |
| objectStore = db.createObjectStore('foo'); |
| key = 10; |
| request = objectStore.add({}, key); |
| PASS request.readyState is 'pending' |
| getRecord(): |
| PASS request.readyState is 'done' |
| PASS event.target.result is key |
| request = objectStore.get(key); |
| PASS request.readyState is 'pending' |
| finalCheck(): |
| PASS request.readyState is 'done' |
| PASS event.target.result == null is false |
| checkReadyStateInOpen(): |
| PASS event.target is openRequest |
| PASS openRequest.readyState is "done" |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |