| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 Exception message: Failed to execute 'transaction' on 'IDBDatabase': A version c
hange transaction is running. | 99 Exception message: Failed to execute 'transaction' on 'IDBDatabase': A version c
hange transaction is running. |
| 100 One of the names provided in the storeNames argument doesn't exist in this datab
ase. | 100 One of the names provided in the storeNames argument doesn't exist in this datab
ase. |
| 101 Expecting exception from db.transaction('no-such-store') | 101 Expecting exception from db.transaction('no-such-store') |
| 102 PASS Exception was thrown. | 102 PASS Exception was thrown. |
| 103 PASS code is DOMException.NOT_FOUND_ERR | 103 PASS code is DOMException.NOT_FOUND_ERR |
| 104 PASS ename is 'NotFoundError' | 104 PASS ename is 'NotFoundError' |
| 105 Exception message: Failed to execute 'transaction' on 'IDBDatabase': One of the
specified object stores was not found. | 105 Exception message: Failed to execute 'transaction' on 'IDBDatabase': One of the
specified object stores was not found. |
| 106 The value for the mode parameter is invalid. | 106 The value for the mode parameter is invalid. |
| 107 Expecting TypeError exception from db.transaction('store', 'invalid-mode') | 107 Expecting TypeError exception from db.transaction('store', 'invalid-mode') |
| 108 PASS Exception was thrown. | 108 PASS Exception was thrown. |
| 109 PASS db.transaction('store', 'invalid-mode') threw TypeError: Type error | 109 PASS db.transaction('store', 'invalid-mode') threw TypeError: Failed to execute
'transaction' on 'IDBDatabase': The mode provided ('invalid-mode') is not one of
'readonly' or 'readwrite'. |
| 110 The function was called with an empty list of store names | 110 The function was called with an empty list of store names |
| 111 Expecting exception from db.transaction([]) | 111 Expecting exception from db.transaction([]) |
| 112 PASS Exception was thrown. | 112 PASS Exception was thrown. |
| 113 PASS code is DOMException.INVALID_ACCESS_ERR | 113 PASS code is DOMException.INVALID_ACCESS_ERR |
| 114 PASS ename is 'InvalidAccessError' | 114 PASS ename is 'InvalidAccessError' |
| 115 Exception message: Failed to execute 'transaction' on 'IDBDatabase': The storeNa
mes parameter was empty. | 115 Exception message: Failed to execute 'transaction' on 'IDBDatabase': The storeNa
mes parameter was empty. |
| 116 | 116 |
| 117 One more IDBDatabase.createObjectStore() test: | 117 One more IDBDatabase.createObjectStore() test: |
| 118 If this function is called from outside a "versionchange" transaction callback .
.. the implementation must throw a DOMException of type InvalidStateError. | 118 If this function is called from outside a "versionchange" transaction callback .
.. the implementation must throw a DOMException of type InvalidStateError. |
| 119 Expecting exception from db.createObjectStore('fail') | 119 Expecting exception from db.createObjectStore('fail') |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The param
eter is not a valid key. | 247 Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The param
eter is not a valid key. |
| 248 The transaction this IDBObjectStore belongs to is not active. | 248 The transaction this IDBObjectStore belongs to is not active. |
| 249 Expecting exception from storeFromInactiveTransaction.openCursor() | 249 Expecting exception from storeFromInactiveTransaction.openCursor() |
| 250 PASS Exception was thrown. | 250 PASS Exception was thrown. |
| 251 PASS code is 0 | 251 PASS code is 0 |
| 252 PASS ename is 'TransactionInactiveError' | 252 PASS ename is 'TransactionInactiveError' |
| 253 Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The trans
action has finished. | 253 Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The trans
action has finished. |
| 254 The value for the direction parameter is invalid. | 254 The value for the direction parameter is invalid. |
| 255 Expecting TypeError exception from store.openCursor(0, 'invalid-direction') | 255 Expecting TypeError exception from store.openCursor(0, 'invalid-direction') |
| 256 PASS Exception was thrown. | 256 PASS Exception was thrown. |
| 257 PASS store.openCursor(0, 'invalid-direction') threw TypeError: Type error | 257 PASS store.openCursor(0, 'invalid-direction') threw TypeError: Failed to execute
'openCursor' on 'IDBObjectStore': The direction provided ('invalid-direction')
is not one of 'next', 'nextunique', 'prev', or 'prevunique'. |
| 258 | 258 |
| 259 IDBObjectStore.openKeyCursor() | 259 IDBObjectStore.openKeyCursor() |
| 260 If the range parameter is specified but is not a valid key or a key range, this
method throws a DOMException of type DataError. | 260 If the range parameter is specified but is not a valid key or a key range, this
method throws a DOMException of type DataError. |
| 261 Expecting exception from store.openKeyCursor({}) | 261 Expecting exception from store.openKeyCursor({}) |
| 262 PASS Exception was thrown. | 262 PASS Exception was thrown. |
| 263 PASS code is 0 | 263 PASS code is 0 |
| 264 PASS ename is 'DataError' | 264 PASS ename is 'DataError' |
| 265 Exception message: Failed to execute 'openKeyCursor' on 'IDBObjectStore': The pa
rameter is not a valid key. | 265 Exception message: Failed to execute 'openKeyCursor' on 'IDBObjectStore': The pa
rameter is not a valid key. |
| 266 The transaction this IDBObjectStore belongs to is not active. | 266 The transaction this IDBObjectStore belongs to is not active. |
| 267 Expecting exception from storeFromInactiveTransaction.openKeyCursor() | 267 Expecting exception from storeFromInactiveTransaction.openKeyCursor() |
| 268 PASS Exception was thrown. | 268 PASS Exception was thrown. |
| 269 PASS code is 0 | 269 PASS code is 0 |
| 270 PASS ename is 'TransactionInactiveError' | 270 PASS ename is 'TransactionInactiveError' |
| 271 Exception message: Failed to execute 'openKeyCursor' on 'IDBObjectStore': The tr
ansaction has finished. | 271 Exception message: Failed to execute 'openKeyCursor' on 'IDBObjectStore': The tr
ansaction has finished. |
| 272 The value for the direction parameter is invalid. | 272 The value for the direction parameter is invalid. |
| 273 Expecting TypeError exception from store.openKeyCursor(0, 'invalid-direction') | 273 Expecting TypeError exception from store.openKeyCursor(0, 'invalid-direction') |
| 274 PASS Exception was thrown. | 274 PASS Exception was thrown. |
| 275 PASS store.openKeyCursor(0, 'invalid-direction') threw TypeError: Type error | 275 PASS store.openKeyCursor(0, 'invalid-direction') threw TypeError: Failed to exec
ute 'openKeyCursor' on 'IDBObjectStore': The direction provided ('invalid-direct
ion') is not one of 'next', 'nextunique', 'prev', or 'prevunique'. |
| 276 | 276 |
| 277 IDBObjectStore.put() | 277 IDBObjectStore.put() |
| 278 This method throws a DOMException of type ReadOnlyError if the transaction which
this IDBObjectStore belongs to is has its mode set to "readonly". | 278 This method throws a DOMException of type ReadOnlyError if the transaction which
this IDBObjectStore belongs to is has its mode set to "readonly". |
| 279 Expecting exception from storeFromReadOnlyTransaction.put(0, 0) | 279 Expecting exception from storeFromReadOnlyTransaction.put(0, 0) |
| 280 PASS Exception was thrown. | 280 PASS Exception was thrown. |
| 281 PASS code is 0 | 281 PASS code is 0 |
| 282 PASS ename is 'ReadOnlyError' | 282 PASS ename is 'ReadOnlyError' |
| 283 Exception message: A write operation was attempted in a read-only transaction. | 283 Exception message: A write operation was attempted in a read-only transaction. |
| 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) |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 Exception message: Failed to execute 'openCursor' on 'IDBIndex': The parameter i
s not a valid key. | 402 Exception message: Failed to execute 'openCursor' on 'IDBIndex': The parameter i
s not a valid key. |
| 403 The transaction this IDBIndex belongs to is not active. | 403 The transaction this IDBIndex belongs to is not active. |
| 404 Expecting exception from indexFromInactiveTransaction.openCursor() | 404 Expecting exception from indexFromInactiveTransaction.openCursor() |
| 405 PASS Exception was thrown. | 405 PASS Exception was thrown. |
| 406 PASS code is 0 | 406 PASS code is 0 |
| 407 PASS ename is 'TransactionInactiveError' | 407 PASS ename is 'TransactionInactiveError' |
| 408 Exception message: Failed to execute 'openCursor' on 'IDBIndex': The transaction
has finished. | 408 Exception message: Failed to execute 'openCursor' on 'IDBIndex': The transaction
has finished. |
| 409 The value for the direction parameter is invalid. | 409 The value for the direction parameter is invalid. |
| 410 Expecting TypeError exception from index.openCursor(0, 'invalid-direction') | 410 Expecting TypeError exception from index.openCursor(0, 'invalid-direction') |
| 411 PASS Exception was thrown. | 411 PASS Exception was thrown. |
| 412 PASS index.openCursor(0, 'invalid-direction') threw TypeError: Type error | 412 PASS index.openCursor(0, 'invalid-direction') threw TypeError: Failed to execute
'openCursor' on 'IDBIndex': The direction provided ('invalid-direction') is not
one of 'next', 'nextunique', 'prev', or 'prevunique'. |
| 413 | 413 |
| 414 IDBIndex.openKeyCursor() | 414 IDBIndex.openKeyCursor() |
| 415 If the range parameter is specified but is not a valid key or a key range, this
method throws a DOMException of type DataError. | 415 If the range parameter is specified but is not a valid key or a key range, this
method throws a DOMException of type DataError. |
| 416 Expecting exception from index.openKeyCursor({}) | 416 Expecting exception from index.openKeyCursor({}) |
| 417 PASS Exception was thrown. | 417 PASS Exception was thrown. |
| 418 PASS code is 0 | 418 PASS code is 0 |
| 419 PASS ename is 'DataError' | 419 PASS ename is 'DataError' |
| 420 Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The paramete
r is not a valid key. | 420 Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The paramete
r is not a valid key. |
| 421 The transaction this IDBIndex belongs to is not active. | 421 The transaction this IDBIndex belongs to is not active. |
| 422 Expecting exception from indexFromInactiveTransaction.openKeyCursor() | 422 Expecting exception from indexFromInactiveTransaction.openKeyCursor() |
| 423 PASS Exception was thrown. | 423 PASS Exception was thrown. |
| 424 PASS code is 0 | 424 PASS code is 0 |
| 425 PASS ename is 'TransactionInactiveError' | 425 PASS ename is 'TransactionInactiveError' |
| 426 Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The transact
ion has finished. | 426 Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The transact
ion has finished. |
| 427 The value for the direction parameter is invalid. | 427 The value for the direction parameter is invalid. |
| 428 Expecting TypeError exception from index.openKeyCursor(0, 'invalid-direction') | 428 Expecting TypeError exception from index.openKeyCursor(0, 'invalid-direction') |
| 429 PASS Exception was thrown. | 429 PASS Exception was thrown. |
| 430 PASS index.openKeyCursor(0, 'invalid-direction') threw TypeError: Type error | 430 PASS index.openKeyCursor(0, 'invalid-direction') threw TypeError: Failed to exec
ute 'openKeyCursor' on 'IDBIndex': The direction provided ('invalid-direction')
is not one of 'next', 'nextunique', 'prev', or 'prevunique'. |
| 431 | 431 |
| 432 3.2.7 Cursor | 432 3.2.7 Cursor |
| 433 transaction = db.transaction(['store', 'inlineKeyStore'], 'readwrite') | 433 transaction = db.transaction(['store', 'inlineKeyStore'], 'readwrite') |
| 434 request = transaction.objectStore('store').openCursor() | 434 request = transaction.objectStore('store').openCursor() |
| 435 cursor = request.result | 435 cursor = request.result |
| 436 request = transaction.objectStore('store').index('index').openKeyCursor() | 436 request = transaction.objectStore('store').index('index').openKeyCursor() |
| 437 keyCursor = request.result | 437 keyCursor = request.result |
| 438 request = transaction.objectStore('store').openCursor(IDBKeyRange.lowerBound(-In
finity), 'prev') | 438 request = transaction.objectStore('store').openCursor(IDBKeyRange.lowerBound(-In
finity), 'prev') |
| 439 reverseCursor = request.result | 439 reverseCursor = request.result |
| 440 request = transaction.objectStore('inlineKeyStore').openCursor() | 440 request = transaction.objectStore('inlineKeyStore').openCursor() |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |