| OLD | NEW |
| 1 Exercise optional arguments with missing vs. undefined in IndexedDB methods. | 1 Exercise optional arguments with missing vs. undefined in IndexedDB methods. |
| 2 | 2 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 | 4 |
| 5 | 5 |
| 6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; | |
| 7 | |
| 8 dbname = "optional-arguments.html" | 6 dbname = "optional-arguments.html" |
| 9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
| 10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
| 11 | 9 |
| 12 prepareDatabase(): | 10 prepareDatabase(): |
| 13 db = event.target.result | 11 db = event.target.result |
| 14 store = db.createObjectStore('store', {keyPath: 'id'}) | 12 store = db.createObjectStore('store', {keyPath: 'id'}) |
| 15 store.createIndex('by_name', 'name', {unique: true}) | 13 store.createIndex('by_name', 'name', {unique: true}) |
| 16 store.put({id: 1, name: 'a'}) | 14 store.put({id: 1, name: 'a'}) |
| 17 tx = db.transaction('store', 'readwrite') | 15 tx = db.transaction('store', 'readwrite') |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 150 |
| 153 continueUndefined(): | 151 continueUndefined(): |
| 154 request = store.openCursor() | 152 request = store.openCursor() |
| 155 cursor = request.result | 153 cursor = request.result |
| 156 PASS request.result is non-null. | 154 PASS request.result is non-null. |
| 157 PASS cursor.continue(undefined) did not throw exception. | 155 PASS cursor.continue(undefined) did not throw exception. |
| 158 PASS successfullyParsed is true | 156 PASS successfullyParsed is true |
| 159 | 157 |
| 160 TEST COMPLETE | 158 TEST COMPLETE |
| 161 | 159 |
| OLD | NEW |