OLD | NEW |
1 Test lazy IndexedDB index population with various key types. | 1 Test lazy IndexedDB index population with various key types. |
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 = "lazy-index-types.html" | 6 dbname = "lazy-index-types.html" |
9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname, 1) | 8 indexedDB.open(dbname, 1) |
11 | 9 |
12 onUpgradeNeeded(): | 10 onUpgradeNeeded(): |
13 db = event.target.result | 11 db = event.target.result |
14 store = db.createObjectStore('store', {autoIncrement: true}) | 12 store = db.createObjectStore('store', {autoIncrement: true}) |
15 index = store.createIndex('greedy-index', 'id') | 13 index = store.createIndex('greedy-index', 'id') |
16 store.put({id: 0}) | 14 store.put({id: 0}) |
17 store.put({id: new Date(0)}) | 15 store.put({id: new Date(0)}) |
(...skipping 29 matching lines...) Expand all Loading... |
47 PASS event.target.result is expectedIndexSize | 45 PASS event.target.result is expectedIndexSize |
48 gotLazyCount = true | 46 gotLazyCount = true |
49 | 47 |
50 onComplete(): | 48 onComplete(): |
51 PASS gotGreedyCount is true | 49 PASS gotGreedyCount is true |
52 PASS gotLazyCount is true | 50 PASS gotLazyCount is true |
53 PASS successfullyParsed is true | 51 PASS successfullyParsed is true |
54 | 52 |
55 TEST COMPLETE | 53 TEST COMPLETE |
56 | 54 |
OLD | NEW |