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 dbname = "exceptions.html" | 6 dbname = "exceptions.html" |
7 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
8 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
9 store = db.createObjectStore('store') | 9 store = db.createObjectStore('store') |
10 index = store.createIndex('index', 'id') | 10 index = store.createIndex('index', 'id') |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 The transaction this IDBObjectStore belongs to is not active. | 155 The transaction this IDBObjectStore belongs to is not active. |
156 Expecting exception from storeFromInactiveTransaction.add(0, 0) | 156 Expecting exception from storeFromInactiveTransaction.add(0, 0) |
157 PASS Exception was thrown. | 157 PASS Exception was thrown. |
158 PASS code is 0 | 158 PASS code is 0 |
159 PASS ename is 'TransactionInactiveError' | 159 PASS ename is 'TransactionInactiveError' |
160 Exception message: Failed to execute 'add' on 'IDBObjectStore': The transaction
has finished. | 160 Exception message: Failed to execute 'add' on 'IDBObjectStore': The transaction
has finished. |
161 The data being stored could not be cloned by the internal structured cloning alg
orithm. | 161 The data being stored could not be cloned by the internal structured cloning alg
orithm. |
162 Expecting exception from store.add(self, 0) | 162 Expecting exception from store.add(self, 0) |
163 PASS Exception was thrown. | 163 PASS Exception was thrown. |
164 PASS code is DOMException.DATA_CLONE_ERR | 164 PASS code is DOMException.DATA_CLONE_ERR |
165 Exception message: Failed to execute 'add' on 'IDBObjectStore': An object could
not be cloned. | 165 Exception message: Failed to execute 'add' on 'IDBObjectStore': #<Window> could
not be cloned. |
166 | 166 |
167 IDBObjectStore.clear() | 167 IDBObjectStore.clear() |
168 This method throws a DOMException of type ReadOnlyError if the transaction which
this IDBObjectStore belongs to is has its mode set to "readonly". | 168 This method throws a DOMException of type ReadOnlyError if the transaction which
this IDBObjectStore belongs to is has its mode set to "readonly". |
169 Expecting exception from storeFromReadOnlyTransaction.clear() | 169 Expecting exception from storeFromReadOnlyTransaction.clear() |
170 PASS Exception was thrown. | 170 PASS Exception was thrown. |
171 PASS code is 0 | 171 PASS code is 0 |
172 PASS ename is 'ReadOnlyError' | 172 PASS ename is 'ReadOnlyError' |
173 Exception message: Failed to execute 'clear' on 'IDBObjectStore': The transactio
n is read-only. | 173 Exception message: Failed to execute 'clear' on 'IDBObjectStore': The transactio
n is read-only. |
174 The transaction this IDBObjectStore belongs to is not active. | 174 The transaction this IDBObjectStore belongs to is not active. |
175 Expecting exception from storeFromInactiveTransaction.clear() | 175 Expecting exception from storeFromInactiveTransaction.clear() |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 The transaction this IDBObjectStore belongs to is not active. | 314 The transaction this IDBObjectStore belongs to is not active. |
315 Expecting exception from storeFromInactiveTransaction.put(0, 0) | 315 Expecting exception from storeFromInactiveTransaction.put(0, 0) |
316 PASS Exception was thrown. | 316 PASS Exception was thrown. |
317 PASS code is 0 | 317 PASS code is 0 |
318 PASS ename is 'TransactionInactiveError' | 318 PASS ename is 'TransactionInactiveError' |
319 Exception message: Failed to execute 'put' on 'IDBObjectStore': The transaction
has finished. | 319 Exception message: Failed to execute 'put' on 'IDBObjectStore': The transaction
has finished. |
320 The data being stored could not be cloned by the internal structured cloning alg
orithm. | 320 The data being stored could not be cloned by the internal structured cloning alg
orithm. |
321 Expecting exception from store.put(self, 0) | 321 Expecting exception from store.put(self, 0) |
322 PASS Exception was thrown. | 322 PASS Exception was thrown. |
323 PASS code is DOMException.DATA_CLONE_ERR | 323 PASS code is DOMException.DATA_CLONE_ERR |
324 Exception message: Failed to execute 'put' on 'IDBObjectStore': An object could
not be cloned. | 324 Exception message: Failed to execute 'put' on 'IDBObjectStore': #<Window> could
not be cloned. |
325 db.close() | 325 db.close() |
326 ro_transaction.oncomplete = transactionComplete | 326 ro_transaction.oncomplete = transactionComplete |
327 rw_transaction.oncomplete = transactionComplete | 327 rw_transaction.oncomplete = transactionComplete |
328 | 328 |
329 transactionComplete(): | 329 transactionComplete(): |
330 First transaction completed | 330 First transaction completed |
331 | 331 |
332 transactionComplete(): | 332 transactionComplete(): |
333 request = indexedDB.open(dbname, 3) | 333 request = indexedDB.open(dbname, 3) |
334 request.onupgradeneeded = onUpgradeNeeded3 | 334 request.onupgradeneeded = onUpgradeNeeded3 |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 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. | 574 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. |
575 Expecting exception from inlineCursor.update({id: 1}) | 575 Expecting exception from inlineCursor.update({id: 1}) |
576 PASS Exception was thrown. | 576 PASS Exception was thrown. |
577 PASS code is 0 | 577 PASS code is 0 |
578 PASS ename is 'DataError' | 578 PASS ename is 'DataError' |
579 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. | 579 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. |
580 If the structured clone algorithm throws an exception, that exception is rethrow
n. | 580 If the structured clone algorithm throws an exception, that exception is rethrow
n. |
581 Expecting exception from cursor.update(self) | 581 Expecting exception from cursor.update(self) |
582 PASS Exception was thrown. | 582 PASS Exception was thrown. |
583 PASS code is DOMException.DATA_CLONE_ERR | 583 PASS code is DOMException.DATA_CLONE_ERR |
584 Exception message: Failed to execute 'update' on 'IDBCursor': An object could no
t be cloned. | 584 Exception message: Failed to execute 'update' on 'IDBCursor': #<Window> could no
t be cloned. |
585 The transaction this IDBCursor belongs to is not active. | 585 The transaction this IDBCursor belongs to is not active. |
586 Expecting exception from cursorFromInactiveTransaction.update({}) | 586 Expecting exception from cursorFromInactiveTransaction.update({}) |
587 PASS Exception was thrown. | 587 PASS Exception was thrown. |
588 PASS code is 0 | 588 PASS code is 0 |
589 PASS ename is 'TransactionInactiveError' | 589 PASS ename is 'TransactionInactiveError' |
590 Exception message: Failed to execute 'update' on 'IDBCursor': The transaction ha
s finished. | 590 Exception message: Failed to execute 'update' on 'IDBCursor': The transaction ha
s finished. |
591 readOnlyTransaction = db.transaction('store', 'readonly') | 591 readOnlyTransaction = db.transaction('store', 'readonly') |
592 request = readOnlyTransaction.objectStore('store').openCursor() | 592 request = readOnlyTransaction.objectStore('store').openCursor() |
593 cursorFromReadOnlyTransaction = request.result | 593 cursorFromReadOnlyTransaction = request.result |
594 | 594 |
(...skipping 25 matching lines...) Expand all Loading... |
620 If the requested object store is not in this transaction's scope. | 620 If the requested object store is not in this transaction's scope. |
621 Expecting exception from db.transaction('store').objectStore('otherStore') | 621 Expecting exception from db.transaction('store').objectStore('otherStore') |
622 PASS Exception was thrown. | 622 PASS Exception was thrown. |
623 PASS code is DOMException.NOT_FOUND_ERR | 623 PASS code is DOMException.NOT_FOUND_ERR |
624 PASS ename is 'NotFoundError' | 624 PASS ename is 'NotFoundError' |
625 Exception message: Failed to execute 'objectStore' on 'IDBTransaction': The spec
ified object store was not found. | 625 Exception message: Failed to execute 'objectStore' on 'IDBTransaction': The spec
ified object store was not found. |
626 PASS successfullyParsed is true | 626 PASS successfullyParsed is true |
627 | 627 |
628 TEST COMPLETE | 628 TEST COMPLETE |
629 | 629 |
OLD | NEW |