Index: LayoutTests/storage/indexeddb/exceptions-expected.txt |
diff --git a/LayoutTests/storage/indexeddb/exceptions-expected.txt b/LayoutTests/storage/indexeddb/exceptions-expected.txt |
index 96618d7f322a99c21e660d5d98d7ed294d7802c4..0d775daa9567914d2ce963877e09bef6a76d1fb9 100644 |
--- a/LayoutTests/storage/indexeddb/exceptions-expected.txt |
+++ b/LayoutTests/storage/indexeddb/exceptions-expected.txt |
@@ -33,6 +33,7 @@ Expecting exception from request.error |
PASS Exception was thrown. |
PASS code is DOMException.INVALID_STATE_ERR |
PASS ename is 'InvalidStateError' |
+Exception message: The request has not finished. |
IDBRequest.result |
When the done flag is false, getting this property must throw a DOMException of type InvalidStateError. |
@@ -40,6 +41,7 @@ Expecting exception from request.result |
PASS Exception was thrown. |
PASS code is DOMException.INVALID_STATE_ERR |
PASS ename is 'InvalidStateError' |
+Exception message: The request has not finished. |
3.2.3 Opening a database |
@@ -49,6 +51,7 @@ Expecting exception from indexedDB.cmp(null, 0) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'DataError' |
+Exception message: The parameter is not a valid key. |
db.close() |
3.2.4 Database |
@@ -60,20 +63,24 @@ Expecting exception from db.createObjectStore('store') |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'ConstraintError' |
+Exception message: An object store with the specified name already exists. |
If keyPath is not a valid key path then a DOMException of type SyntaxError must be thrown. |
Expecting exception from db.createObjectStore('fail', {keyPath: '-invalid-'}) |
PASS Exception was thrown. |
PASS code is DOMException.SYNTAX_ERR |
PASS ename is 'SyntaxError' |
+Exception message: The keyPath option is not a valid key path. |
If the optionalParameters parameter is specified, and autoIncrement is set to true, and the keyPath parameter is specified to the empty string, or specified to an Array, this function must throw a InvalidAccessError exception. |
Expecting exception from db.createObjectStore('fail', {autoIncrement: true, keyPath: ''}) |
PASS Exception was thrown. |
PASS code is DOMException.INVALID_ACCESS_ERR |
PASS ename is 'InvalidAccessError' |
+Exception message: The autoIncrement option was set but the keyPath option was empty or an array. |
Expecting exception from db.createObjectStore('fail', {autoIncrement: true, keyPath: ['a']}) |
PASS Exception was thrown. |
PASS code is DOMException.INVALID_ACCESS_ERR |
PASS ename is 'InvalidAccessError' |
+Exception message: The autoIncrement option was set but the keyPath option was empty or an array. |
IDBDatabase.deleteObjectStore() |
There is no object store with the given name, compared in a case-sensitive manner, in the connected database. |
@@ -81,6 +88,7 @@ Expecting exception from db.deleteObjectStore('no-such-store') |
PASS Exception was thrown. |
PASS code is DOMException.NOT_FOUND_ERR |
PASS ename is 'NotFoundError' |
+Exception message: The specified object store was not found. |
IDBDatabase.transaction() |
If this method is called on IDBDatabase object for which a "versionchange" transaction is still running, a InvalidStateError exception must be thrown. |
@@ -88,11 +96,13 @@ Expecting exception from db.transaction('store') |
PASS Exception was thrown. |
PASS code is DOMException.INVALID_STATE_ERR |
PASS ename is 'InvalidStateError' |
+Exception message: A version change transaction is running. |
One of the names provided in the storeNames argument doesn't exist in this database. |
Expecting exception from db.transaction('no-such-store') |
PASS Exception was thrown. |
PASS code is DOMException.NOT_FOUND_ERR |
PASS ename is 'NotFoundError' |
+Exception message: One of the specified object stores was not found. |
The value for the mode parameter is invalid. |
Expecting TypeError exception from db.transaction('store', 'invalid-mode') |
PASS Exception was thrown. |
@@ -102,6 +112,7 @@ Expecting exception from db.transaction([]) |
PASS Exception was thrown. |
PASS code is DOMException.INVALID_ACCESS_ERR |
PASS ename is 'InvalidAccessError' |
+Exception message: The storeNames parameter was empty. |
One more IDBDatabase.createObjectStore() test: |
If this function is called from outside a "versionchange" transaction callback ... the implementation must throw a DOMException of type InvalidStateError. |
@@ -109,6 +120,7 @@ Expecting exception from db.createObjectStore('fail') |
PASS Exception was thrown. |
PASS code is DOMException.INVALID_STATE_ERR |
PASS ename is 'InvalidStateError' |
+Exception message: The database is not running a version change transaction. |
One more IDBDatabase.deleteObjectStore() test: |
If this function is called from outside a "versionchange" transaction callback ... the implementation must throw a DOMException of type InvalidStateError. |
@@ -116,6 +128,7 @@ Expecting exception from db.deleteObjectStore('fail') |
PASS Exception was thrown. |
PASS code is DOMException.INVALID_STATE_ERR |
PASS ename is 'InvalidStateError' |
+Exception message: The database is not running a version change transaction. |
Prepare an object store and index from an inactive transaction for later use. |
finishedTransaction = inactiveTransaction = db.transaction('store') |
@@ -136,15 +149,18 @@ Expecting exception from storeFromReadOnlyTransaction.add(0, 0) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'ReadOnlyError' |
+Exception message: A write operation was attempted in a read-only transaction. |
The transaction this IDBObjectStore belongs to is not active. |
Expecting exception from storeFromInactiveTransaction.add(0, 0) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'TransactionInactiveError' |
+Exception message: The transaction has finished. |
The data being stored could not be cloned by the internal structured cloning algorithm. |
Expecting exception from store.add(self, 0) |
PASS Exception was thrown. |
PASS code is DOMException.DATA_CLONE_ERR |
+Exception message: An object could not be cloned. |
IDBObjectStore.clear() |
This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly". |
@@ -152,11 +168,13 @@ Expecting exception from storeFromReadOnlyTransaction.clear() |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'ReadOnlyError' |
+Exception message: A write operation was attempted in a read-only transaction. |
The transaction this IDBObjectStore belongs to is not active. |
Expecting exception from storeFromInactiveTransaction.clear() |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'TransactionInactiveError' |
+Exception message: The transaction has finished. |
IDBObjectStore.count() |
If the optional key parameter is not a valid key or a key range, this method throws a DOMException of type DataError. |
@@ -164,11 +182,13 @@ Expecting exception from store.count({}) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'DataError' |
+Exception message: The parameter is not a valid key. |
The transaction this IDBObjectStore belongs to is not active. |
Expecting exception from storeFromInactiveTransaction.count() |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'TransactionInactiveError' |
+Exception message: The transaction has finished. |
IDBObjectStore.delete() |
This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly". |
@@ -176,16 +196,19 @@ Expecting exception from storeFromReadOnlyTransaction.delete(0) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'ReadOnlyError' |
+Exception message: A write operation was attempted in a read-only transaction. |
If the key parameter is not a valid key or a key range this method throws a DOMException of type DataError. |
Expecting exception from store.delete({}) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'DataError' |
+Exception message: The parameter is not a valid key. |
The transaction this IDBObjectStore belongs to is not active. |
Expecting exception from storeFromInactiveTransaction.add(0, 0) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'TransactionInactiveError' |
+Exception message: The transaction has finished. |
IDBObjectStore.get() |
If the key parameter is not a valid key or a key range, this method throws a DOMException of type DataError. |
@@ -193,11 +216,13 @@ Expecting exception from store.get({}) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'DataError' |
+Exception message: The parameter is not a valid key. |
The transaction this IDBObjectStore belongs to is not active. |
Expecting exception from storeFromInactiveTransaction.get(0) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'TransactionInactiveError' |
+Exception message: The transaction has finished. |
IDBObjectStore.index() |
There is no index with the given name, compared in a case-sensitive manner, in the connected database. |
@@ -205,11 +230,13 @@ Expecting exception from store.index('no-such-index') |
PASS Exception was thrown. |
PASS code is DOMException.NOT_FOUND_ERR |
PASS ename is 'NotFoundError' |
+Exception message: The specified index was not found. |
Occurs if a request is made on a source object that has been deleted or removed, or if the transaction the object store belongs to has finished. |
Expecting exception from storeFromInactiveTransaction.index('index') |
PASS Exception was thrown. |
PASS code is DOMException.INVALID_STATE_ERR |
PASS ename is 'InvalidStateError' |
+Exception message: The transaction has finished. |
IDBObjectStore.openCursor() |
If the range parameter is specified but is not a valid key or a key range, this method throws a DOMException of type DataError. |
@@ -217,11 +244,13 @@ Expecting exception from store.openCursor({}) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'DataError' |
+Exception message: The parameter is not a valid key. |
The transaction this IDBObjectStore belongs to is not active. |
Expecting exception from storeFromInactiveTransaction.openCursor() |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'TransactionInactiveError' |
+Exception message: The transaction has finished. |
The value for the direction parameter is invalid. |
Expecting TypeError exception from store.openCursor(0, 'invalid-direction') |
PASS Exception was thrown. |
@@ -233,15 +262,18 @@ Expecting exception from storeFromReadOnlyTransaction.put(0, 0) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'ReadOnlyError' |
+Exception message: A write operation was attempted in a read-only transaction. |
The transaction this IDBObjectStore belongs to is not active. |
Expecting exception from storeFromInactiveTransaction.put(0, 0) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'TransactionInactiveError' |
+Exception message: The transaction has finished. |
The data being stored could not be cloned by the internal structured cloning algorithm. |
Expecting exception from store.put(self, 0) |
PASS Exception was thrown. |
PASS code is DOMException.DATA_CLONE_ERR |
+Exception message: An object could not be cloned. |
db.close() |
ro_transaction.oncomplete = transactionComplete |
rw_transaction.oncomplete = transactionComplete |
@@ -259,16 +291,19 @@ Expecting exception from store.createIndex('index', 'keyPath') |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'ConstraintError' |
+Exception message: An index with the specified name already exists. |
If keyPath is not a valid key path then a DOMException of type SyntaxError must be thrown. |
Expecting exception from store.createIndex('fail', '-invalid-') |
PASS Exception was thrown. |
PASS code is DOMException.SYNTAX_ERR |
PASS ename is 'SyntaxError' |
+Exception message: The keyPath argument contains an invalid key path. |
If keyPath is an Array and the multiEntry property in the optionalParameters is true, then a DOMException of type InvalidAccessError must be thrown. |
Expecting exception from store.createIndex('fail', ['a'], {multiEntry: true}) |
PASS Exception was thrown. |
PASS code is DOMException.INVALID_ACCESS_ERR |
PASS ename is 'InvalidAccessError' |
+Exception message: The keyPath argument was an array and the multiEntry option is true. |
IDBObjectStore.deleteIndex() |
There is no index with the given name, compared in a case-sensitive manner, in the connected database. |
@@ -276,6 +311,7 @@ Expecting exception from store.deleteIndex('no-such-index') |
PASS Exception was thrown. |
PASS code is DOMException.NOT_FOUND_ERR |
PASS ename is 'NotFoundError' |
+Exception message: The specified index was not found. |
One more IDBObjectStore.createIndex() test: |
If this function is called from outside a "versionchange" transaction callback ... the implementation must throw a DOMException of type InvalidStateError. |
@@ -283,6 +319,7 @@ Expecting exception from db.transaction('store').objectStore('store').createInde |
PASS Exception was thrown. |
PASS code is DOMException.INVALID_STATE_ERR |
PASS ename is 'InvalidStateError' |
+Exception message: The database is not running a version change transaction. |
One more IDBObjectStore.deleteIndex() test: |
If this function is called from outside a "versionchange" transaction callback ... the implementation must throw a DOMException of type InvalidStateError. |
@@ -290,6 +327,7 @@ Expecting exception from db.transaction('store').objectStore('store').deleteInde |
PASS Exception was thrown. |
PASS code is DOMException.INVALID_STATE_ERR |
PASS ename is 'InvalidStateError' |
+Exception message: The database is not running a version change transaction. |
3.2.6 Index |
indexFromReadOnlyTransaction = db.transaction('store', 'readonly').objectStore('store').index('index') |
@@ -301,11 +339,13 @@ Expecting exception from index.count({}) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'DataError' |
+Exception message: The parameter is not a valid key. |
The transaction this IDBIndex belongs to is not active. |
Expecting exception from indexFromInactiveTransaction.count() |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'TransactionInactiveError' |
+Exception message: The transaction has finished. |
IDBIndex.get() |
If the key parameter is not a valid key or a key range, this method throws a DOMException of type DataError. |
@@ -313,11 +353,13 @@ Expecting exception from index.get({}) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'DataError' |
+Exception message: The parameter is not a valid key. |
The transaction this IDBIndex belongs to is not active. |
Expecting exception from indexFromInactiveTransaction.get(0) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'TransactionInactiveError' |
+Exception message: The transaction has finished. |
IDBIndex.getKey() |
If the key parameter is not a valid key or a key range, this method throws a DOMException of type DataError. |
@@ -325,11 +367,13 @@ Expecting exception from index.getKey({}) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'DataError' |
+Exception message: The parameter is not a valid key. |
The transaction this IDBIndex belongs to is not active. |
Expecting exception from indexFromInactiveTransaction.getKey(0) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'TransactionInactiveError' |
+Exception message: The transaction has finished. |
IDBIndex.openCursor() |
If the range parameter is specified but is not a valid key or a key range, this method throws a DOMException of type DataError. |
@@ -337,11 +381,13 @@ Expecting exception from index.openCursor({}) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'DataError' |
+Exception message: The parameter is not a valid key. |
The transaction this IDBIndex belongs to is not active. |
Expecting exception from indexFromInactiveTransaction.openCursor() |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'TransactionInactiveError' |
+Exception message: The transaction has finished. |
The value for the direction parameter is invalid. |
Expecting TypeError exception from index.openCursor(0, 'invalid-direction') |
PASS Exception was thrown. |
@@ -353,11 +399,13 @@ Expecting exception from index.openKeyCursor({}) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'DataError' |
+Exception message: The parameter is not a valid key. |
The transaction this IDBIndex belongs to is not active. |
Expecting exception from indexFromInactiveTransaction.openKeyCursor() |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'TransactionInactiveError' |
+Exception message: The transaction has finished. |
The value for the direction parameter is invalid. |
Expecting TypeError exception from index.openKeyCursor(0, 'invalid-direction') |
PASS Exception was thrown. |
@@ -385,11 +433,13 @@ Expecting exception from cursor.advance(1) |
PASS Exception was thrown. |
PASS code is DOMException.INVALID_STATE_ERR |
PASS ename is 'InvalidStateError' |
+Exception message: The cursor is being iterated or has iterated past its end. |
The transaction this IDBCursor belongs to is not active. |
Expecting exception from cursorFromInactiveTransaction.advance(1) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'TransactionInactiveError' |
+Exception message: The transaction has finished. |
IDBCursor.continue() |
The parameter is not a valid key. |
@@ -397,27 +447,32 @@ Expecting exception from cursor.continue({}) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'DataError' |
+Exception message: The parameter is not a valid key. |
The parameter is less than or equal to this cursor's position and this cursor's direction is "next" or "nextunique". |
Expecting exception from cursor.continue(-Infinity) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'DataError' |
+Exception message: The parameter is less than or equal to this cursor's position. |
The parameter is greater than or equal to this cursor's position and this cursor's direction is "prev" or "prevunique". |
Expecting exception from reverseCursor.continue(100) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'DataError' |
+Exception message: The parameter is greater than or equal to this cursor's position. |
Calling this method more than once before new cursor data has been loaded is not allowed and results in a DOMException of type InvalidStateError being thrown. |
cursor.continue() |
Expecting exception from cursor.continue() |
PASS Exception was thrown. |
PASS code is DOMException.INVALID_STATE_ERR |
PASS ename is 'InvalidStateError' |
+Exception message: The cursor is being iterated or has iterated past its end. |
The transaction this IDBCursor belongs to is not active. |
Expecting exception from cursorFromInactiveTransaction.continue() |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'TransactionInactiveError' |
+Exception message: The transaction has finished. |
IDBCursor.delete() |
If this cursor's got value flag is false, or if this cursor was created using openKeyCursor a DOMException of type InvalidStateError is thrown. |
@@ -425,11 +480,13 @@ Expecting exception from keyCursor.delete() |
PASS Exception was thrown. |
PASS code is DOMException.INVALID_STATE_ERR |
PASS ename is 'InvalidStateError' |
+Exception message: The cursor is a key cursor. |
The transaction this IDBCursor belongs to is not active. |
Expecting exception from cursorFromInactiveTransaction.delete() |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'TransactionInactiveError' |
+Exception message: The transaction has finished. |
IDBCursor.update() |
If this cursor's got value flag is false or if this cursor was created using openKeyCursor. This method throws a DOMException of type InvalidStateError. |
@@ -437,20 +494,24 @@ Expecting exception from keyCursor.update({}) |
PASS Exception was thrown. |
PASS code is DOMException.INVALID_STATE_ERR |
PASS ename is 'InvalidStateError' |
+Exception message: The cursor is a key cursor. |
If the effective object store of this cursor uses in-line keys and evaluating the 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. |
Expecting exception from inlineCursor.update({id: 1}) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'DataError' |
+Exception message: The effective object store of this cursor uses in-line keys and evaluating the key path of the value parameter results in a different value than the cursor's effective key. |
If the structured clone algorithm throws an exception, that exception is rethrown. |
Expecting exception from cursor.update(self) |
PASS Exception was thrown. |
PASS code is DOMException.DATA_CLONE_ERR |
+Exception message: An object could not be cloned. |
The transaction this IDBCursor belongs to is not active. |
Expecting exception from cursorFromInactiveTransaction.update({}) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'TransactionInactiveError' |
+Exception message: The transaction has finished. |
readOnlyTransaction = db.transaction('store', 'readonly') |
request = readOnlyTransaction.objectStore('store').openCursor() |
cursorFromReadOnlyTransaction = request.result |
@@ -461,6 +522,7 @@ Expecting exception from cursorFromReadOnlyTransaction.delete() |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'ReadOnlyError' |
+Exception message: A write operation was attempted in a read-only transaction. |
One more IDBCursor.update() test: |
This method throws a DOMException of type ReadOnlyError if the transaction which this IDBCursor belongs to has its mode set to "readonly". |
@@ -468,6 +530,7 @@ Expecting exception from cursorFromReadOnlyTransaction.update({}) |
PASS Exception was thrown. |
PASS code is 0 |
PASS ename is 'ReadOnlyError' |
+Exception message: A write operation was attempted in a read-only transaction. |
3.2.8 Transaction |
@@ -477,11 +540,13 @@ Expecting exception from finishedTransaction.abort() |
PASS Exception was thrown. |
PASS code is DOMException.INVALID_STATE_ERR |
PASS ename is 'InvalidStateError' |
+Exception message: The transaction has finished. |
If the requested object store is not in this transaction's scope. |
Expecting exception from db.transaction('store').objectStore('otherStore') |
PASS Exception was thrown. |
PASS code is DOMException.NOT_FOUND_ERR |
PASS ename is 'NotFoundError' |
+Exception message: The specified object store was not found. |
PASS successfullyParsed is true |
TEST COMPLETE |