1 Test IndexedDB's cursor skips deleted entries.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 dbname = "cursor-skip-deleted.html"
7 indexedDB.deleteDatabase(dbname)
10 trans = event.target.transaction
11 PASS trans is non-null.
12 objectStore = db.createObjectStore('store', {keyPath: 'id'})
13 objectStore.createIndex('nameIndex', 'name')
18 trans = db.transaction(['store'], 'readwrite')
21 trans.objectStore('store').openCursor(IDBKeyRange.lowerBound(0))
24 request = trans.objectStore('store').delete(0)
26 request = trans.objectStore('store').delete(25)
28 request = trans.objectStore('store').delete(5)
29 request = trans.objectStore('store').delete(6)
30 request = trans.objectStore('store').delete(7)
35 request = trans.objectStore('store').delete(10)
38 request = trans.objectStore('store').delete(13)
41 request = trans.objectStore('store').delete(14)
47 request = trans.objectStore('store').delete(17)
48 request = trans.objectStore('store').delete(18)
60 trans.objectStore('store').openCursor(IDBKeyRange.lowerBound(0), 'prev')
63 request = trans.objectStore('store').delete(25)
65 request = trans.objectStore('store').delete(0)
67 request = trans.objectStore('store').delete(20)
68 request = trans.objectStore('store').delete(19)
69 request = trans.objectStore('store').delete(18)
74 request = trans.objectStore('store').delete(15)
77 request = trans.objectStore('store').delete(12)
80 request = trans.objectStore('store').delete(11)
86 request = trans.objectStore('store').delete(7)
87 request = trans.objectStore('store').delete(8)
99 trans.objectStore('store').index('nameIndex').openCursor(IDBKeyRange.lowerBound('Alpha'))
102 request = trans.objectStore('store').delete(0)
104 request = trans.objectStore('store').delete(25)
106 request = trans.objectStore('store').delete(5)
107 request = trans.objectStore('store').delete(6)
108 request = trans.objectStore('store').delete(7)
113 request = trans.objectStore('store').delete(10)
116 request = trans.objectStore('store').delete(13)
119 request = trans.objectStore('store').delete(14)
125 request = trans.objectStore('store').delete(17)
126 request = trans.objectStore('store').delete(18)
132 transactionComplete():
133 PASS successfullyParsed is true