| OLD | NEW |
| 1 Test IndexedDB index population. | 1 Test IndexedDB index population. |
| 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 = "index-population.html" | 6 dbname = "index-population.html" |
| 9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
| 10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
| 11 transaction = event.target.transaction | 9 transaction = event.target.transaction |
| 12 store = db.createObjectStore('store1') | 10 store = db.createObjectStore('store1') |
| 13 store.put({data: 'a', indexKey: 10}, 1) | 11 store.put({data: 'a', indexKey: 10}, 1) |
| 14 store.put({data: 'b', indexKey: 20}, 2) | 12 store.put({data: 'b', indexKey: 20}, 2) |
| 15 store.put({data: 'c', indexKey: 10}, 3) | 13 store.put({data: 'c', indexKey: 10}, 3) |
| 16 store.put({data: 'd', indexKey: 20}, 4) | 14 store.put({data: 'd', indexKey: 20}, 4) |
| 17 index = store.createIndex('index1', 'indexKey') | 15 index = store.createIndex('index1', 'indexKey') |
| (...skipping 17 matching lines...) Expand all Loading... |
| 35 PASS index2 instanceof IDBIndex is true | 33 PASS index2 instanceof IDBIndex is true |
| 36 PASS index2.unique is true | 34 PASS index2.unique is true |
| 37 | 35 |
| 38 setVersion2Abort(): | 36 setVersion2Abort(): |
| 39 PASS db.objectStoreNames.length is 1 | 37 PASS db.objectStoreNames.length is 1 |
| 40 PASS db.objectStoreNames[0] is "store1" | 38 PASS db.objectStoreNames[0] is "store1" |
| 41 PASS successfullyParsed is true | 39 PASS successfullyParsed is true |
| 42 | 40 |
| 43 TEST COMPLETE | 41 TEST COMPLETE |
| 44 | 42 |
| OLD | NEW |