OLD | NEW |
1 CONSOLE MESSAGE: line 73: Uncaught Error: This should *NOT* be caught! | 1 CONSOLE MESSAGE: line 78: Uncaught Error: This should *NOT* be caught! |
2 Test IDBTransaction.error cases. | 2 Test IDBTransaction.error cases. |
3 | 3 |
4 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 4 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
5 | 5 |
6 | 6 |
7 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; | 7 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; |
8 | 8 |
9 dbname = "transaction-error.html" | 9 dbname = "transaction-error.html" |
10 indexedDB.deleteDatabase(dbname) | 10 indexedDB.deleteDatabase(dbname) |
11 indexedDB.open(dbname) | 11 indexedDB.open(dbname) |
12 store = db.createObjectStore('storeName') | 12 store = db.createObjectStore('storeName') |
13 store.add('value', 'key') | 13 store.add('value', 'key') |
14 | 14 |
15 trans = db.transaction('storeName') | 15 trans = db.transaction('storeName') |
16 | 16 |
17 IDBTransaction.error should be null if transaction is not finished: | 17 IDBTransaction.error should be null if transaction is not finished: |
18 PASS trans.error is null | 18 PASS trans.error is null |
19 | 19 |
| 20 transaction() should throw if one of the DOMStringList items cannot be converted
to a String: |
| 21 PASS db.transaction(['storeName', nonConvertibleToString]) threw exception Excep
tion in toString(). |
| 22 |
20 If IDBTransaction.abort() is explicitly called, IDBTransaction.error should be n
ull: | 23 If IDBTransaction.abort() is explicitly called, IDBTransaction.error should be n
ull: |
21 trans.abort() | 24 trans.abort() |
22 PASS trans.error is null | 25 PASS trans.error is null |
23 | 26 |
24 If the transaction is aborted due to a request error that is not prevented, IDBT
ransaction.error should match: | 27 If the transaction is aborted due to a request error that is not prevented, IDBT
ransaction.error should match: |
25 trans = db.transaction('storeName', 'readwrite') | 28 trans = db.transaction('storeName', 'readwrite') |
26 request = trans.objectStore('storeName').add('value2', 'key') | 29 request = trans.objectStore('storeName').add('value2', 'key') |
27 PASS request.error.name is 'ConstraintError' | 30 PASS request.error.name is 'ConstraintError' |
28 request_error = request.error | 31 request_error = request.error |
29 Transaction received abort event. | 32 Transaction received abort event. |
(...skipping 27 matching lines...) Expand all Loading... |
57 PASS trans.error.name is 'ConstraintError' | 60 PASS trans.error.name is 'ConstraintError' |
58 trans.error.message = Unable to add key to index 'Also test utf8: 漢': at least o
ne key does not satisfy the uniqueness requirements. | 61 trans.error.message = Unable to add key to index 'Also test utf8: 漢': at least o
ne key does not satisfy the uniqueness requirements. |
59 PASS trans.error.message is non-null. | 62 PASS trans.error.message is non-null. |
60 Note: This fails because of http://wkb.ug/37327 | 63 Note: This fails because of http://wkb.ug/37327 |
61 PASS trans.error.message.indexOf(indexName) is not -1 | 64 PASS trans.error.message.indexOf(indexName) is not -1 |
62 | 65 |
63 PASS successfullyParsed is true | 66 PASS successfullyParsed is true |
64 | 67 |
65 TEST COMPLETE | 68 TEST COMPLETE |
66 | 69 |
OLD | NEW |