| OLD | NEW |
| 1 Test IndexedDB's objectStore.openKeyCursor + the cursor it produces in depth. | 1 Test IndexedDB's objectStore.openKeyCursor + the cursor it produces in depth. |
| 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 = "objectstore-keycursor.html" | 8 dbname = "objectstore-keycursor.html" |
| 9 indexedDB.deleteDatabase(dbname) | 9 indexedDB.deleteDatabase(dbname) |
| 10 indexedDB.open(dbname) | 10 indexedDB.open(dbname) |
| 11 objectStore = db.createObjectStore('someObjectStore') | 11 objectStore = db.createObjectStore('someObjectStore') |
| 12 | 12 |
| 13 Verify that specifying an invalid direction raises an exception: | 13 Verify that specifying an invalid direction raises an exception: |
| 14 Expecting TypeError exception from objectStore.openKeyCursor(0, 'invalid-directi
on') | 14 Expecting TypeError exception from objectStore.openKeyCursor(0, 'invalid-directi
on') |
| 15 PASS Exception was thrown. | 15 PASS Exception was thrown. |
| 16 PASS objectStore.openKeyCursor(0, 'invalid-direction') threw TypeError: Type err
or | 16 PASS objectStore.openKeyCursor(0, 'invalid-direction') threw TypeError: Failed t
o execute 'openKeyCursor' on 'IDBObjectStore': The direction provided ('invalid-
direction') is not one of 'next', 'nextunique', 'prev', or 'prevunique'. |
| 17 | 17 |
| 18 objectStore.add('', testData[nextToAdd]) | 18 objectStore.add('', testData[nextToAdd]) |
| 19 objectStore.add('', testData[nextToAdd]) | 19 objectStore.add('', testData[nextToAdd]) |
| 20 objectStore.add('', testData[nextToAdd]) | 20 objectStore.add('', testData[nextToAdd]) |
| 21 objectStore.add('', testData[nextToAdd]) | 21 objectStore.add('', testData[nextToAdd]) |
| 22 objectStore.add('', testData[nextToAdd]) | 22 objectStore.add('', testData[nextToAdd]) |
| 23 objectStore.add('', testData[nextToAdd]) | 23 objectStore.add('', testData[nextToAdd]) |
| 24 Scheduling tests... | 24 Scheduling tests... |
| 25 Running tests... | 25 Running tests... |
| 26 | 26 |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 PASS event.target.result.key is testData[4] | 326 PASS event.target.result.key is testData[4] |
| 327 PASS event.target.result.key is testData[3] | 327 PASS event.target.result.key is testData[3] |
| 328 PASS event.target.result.key is testData[2] | 328 PASS event.target.result.key is testData[2] |
| 329 PASS event.target.result.key is testData[1] | 329 PASS event.target.result.key is testData[1] |
| 330 PASS event.target.result.key is testData[0] | 330 PASS event.target.result.key is testData[0] |
| 331 PASS event.target.result is null | 331 PASS event.target.result is null |
| 332 PASS successfullyParsed is true | 332 PASS successfullyParsed is true |
| 333 | 333 |
| 334 TEST COMPLETE | 334 TEST COMPLETE |
| 335 | 335 |
| OLD | NEW |