OLD | NEW |
1 Test IndexedDB's IDBObjectStore.delete(IDBKeyRange) method. | 1 Test IndexedDB's IDBObjectStore.delete(IDBKeyRange) method. |
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 = "delete-range.html" | 6 dbname = "delete-range.html" |
9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
11 db.createObjectStore('store') | 9 db.createObjectStore('store') |
12 | 10 |
13 trans = db.transaction('store', 'readwrite') | 11 trans = db.transaction('store', 'readwrite') |
14 store = trans.objectStore('store') | 12 store = trans.objectStore('store') |
15 store.put(1,1) | 13 store.put(1,1) |
16 store.put(2,2) | 14 store.put(2,2) |
17 store.put(3,3) | 15 store.put(3,3) |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 store.put(10,10) | 76 store.put(10,10) |
79 store.delete(IDBKeyRange.bound(3, 8, true, true)) | 77 store.delete(IDBKeyRange.bound(3, 8, true, true)) |
80 getting keys from store... | 78 getting keys from store... |
81 expect: [1,2,3,8,9,10] | 79 expect: [1,2,3,8,9,10] |
82 actual: [1,2,3,8,9,10] | 80 actual: [1,2,3,8,9,10] |
83 PASS Match! | 81 PASS Match! |
84 PASS successfullyParsed is true | 82 PASS successfullyParsed is true |
85 | 83 |
86 TEST COMPLETE | 84 TEST COMPLETE |
87 | 85 |
OLD | NEW |