OLD | NEW |
1 Regression test for IDBRequest issue calling continue on a cursor then aborting. | 1 Regression test for IDBRequest issue calling continue on a cursor then aborting. |
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; | |
7 | |
8 dbname = "request-continue-abort.html" | 6 dbname = "request-continue-abort.html" |
9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
11 db.createObjectStore('store') | 9 db.createObjectStore('store') |
12 | 10 |
13 testCursor: | 11 testCursor: |
14 transaction = db.transaction('store', 'readwrite') | 12 transaction = db.transaction('store', 'readwrite') |
15 store = transaction.objectStore('store') | 13 store = transaction.objectStore('store') |
16 store.add('value1', 'key1') | 14 store.add('value1', 'key1') |
17 store.add('value2', 'key2') | 15 store.add('value2', 'key2') |
18 | 16 |
19 state = 0 | 17 state = 0 |
20 request = store.openCursor() | 18 request = store.openCursor() |
21 | 19 |
22 'success' event fired at request. | 20 'success' event fired at request. |
23 PASS ++state is 1 | 21 PASS ++state is 1 |
24 request.result.continue() | 22 request.result.continue() |
25 | 23 |
26 'error' event fired at request. | 24 'error' event fired at request. |
27 PASS ++state is 2 | 25 PASS ++state is 2 |
28 | 26 |
29 'abort' event fired at transaction. | 27 'abort' event fired at transaction. |
30 PASS ++state is 3 | 28 PASS ++state is 3 |
31 PASS successfullyParsed is true | 29 PASS successfullyParsed is true |
32 | 30 |
33 TEST COMPLETE | 31 TEST COMPLETE |
34 | 32 |
OLD | NEW |