OLD | NEW |
1 Test IndexedDB's readonly transactions | 1 Test IndexedDB's readonly transactions |
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 = "readonly-transactions.html" | 6 dbname = "readonly-transactions.html" |
9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
11 objectStore = db.createObjectStore(osName, { autoIncrement: true }); | 9 objectStore = db.createObjectStore(osName, { autoIncrement: true }); |
12 Expecting exception from db.transaction([osName]).objectStore(osName).add({}); | 10 Expecting exception from db.transaction([osName]).objectStore(osName).add({}); |
13 PASS Exception was thrown. | 11 PASS Exception was thrown. |
14 PASS code is 0 | 12 PASS code is 0 |
15 PASS ename is 'ReadOnlyError' | 13 PASS ename is 'ReadOnlyError' |
16 Exception message: Failed to execute 'add' on 'IDBObjectStore': The transaction
is read-only. | 14 Exception message: Failed to execute 'add' on 'IDBObjectStore': The transaction
is read-only. |
17 Expecting exception from db.transaction(osName).objectStore(osName).add({}); | 15 Expecting exception from db.transaction(osName).objectStore(osName).add({}); |
(...skipping 30 matching lines...) Expand all Loading... |
48 Exception message: Failed to execute 'delete' on 'IDBObjectStore': The transacti
on is read-only. | 46 Exception message: Failed to execute 'delete' on 'IDBObjectStore': The transacti
on is read-only. |
49 Expecting exception from db.transaction(osName).objectStore(osName).delete(key2)
; | 47 Expecting exception from db.transaction(osName).objectStore(osName).delete(key2)
; |
50 PASS Exception was thrown. | 48 PASS Exception was thrown. |
51 PASS code is 0 | 49 PASS code is 0 |
52 PASS ename is 'ReadOnlyError' | 50 PASS ename is 'ReadOnlyError' |
53 Exception message: Failed to execute 'delete' on 'IDBObjectStore': The transacti
on is read-only. | 51 Exception message: Failed to execute 'delete' on 'IDBObjectStore': The transacti
on is read-only. |
54 PASS successfullyParsed is true | 52 PASS successfullyParsed is true |
55 | 53 |
56 TEST COMPLETE | 54 TEST COMPLETE |
57 | 55 |
OLD | NEW |