OLD | NEW |
1 Test IndexedDB's cursor mutation during object store cursor iteration | 1 Test IndexedDB's cursor mutation during object store cursor iteration |
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-objectstore-only.html" | 6 dbname = "cursor-mutation-objectstore-only.html" |
9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
11 objectStore = db.createObjectStore('foo', { keyPath: 'ss' }); | 9 objectStore = db.createObjectStore('foo', { keyPath: 'ss' }); |
12 objectStoreData = [ | 10 objectStoreData = [ |
13 { ss: '237-23-7732', name: 'Bob' }, | 11 { ss: '237-23-7732', name: 'Bob' }, |
14 { ss: '237-23-7733', name: 'Ann' }, | 12 { ss: '237-23-7733', name: 'Ann' }, |
15 { ss: '237-23-7734', name: 'Ron' }, | 13 { ss: '237-23-7734', name: 'Ron' }, |
16 { ss: '237-23-7735', name: 'Sue' }, | 14 { ss: '237-23-7735', name: 'Sue' }, |
17 { ss: '237-23-7736', name: 'Joe' }, | 15 { ss: '237-23-7736', name: 'Joe' }, |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 event.target.transaction.oncomplete = checkMutatingCursorResults; | 101 event.target.transaction.oncomplete = checkMutatingCursorResults; |
104 cursor = event.target.result; | 102 cursor = event.target.result; |
105 checkMutatingCursorResults(): | 103 checkMutatingCursorResults(): |
106 PASS count is objectStoreData.length | 104 PASS count is objectStoreData.length |
107 PASS sawAdded is true | 105 PASS sawAdded is true |
108 PASS sawRemoved is true | 106 PASS sawRemoved is true |
109 PASS successfullyParsed is true | 107 PASS successfullyParsed is true |
110 | 108 |
111 TEST COMPLETE | 109 TEST COMPLETE |
112 | 110 |
OLD | NEW |