OLD | NEW |
1 Test IndexedDB key types | 1 Test IndexedDB key types |
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 = "key-type-array.html" | 8 dbname = "key-type-array.html" |
9 indexedDB.deleteDatabase(dbname) | 9 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 10 indexedDB.open(dbname) |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 array that contains itself, not as first element: array = [1, 'b', [], array] | 163 array that contains itself, not as first element: array = [1, 'b', [], array] |
164 cyclic_array3 = [1, 'b', []]; cyclic_array3.push(cyclic_array3) | 164 cyclic_array3 = [1, 'b', []]; cyclic_array3.push(cyclic_array3) |
165 array that contains array that contains itself | 165 array that contains array that contains itself |
166 cyclic_array4 = [cyclic_array]; | 166 cyclic_array4 = [cyclic_array]; |
167 | 167 |
168 testing invalid array key: [ void 0 ] | 168 testing invalid array key: [ void 0 ] |
169 Expecting exception from store.put('value', [ void 0 ]); | 169 Expecting exception from store.put('value', [ void 0 ]); |
170 PASS Exception was thrown. | 170 PASS Exception was thrown. |
171 PASS code is 0 | 171 PASS code is 0 |
172 PASS ename is 'DataError' | 172 PASS ename is 'DataError' |
173 Exception message: The parameter is not a valid key. | 173 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. |
174 | 174 |
175 testing invalid array key: [ true ] | 175 testing invalid array key: [ true ] |
176 Expecting exception from store.put('value', [ true ]); | 176 Expecting exception from store.put('value', [ true ]); |
177 PASS Exception was thrown. | 177 PASS Exception was thrown. |
178 PASS code is 0 | 178 PASS code is 0 |
179 PASS ename is 'DataError' | 179 PASS ename is 'DataError' |
180 Exception message: The parameter is not a valid key. | 180 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. |
181 | 181 |
182 testing invalid array key: [ false ] | 182 testing invalid array key: [ false ] |
183 Expecting exception from store.put('value', [ false ]); | 183 Expecting exception from store.put('value', [ false ]); |
184 PASS Exception was thrown. | 184 PASS Exception was thrown. |
185 PASS code is 0 | 185 PASS code is 0 |
186 PASS ename is 'DataError' | 186 PASS ename is 'DataError' |
187 Exception message: The parameter is not a valid key. | 187 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. |
188 | 188 |
189 testing invalid array key: [ NaN ] | 189 testing invalid array key: [ NaN ] |
190 Expecting exception from store.put('value', [ NaN ]); | 190 Expecting exception from store.put('value', [ NaN ]); |
191 PASS Exception was thrown. | 191 PASS Exception was thrown. |
192 PASS code is 0 | 192 PASS code is 0 |
193 PASS ename is 'DataError' | 193 PASS ename is 'DataError' |
194 Exception message: The parameter is not a valid key. | 194 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. |
195 | 195 |
196 testing invalid array key: [ null ] | 196 testing invalid array key: [ null ] |
197 Expecting exception from store.put('value', [ null ]); | 197 Expecting exception from store.put('value', [ null ]); |
198 PASS Exception was thrown. | 198 PASS Exception was thrown. |
199 PASS code is 0 | 199 PASS code is 0 |
200 PASS ename is 'DataError' | 200 PASS ename is 'DataError' |
201 Exception message: The parameter is not a valid key. | 201 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. |
202 | 202 |
203 testing invalid array key: [ {} ] | 203 testing invalid array key: [ {} ] |
204 Expecting exception from store.put('value', [ {} ]); | 204 Expecting exception from store.put('value', [ {} ]); |
205 PASS Exception was thrown. | 205 PASS Exception was thrown. |
206 PASS code is 0 | 206 PASS code is 0 |
207 PASS ename is 'DataError' | 207 PASS ename is 'DataError' |
208 Exception message: The parameter is not a valid key. | 208 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. |
209 | 209 |
210 testing invalid array key: [ function () {} ] | 210 testing invalid array key: [ function () {} ] |
211 Expecting exception from store.put('value', [ function () {} ]); | 211 Expecting exception from store.put('value', [ function () {} ]); |
212 PASS Exception was thrown. | 212 PASS Exception was thrown. |
213 PASS code is 0 | 213 PASS code is 0 |
214 PASS ename is 'DataError' | 214 PASS ename is 'DataError' |
215 Exception message: The parameter is not a valid key. | 215 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. |
216 | 216 |
217 testing invalid array key: [ /regex/ ] | 217 testing invalid array key: [ /regex/ ] |
218 Expecting exception from store.put('value', [ /regex/ ]); | 218 Expecting exception from store.put('value', [ /regex/ ]); |
219 PASS Exception was thrown. | 219 PASS Exception was thrown. |
220 PASS code is 0 | 220 PASS code is 0 |
221 PASS ename is 'DataError' | 221 PASS ename is 'DataError' |
222 Exception message: The parameter is not a valid key. | 222 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. |
223 | 223 |
224 testing invalid array key: [ self ] | 224 testing invalid array key: [ self ] |
225 Expecting exception from store.put('value', [ self ]); | 225 Expecting exception from store.put('value', [ self ]); |
226 PASS Exception was thrown. | 226 PASS Exception was thrown. |
227 PASS code is 0 | 227 PASS code is 0 |
228 PASS ename is 'DataError' | 228 PASS ename is 'DataError' |
229 Exception message: The parameter is not a valid key. | 229 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. |
230 | 230 |
231 testing invalid array key: [ self.document ] | 231 testing invalid array key: [ self.document ] |
232 Expecting exception from store.put('value', [ self.document ]); | 232 Expecting exception from store.put('value', [ self.document ]); |
233 PASS Exception was thrown. | 233 PASS Exception was thrown. |
234 PASS code is 0 | 234 PASS code is 0 |
235 PASS ename is 'DataError' | 235 PASS ename is 'DataError' |
236 Exception message: The parameter is not a valid key. | 236 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. |
237 | 237 |
238 testing invalid array key: [ self.document.body ] | 238 testing invalid array key: [ self.document.body ] |
239 Expecting exception from store.put('value', [ self.document.body ]); | 239 Expecting exception from store.put('value', [ self.document.body ]); |
240 PASS Exception was thrown. | 240 PASS Exception was thrown. |
241 PASS code is 0 | 241 PASS code is 0 |
242 PASS ename is 'DataError' | 242 PASS ename is 'DataError' |
243 Exception message: The parameter is not a valid key. | 243 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. |
244 | 244 |
245 testing invalid array key: cyclic_array | 245 testing invalid array key: cyclic_array |
246 Expecting exception from store.put('value', cyclic_array); | 246 Expecting exception from store.put('value', cyclic_array); |
247 PASS Exception was thrown. | 247 PASS Exception was thrown. |
248 PASS code is 0 | 248 PASS code is 0 |
249 PASS ename is 'DataError' | 249 PASS ename is 'DataError' |
250 Exception message: The parameter is not a valid key. | 250 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. |
251 | 251 |
252 testing invalid array key: cyclic_array2 | 252 testing invalid array key: cyclic_array2 |
253 Expecting exception from store.put('value', cyclic_array2); | 253 Expecting exception from store.put('value', cyclic_array2); |
254 PASS Exception was thrown. | 254 PASS Exception was thrown. |
255 PASS code is 0 | 255 PASS code is 0 |
256 PASS ename is 'DataError' | 256 PASS ename is 'DataError' |
257 Exception message: The parameter is not a valid key. | 257 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. |
258 | 258 |
259 testing invalid array key: cyclic_array3 | 259 testing invalid array key: cyclic_array3 |
260 Expecting exception from store.put('value', cyclic_array3); | 260 Expecting exception from store.put('value', cyclic_array3); |
261 PASS Exception was thrown. | 261 PASS Exception was thrown. |
262 PASS code is 0 | 262 PASS code is 0 |
263 PASS ename is 'DataError' | 263 PASS ename is 'DataError' |
264 Exception message: The parameter is not a valid key. | 264 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. |
265 | 265 |
266 testing invalid array key: cyclic_array4 | 266 testing invalid array key: cyclic_array4 |
267 Expecting exception from store.put('value', cyclic_array4); | 267 Expecting exception from store.put('value', cyclic_array4); |
268 PASS Exception was thrown. | 268 PASS Exception was thrown. |
269 PASS code is 0 | 269 PASS code is 0 |
270 PASS ename is 'DataError' | 270 PASS ename is 'DataError' |
271 Exception message: The parameter is not a valid key. | 271 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. |
272 | 272 |
273 testing invalid array key: Array(1000) | 273 testing invalid array key: Array(1000) |
274 Expecting exception from store.put('value', Array(1000)); | 274 Expecting exception from store.put('value', Array(1000)); |
275 PASS Exception was thrown. | 275 PASS Exception was thrown. |
276 PASS code is 0 | 276 PASS code is 0 |
277 PASS ename is 'DataError' | 277 PASS ename is 'DataError' |
278 Exception message: The parameter is not a valid key. | 278 Exception message: Failed to execute 'put' on 'IDBObjectStore': The parameter is
not a valid key. |
279 | 279 |
280 PASS indexedDB.cmp(makeArrayOfDepth(25), 0) is 1 | 280 PASS indexedDB.cmp(makeArrayOfDepth(25), 0) is 1 |
281 PASS indexedDB.cmp(makeArrayOfDepth(250), 0) is 1 | 281 PASS indexedDB.cmp(makeArrayOfDepth(250), 0) is 1 |
282 Expecting exception from indexedDB.cmp(makeArrayOfDepth(2500), 0) | 282 Expecting exception from indexedDB.cmp(makeArrayOfDepth(2500), 0) |
283 PASS Exception was thrown. | 283 PASS Exception was thrown. |
284 PASS code is 0 | 284 PASS code is 0 |
285 PASS ename is 'DataError' | 285 PASS ename is 'DataError' |
286 Exception message: The parameter is not a valid key. | 286 Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not
a valid key. |
287 | 287 |
288 PASS successfullyParsed is true | 288 PASS successfullyParsed is true |
289 | 289 |
290 TEST COMPLETE | 290 TEST COMPLETE |
291 | 291 |
OLD | NEW |