1 Test that continue() calls against cursors are validated by direction.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 dbname = "cursor-continue-dir.html"
7 indexedDB.deleteDatabase(dbname)
9 store = db.createObjectStore('store')
20 trans = db.transaction('store')
21 store = trans.objectStore('store')
22 request = store.openCursor(IDBKeyRange.bound(-Infinity, Infinity), 'next')
23 cursor = request.result
24 PASS cursor is non-null.
25 Expect DataError if: The parameter is less than or equal to this cursor's position and this cursor's direction is "next" or "nextunique".
27 Expecting exception from cursor.continue(-1)
28 PASS Exception was thrown.
30 PASS ename is 'DataError'
31 Exception message: Failed to execute 'continue' on 'IDBCursor': The parameter is less than or equal to this cursor's position.
32 request = store.openCursor(IDBKeyRange.bound(-Infinity, Infinity), 'prev')
33 cursor = request.result
34 PASS cursor is non-null.
35 Expect DataError if: The parameter is greater than or equal to this cursor's position and this cursor's direction is "prev" or "prevunique".
37 Expecting exception from cursor.continue(11)
38 PASS Exception was thrown.
40 PASS ename is 'DataError'
41 Exception message: Failed to execute 'continue' on 'IDBCursor': The parameter is greater than or equal to this cursor's position.
42 PASS successfullyParsed is true