OLD | NEW |
1 Test that expected exceptions are thrown per IndexedDB spec. | 1 Test that expected exceptions are thrown per IndexedDB spec. |
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 = "exceptions.html" | 8 dbname = "exceptions.html" |
9 indexedDB.deleteDatabase(dbname) | 9 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 10 indexedDB.open(dbname) |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 The transaction this IDBObjectStore belongs to is not active. | 153 The transaction this IDBObjectStore belongs to is not active. |
154 Expecting exception from storeFromInactiveTransaction.add(0, 0) | 154 Expecting exception from storeFromInactiveTransaction.add(0, 0) |
155 PASS Exception was thrown. | 155 PASS Exception was thrown. |
156 PASS code is 0 | 156 PASS code is 0 |
157 PASS ename is 'TransactionInactiveError' | 157 PASS ename is 'TransactionInactiveError' |
158 Exception message: Failed to execute 'add' on 'IDBObjectStore': The transaction
has finished. | 158 Exception message: Failed to execute 'add' on 'IDBObjectStore': The transaction
has finished. |
159 The data being stored could not be cloned by the internal structured cloning alg
orithm. | 159 The data being stored could not be cloned by the internal structured cloning alg
orithm. |
160 Expecting exception from store.add(self, 0) | 160 Expecting exception from store.add(self, 0) |
161 PASS Exception was thrown. | 161 PASS Exception was thrown. |
162 PASS code is DOMException.DATA_CLONE_ERR | 162 PASS code is DOMException.DATA_CLONE_ERR |
163 Exception message: An object could not be cloned. | 163 Exception message: Failed to execute 'add' on 'IDBObjectStore': An object could
not be cloned. |
164 | 164 |
165 IDBObjectStore.clear() | 165 IDBObjectStore.clear() |
166 This method throws a DOMException of type ReadOnlyError if the transaction which
this IDBObjectStore belongs to is has its mode set to "readonly". | 166 This method throws a DOMException of type ReadOnlyError if the transaction which
this IDBObjectStore belongs to is has its mode set to "readonly". |
167 Expecting exception from storeFromReadOnlyTransaction.clear() | 167 Expecting exception from storeFromReadOnlyTransaction.clear() |
168 PASS Exception was thrown. | 168 PASS Exception was thrown. |
169 PASS code is 0 | 169 PASS code is 0 |
170 PASS ename is 'ReadOnlyError' | 170 PASS ename is 'ReadOnlyError' |
171 Exception message: A write operation was attempted in a read-only transaction. | 171 Exception message: A write operation was attempted in a read-only transaction. |
172 The transaction this IDBObjectStore belongs to is not active. | 172 The transaction this IDBObjectStore belongs to is not active. |
173 Expecting exception from storeFromInactiveTransaction.clear() | 173 Expecting exception from storeFromInactiveTransaction.clear() |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 The transaction this IDBObjectStore belongs to is not active. | 284 The transaction this IDBObjectStore belongs to is not active. |
285 Expecting exception from storeFromInactiveTransaction.put(0, 0) | 285 Expecting exception from storeFromInactiveTransaction.put(0, 0) |
286 PASS Exception was thrown. | 286 PASS Exception was thrown. |
287 PASS code is 0 | 287 PASS code is 0 |
288 PASS ename is 'TransactionInactiveError' | 288 PASS ename is 'TransactionInactiveError' |
289 Exception message: Failed to execute 'put' on 'IDBObjectStore': The transaction
has finished. | 289 Exception message: Failed to execute 'put' on 'IDBObjectStore': The transaction
has finished. |
290 The data being stored could not be cloned by the internal structured cloning alg
orithm. | 290 The data being stored could not be cloned by the internal structured cloning alg
orithm. |
291 Expecting exception from store.put(self, 0) | 291 Expecting exception from store.put(self, 0) |
292 PASS Exception was thrown. | 292 PASS Exception was thrown. |
293 PASS code is DOMException.DATA_CLONE_ERR | 293 PASS code is DOMException.DATA_CLONE_ERR |
294 Exception message: An object could not be cloned. | 294 Exception message: Failed to execute 'put' on 'IDBObjectStore': An object could
not be cloned. |
295 db.close() | 295 db.close() |
296 ro_transaction.oncomplete = transactionComplete | 296 ro_transaction.oncomplete = transactionComplete |
297 rw_transaction.oncomplete = transactionComplete | 297 rw_transaction.oncomplete = transactionComplete |
298 | 298 |
299 transactionComplete(): | 299 transactionComplete(): |
300 First transaction completed | 300 First transaction completed |
301 | 301 |
302 transactionComplete(): | 302 transactionComplete(): |
303 request = indexedDB.open(dbname, 3) | 303 request = indexedDB.open(dbname, 3) |
304 request.onupgradeneeded = onUpgradeNeeded3 | 304 request.onupgradeneeded = onUpgradeNeeded3 |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 If the effective object store of this cursor uses in-line keys and evaluating th
e key path of the value parameter results in a different value than the cursor's
effective key, this method throws a DOMException of type DataError. | 516 If the effective object store of this cursor uses in-line keys and evaluating th
e key path of the value parameter results in a different value than the cursor's
effective key, this method throws a DOMException of type DataError. |
517 Expecting exception from inlineCursor.update({id: 1}) | 517 Expecting exception from inlineCursor.update({id: 1}) |
518 PASS Exception was thrown. | 518 PASS Exception was thrown. |
519 PASS code is 0 | 519 PASS code is 0 |
520 PASS ename is 'DataError' | 520 PASS ename is 'DataError' |
521 Exception message: Failed to execute 'update' on 'IDBCursor': The effective obje
ct store of this cursor uses in-line keys and evaluating the key path of the val
ue parameter results in a different value than the cursor's effective key. | 521 Exception message: Failed to execute 'update' on 'IDBCursor': The effective obje
ct store of this cursor uses in-line keys and evaluating the key path of the val
ue parameter results in a different value than the cursor's effective key. |
522 If the structured clone algorithm throws an exception, that exception is rethrow
n. | 522 If the structured clone algorithm throws an exception, that exception is rethrow
n. |
523 Expecting exception from cursor.update(self) | 523 Expecting exception from cursor.update(self) |
524 PASS Exception was thrown. | 524 PASS Exception was thrown. |
525 PASS code is DOMException.DATA_CLONE_ERR | 525 PASS code is DOMException.DATA_CLONE_ERR |
526 Exception message: An object could not be cloned. | 526 Exception message: Failed to execute 'update' on 'IDBCursor': An object could no
t be cloned. |
527 The transaction this IDBCursor belongs to is not active. | 527 The transaction this IDBCursor belongs to is not active. |
528 Expecting exception from cursorFromInactiveTransaction.update({}) | 528 Expecting exception from cursorFromInactiveTransaction.update({}) |
529 PASS Exception was thrown. | 529 PASS Exception was thrown. |
530 PASS code is 0 | 530 PASS code is 0 |
531 PASS ename is 'TransactionInactiveError' | 531 PASS ename is 'TransactionInactiveError' |
532 Exception message: Failed to execute 'update' on 'IDBCursor': The transaction ha
s finished. | 532 Exception message: Failed to execute 'update' on 'IDBCursor': The transaction ha
s finished. |
533 readOnlyTransaction = db.transaction('store', 'readonly') | 533 readOnlyTransaction = db.transaction('store', 'readonly') |
534 request = readOnlyTransaction.objectStore('store').openCursor() | 534 request = readOnlyTransaction.objectStore('store').openCursor() |
535 cursorFromReadOnlyTransaction = request.result | 535 cursorFromReadOnlyTransaction = request.result |
536 | 536 |
(...skipping 25 matching lines...) Expand all Loading... |
562 If the requested object store is not in this transaction's scope. | 562 If the requested object store is not in this transaction's scope. |
563 Expecting exception from db.transaction('store').objectStore('otherStore') | 563 Expecting exception from db.transaction('store').objectStore('otherStore') |
564 PASS Exception was thrown. | 564 PASS Exception was thrown. |
565 PASS code is DOMException.NOT_FOUND_ERR | 565 PASS code is DOMException.NOT_FOUND_ERR |
566 PASS ename is 'NotFoundError' | 566 PASS ename is 'NotFoundError' |
567 Exception message: Failed to execute 'objectStore' on 'IDBTransaction': The spec
ified object store was not found. | 567 Exception message: Failed to execute 'objectStore' on 'IDBTransaction': The spec
ified object store was not found. |
568 PASS successfullyParsed is true | 568 PASS successfullyParsed is true |
569 | 569 |
570 TEST COMPLETE | 570 TEST COMPLETE |
571 | 571 |
OLD | NEW |