OLD | NEW |
1 Test IndexedDB key comparison | 1 Test IndexedDB key comparison |
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 = "key-sort-order-date.html" | 6 dbname = "key-sort-order-date.html" |
9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
11 db.createObjectStore('foo'); | 9 db.createObjectStore('foo'); |
12 date1 = new Date(1000); | 10 date1 = new Date(1000); |
13 request = objectStore.add([], date1); | 11 request = objectStore.add([], date1); |
14 date0 = new Date(0); | 12 date0 = new Date(0); |
15 request = objectStore.add([], date0); | 13 request = objectStore.add([], date0); |
16 date3 = new Date(3000); | 14 date3 = new Date(3000); |
17 request = objectStore.add([], date3); | 15 request = objectStore.add([], date3); |
(...skipping 15 matching lines...) Expand all Loading... |
33 keyIndex++; | 31 keyIndex++; |
34 cursor = event.target.result; | 32 cursor = event.target.result; |
35 PASS cursor.key.toString() is sortedKeys[keyIndex] | 33 PASS cursor.key.toString() is sortedKeys[keyIndex] |
36 cursor.continue(); | 34 cursor.continue(); |
37 keyIndex++; | 35 keyIndex++; |
38 cursor = event.target.result; | 36 cursor = event.target.result; |
39 PASS successfullyParsed is true | 37 PASS successfullyParsed is true |
40 | 38 |
41 TEST COMPLETE | 39 TEST COMPLETE |
42 | 40 |
OLD | NEW |