summaryrefslogtreecommitdiffstats
path: root/LayoutTests/storage/indexeddb/cursor-delete-expected.txt
blob: edda6206ead96befcfee56f8ddaecc2b2f156b60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Test IndexedDB's openCursor.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


webkitIndexedDB.open('cursor-delete')
db = event.target.result
db.setVersion('new version')
setVersionSuccess():
trans = event.target.result
PASS trans !== null is true
Deleted all object stores.
objectStore = db.createObjectStore('test')
objectStore.add('myValue1', 'myKey1')
objectStore.add('myValue2', 'myKey2')
objectStore.add('myValue3', 'myKey3')
objectStore.add('myValue4', 'myKey4')
openCursor1
trans = db.transaction(['test'], webkitIDBTransaction.READ_WRITE)
trans.objectStore('test').openCursor({range: keyRange})
event.target.result.delete()
PASS event.target.result.value is "myValue1"
event.target.result.continue()
event.target.result.delete()
PASS event.target.result.value is "myValue2"
event.target.result.continue()
event.target.result.delete()
PASS event.target.result.value is "myValue3"
event.target.result.continue()
event.target.result.delete()
PASS event.target.result.value is "myValue4"
event.target.result.continue()
PASS counter is 5
trans.objectStore('test').openCursor(keyRange)
PASS event.target.result is null
trans = db.transaction(['test'], webkitIDBTransaction.READ_WRITE)
objectStore = trans.objectStore('test')
objectStore.add('myValue1', 'myKey1')
openCursor2
objectStore.openCursor(keyRange)
PASS [object IDBCursorWithValue] is non-null.
event.target.result.delete()
objectStore.get('myKey1')
PASS event.target.result is undefined
PASS successfullyParsed is true

TEST COMPLETE