OLD | NEW |
1 Test IndexedDB's IDBCursor.continue() with a key parameter. | 1 Test IndexedDB's IDBCursor.continue() with a key parameter. |
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.html" | 8 dbname = "cursor-continue.html" |
9 indexedDB.deleteDatabase(dbname) | 9 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 10 indexedDB.open(dbname) |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 PASS event.target.result is null | 74 PASS event.target.result is null |
75 | 75 |
76 indexObject.openKeyCursor(null, 'next') | 76 indexObject.openKeyCursor(null, 'next') |
77 PASS event.target.result.primaryKey is 0 | 77 PASS event.target.result.primaryKey is 0 |
78 event.target.result.continue(3.14159) | 78 event.target.result.continue(3.14159) |
79 PASS event.target.result.primaryKey is 3 | 79 PASS event.target.result.primaryKey is 3 |
80 Expecting exception from event.target.result.continue(1) | 80 Expecting exception from event.target.result.continue(1) |
81 PASS Exception was thrown. | 81 PASS Exception was thrown. |
82 PASS code is 0 | 82 PASS code is 0 |
83 PASS ename is 'DataError' | 83 PASS ename is 'DataError' |
| 84 Exception message: The parameter is less than or equal to this cursor's position
. |
84 | 85 |
85 indexObject.openKeyCursor(null, 'next') | 86 indexObject.openKeyCursor(null, 'next') |
86 PASS event.target.result.primaryKey is 0 | 87 PASS event.target.result.primaryKey is 0 |
87 event.target.result.continue(3.14159) | 88 event.target.result.continue(3.14159) |
88 PASS event.target.result.primaryKey is 3 | 89 PASS event.target.result.primaryKey is 3 |
89 Expecting exception from event.target.result.continue(3.14159) | 90 Expecting exception from event.target.result.continue(3.14159) |
90 PASS Exception was thrown. | 91 PASS Exception was thrown. |
91 PASS code is 0 | 92 PASS code is 0 |
92 PASS ename is 'DataError' | 93 PASS ename is 'DataError' |
| 94 Exception message: The parameter is less than or equal to this cursor's position
. |
93 | 95 |
94 indexObject.openKeyCursor(null, 'prev') | 96 indexObject.openKeyCursor(null, 'prev') |
95 PASS event.target.result.primaryKey is 17 | 97 PASS event.target.result.primaryKey is 17 |
96 event.target.result.continue('A bit2') | 98 event.target.result.continue('A bit2') |
97 PASS event.target.result.primaryKey is 15 | 99 PASS event.target.result.primaryKey is 15 |
98 Expecting exception from event.target.result.continue('A bit3') | 100 Expecting exception from event.target.result.continue('A bit3') |
99 PASS Exception was thrown. | 101 PASS Exception was thrown. |
100 PASS code is 0 | 102 PASS code is 0 |
101 PASS ename is 'DataError' | 103 PASS ename is 'DataError' |
| 104 Exception message: The parameter is greater than or equal to this cursor's posit
ion. |
102 | 105 |
103 indexObject.openKeyCursor(null, 'prev') | 106 indexObject.openKeyCursor(null, 'prev') |
104 PASS event.target.result.primaryKey is 17 | 107 PASS event.target.result.primaryKey is 17 |
105 event.target.result.continue('A bit2') | 108 event.target.result.continue('A bit2') |
106 PASS event.target.result.primaryKey is 15 | 109 PASS event.target.result.primaryKey is 15 |
107 cursor = event.target.result | 110 cursor = event.target.result |
108 Expecting exception from event.target.result.continue('A bit2') | 111 Expecting exception from event.target.result.continue('A bit2') |
109 PASS Exception was thrown. | 112 PASS Exception was thrown. |
110 PASS code is 0 | 113 PASS code is 0 |
111 PASS ename is 'DataError' | 114 PASS ename is 'DataError' |
| 115 Exception message: The parameter is greater than or equal to this cursor's posit
ion. |
112 Expecting exception from cursor.continue() | 116 Expecting exception from cursor.continue() |
113 PASS Exception was thrown. | 117 PASS Exception was thrown. |
114 PASS code is 0 | 118 PASS code is 0 |
115 PASS ename is 'TransactionInactiveError' | 119 PASS ename is 'TransactionInactiveError' |
| 120 Exception message: The transaction has finished. |
116 PASS successfullyParsed is true | 121 PASS successfullyParsed is true |
117 | 122 |
118 TEST COMPLETE | 123 TEST COMPLETE |
119 | 124 |
OLD | NEW |