OLD | NEW |
1 Test that continue() calls against cursors are validated by direction. | 1 Test that continue() calls against cursors are validated by direction. |
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; | 6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; |
7 | 7 |
8 dbname = "cursor-continue-dir.html" | 8 dbname = "cursor-continue-dir.html" |
9 indexedDB.deleteDatabase(dbname) | 9 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 10 indexedDB.open(dbname) |
(...skipping 12 matching lines...) Expand all Loading... |
23 store = trans.objectStore('store') | 23 store = trans.objectStore('store') |
24 request = store.openCursor(IDBKeyRange.bound(-Infinity, Infinity), 'next') | 24 request = store.openCursor(IDBKeyRange.bound(-Infinity, Infinity), 'next') |
25 cursor = request.result | 25 cursor = request.result |
26 PASS cursor is non-null. | 26 PASS cursor is non-null. |
27 Expect DataError if: The parameter is less than or equal to this cursor's positi
on and this cursor's direction is "next" or "nextunique". | 27 Expect DataError if: The parameter is less than or equal to this cursor's positi
on and this cursor's direction is "next" or "nextunique". |
28 PASS cursor.key is 1 | 28 PASS cursor.key is 1 |
29 Expecting exception from cursor.continue(-1) | 29 Expecting exception from cursor.continue(-1) |
30 PASS Exception was thrown. | 30 PASS Exception was thrown. |
31 PASS code is 0 | 31 PASS code is 0 |
32 PASS ename is 'DataError' | 32 PASS ename is 'DataError' |
| 33 Exception message: The parameter is less than or equal to this cursor's position
. |
33 request = store.openCursor(IDBKeyRange.bound(-Infinity, Infinity), 'prev') | 34 request = store.openCursor(IDBKeyRange.bound(-Infinity, Infinity), 'prev') |
34 cursor = request.result | 35 cursor = request.result |
35 PASS cursor is non-null. | 36 PASS cursor is non-null. |
36 Expect DataError if: The parameter is greater than or equal to this cursor's pos
ition and this cursor's direction is "prev" or "prevunique". | 37 Expect DataError if: The parameter is greater than or equal to this cursor's pos
ition and this cursor's direction is "prev" or "prevunique". |
37 PASS cursor.key is 10 | 38 PASS cursor.key is 10 |
38 Expecting exception from cursor.continue(11) | 39 Expecting exception from cursor.continue(11) |
39 PASS Exception was thrown. | 40 PASS Exception was thrown. |
40 PASS code is 0 | 41 PASS code is 0 |
41 PASS ename is 'DataError' | 42 PASS ename is 'DataError' |
| 43 Exception message: The parameter is greater than or equal to this cursor's posit
ion. |
42 PASS successfullyParsed is true | 44 PASS successfullyParsed is true |
43 | 45 |
44 TEST COMPLETE | 46 TEST COMPLETE |
45 | 47 |
OLD | NEW |