| OLD | NEW |
| 1 Test the basics of IndexedDB's IDBCursor objects. | 1 Test the basics of IndexedDB's IDBCursor objects. |
| 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-basics.html" | 6 dbname = "cursor-basics.html" |
| 9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
| 10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
| 11 | 9 |
| 12 prepareDatabase(): | 10 prepareDatabase(): |
| 13 store = db.createObjectStore('storeName') | 11 store = db.createObjectStore('storeName') |
| 14 index = store.createIndex('indexName', 'indexOn') | 12 index = store.createIndex('indexName', 'indexOn') |
| 15 store.put({indexOn: 'a'}, 0) | 13 store.put({indexOn: 'a'}, 0) |
| 16 store.openCursor() | 14 store.openCursor() |
| 17 store.openKeyCursor() | 15 store.openKeyCursor() |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 PASS typeof cursor.delete is "function" | 100 PASS typeof cursor.delete is "function" |
| 103 PASS cursor.key is "a" | 101 PASS cursor.key is "a" |
| 104 PASS cursor.primaryKey is 0 | 102 PASS cursor.primaryKey is 0 |
| 105 PASS cursor instanceof IDBCursorWithValue is false | 103 PASS cursor instanceof IDBCursorWithValue is false |
| 106 PASS cursor.primaryKey is 0 | 104 PASS cursor.primaryKey is 0 |
| 107 PASS 'value' in cursor is false | 105 PASS 'value' in cursor is false |
| 108 PASS successfullyParsed is true | 106 PASS successfullyParsed is true |
| 109 | 107 |
| 110 TEST COMPLETE | 108 TEST COMPLETE |
| 111 | 109 |
| OLD | NEW |