| OLD | NEW |
| 1 Test IndexedDB's cursor value property. | 1 Test IndexedDB's cursor value property. |
| 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 = "cursor-value.html" | 6 dbname = "cursor-value.html" |
| 9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
| 10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
| 11 db.createObjectStore('store') | 9 db.createObjectStore('store') |
| 12 | 10 |
| 13 testCursor(): | 11 testCursor(): |
| 14 transaction = db.transaction('store', 'readwrite') | 12 transaction = db.transaction('store', 'readwrite') |
| 15 store = transaction.objectStore('store') | 13 store = transaction.objectStore('store') |
| 16 store.put({a: 1, b: 10}, 'key1') | 14 store.put({a: 1, b: 10}, 'key1') |
| 17 store.put({a: 2, b: 20}, 'key2') | 15 store.put({a: 2, b: 20}, 'key2') |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 PASS cursor.key is 'key1' | 116 PASS cursor.key is 'key1' |
| 119 | 117 |
| 120 Check expected values: | 118 Check expected values: |
| 121 PASS cursor.value.a is 1 | 119 PASS cursor.value.a is 1 |
| 122 PASS cursor.value.b is 10 | 120 PASS cursor.value.b is 10 |
| 123 PASS cursor.value.foo is undefined | 121 PASS cursor.value.foo is undefined |
| 124 PASS successfullyParsed is true | 122 PASS successfullyParsed is true |
| 125 | 123 |
| 126 TEST COMPLETE | 124 TEST COMPLETE |
| 127 | 125 |
| OLD | NEW |