1 Test consistency of IndexedDB's cursor objects.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 dbname = "cursor-inconsistency.html"
7 indexedDB.deleteDatabase(dbname)
10 trans = event.target.transaction
11 PASS trans is non-null.
12 objectStore = db.createObjectStore('basicStore')
13 objectStore.add('someValue1', 'someKey1').onerror = unexpectedErrorCallback
14 objectStore.add('someValue2', 'someKey2').onerror = unexpectedErrorCallback
15 objectStore.add('someValue3', 'someKey3').onerror = unexpectedErrorCallback
16 objectStore.add('someValue4', 'someKey4').onerror = unexpectedErrorCallback
18 trans = db.transaction(['basicStore'], 'readwrite')
19 trans.objectStore('basicStore')
20 objectStore.openCursor(keyRange)
23 storedCursor = event.target.result
24 PASS storedCursor is event.target.result
25 PASS storedCursor.key is "someKey1"
26 PASS event.target.result.key is "someKey1"
27 PASS storedCursor.value is "someValue1"
28 PASS event.target.result.value is "someValue1"
29 event.target.result.continue()
32 PASS storedCursor is event.target.result
33 PASS storedCursor.key is "someKey2"
34 PASS event.target.result.key is "someKey2"
35 PASS storedCursor.value is "someValue2"
36 PASS event.target.result.value is "someValue2"
37 event.target.result.continue()
40 PASS storedCursor is event.target.result
41 PASS storedCursor.key is "someKey3"
42 PASS event.target.result.key is "someKey3"
43 PASS storedCursor.value is "someValue3"
44 PASS event.target.result.value is "someValue3"
45 event.target.result.continue()
48 PASS storedCursor is event.target.result
49 PASS storedCursor.key is "someKey4"
50 PASS event.target.result.key is "someKey4"
51 PASS storedCursor.value is "someValue4"
52 PASS event.target.result.value is "someValue4"
53 event.target.result.continue()
58 PASS successfullyParsed is true