OLD | NEW |
1 Test IndexedDB's cursor mutation | 1 Test IndexedDB's cursor mutation |
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-mutation.html" | 6 dbname = "cursor-mutation.html" |
9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
11 | 9 |
12 setupObjectStoreAndCreateIndex(): | 10 setupObjectStoreAndCreateIndex(): |
13 objectStore = db.createObjectStore('foo', { keyPath: 'ss' }) | 11 objectStore = db.createObjectStore('foo', { keyPath: 'ss' }) |
14 index = objectStore.createIndex('name', 'name', { unique: true }) | 12 index = objectStore.createIndex('name', 'name', { unique: true }) |
15 objectStoreData = [ | 13 objectStoreData = [ |
16 { ss: '237-23-7732', name: 'Bob' }, | 14 { ss: '237-23-7732', name: 'Bob' }, |
17 { ss: '237-23-7733', name: 'Ann' }, | 15 { ss: '237-23-7733', name: 'Ann' }, |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 cursor = event.target.result | 119 cursor = event.target.result |
122 | 120 |
123 checkMutatingCursorResults(): | 121 checkMutatingCursorResults(): |
124 PASS count is objectStoreData.length - 1 | 122 PASS count is objectStoreData.length - 1 |
125 PASS sawAdded is true | 123 PASS sawAdded is true |
126 PASS sawRemoved is false | 124 PASS sawRemoved is false |
127 PASS successfullyParsed is true | 125 PASS successfullyParsed is true |
128 | 126 |
129 TEST COMPLETE | 127 TEST COMPLETE |
130 | 128 |
OLD | NEW |