Diff
Modified: trunk/LayoutTests/ChangeLog (193509 => 193510)
--- trunk/LayoutTests/ChangeLog 2015-12-05 04:31:49 UTC (rev 193509)
+++ trunk/LayoutTests/ChangeLog 2015-12-05 05:25:11 UTC (rev 193510)
@@ -1,6 +1,22 @@
2015-12-04 Brady Eidson <beid...@apple.com>
Modern IDB: Add some more custom exception messages, passing some more tests.
+ https://bugs.webkit.org/show_bug.cgi?id=151898
+
+ Reviewed by Alex Christensen.
+
+ * platform/mac-wk1/TestExpectations:
+ * storage/indexeddb/keypath-arrays-expected.txt:
+ * storage/indexeddb/noblobs-expected.txt:
+ * storage/indexeddb/object-lookups-in-versionchange-expected.txt:
+ * storage/indexeddb/request-result-cache-expected.txt:
+ * storage/indexeddb/transaction-after-close-expected.txt:
+ * storage/indexeddb/transaction-and-objectstore-calls-expected.txt:
+ * storage/indexeddb/transaction-read-only-expected.txt:
+
+2015-12-04 Brady Eidson <beid...@apple.com>
+
+ Modern IDB: Add some more custom exception messages, passing some more tests.
https://bugs.webkit.org/show_bug.cgi?id=151895
Reviewed by Alex Christensen.
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (193509 => 193510)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2015-12-05 04:31:49 UTC (rev 193509)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2015-12-05 05:25:11 UTC (rev 193510)
@@ -142,13 +142,10 @@
storage/indexeddb/invalid-keys.html [ Failure ]
storage/indexeddb/key-type-array.html [ Failure ]
storage/indexeddb/key-type-binary.html [ Failure ]
-storage/indexeddb/keypath-arrays.html [ Failure ]
storage/indexeddb/keypath-edges.html [ Failure ]
storage/indexeddb/keyrange.html [ Failure ]
storage/indexeddb/lazy-index-types.html [ Failure ]
storage/indexeddb/metadata.html [ Failure ]
-storage/indexeddb/noblobs.html [ Failure ]
-storage/indexeddb/object-lookups-in-versionchange.html [ Failure ]
storage/indexeddb/objectstore-autoincrement.html [ Failure ]
storage/indexeddb/objectstore-count.html [ Failure ]
storage/indexeddb/objectstore-cursor.html [ Failure ]
@@ -160,13 +157,9 @@
storage/indexeddb/persistence.html [ Failure ]
storage/indexeddb/properties-disabled-at-runtime.html [ Failure ]
storage/indexeddb/request-leak.html [ Failure ]
-storage/indexeddb/request-result-cache.html [ Failure ]
storage/indexeddb/setversion-blocked-by-versionchange-close.html [ Failure ]
storage/indexeddb/setversion-not-blocked.html [ Failure ]
storage/indexeddb/transaction-active-flag.html [ Failure ]
-storage/indexeddb/transaction-after-close.html [ Failure ]
-storage/indexeddb/transaction-and-objectstore-calls.html [ Failure ]
-storage/indexeddb/transaction-read-only.html [ Failure ]
storage/indexeddb/transaction-scope-sequencing.html [ Failure ]
storage/indexeddb/version-change-abort.html [ Failure ]
Modified: trunk/LayoutTests/storage/indexeddb/keypath-arrays-expected.txt (193509 => 193510)
--- trunk/LayoutTests/storage/indexeddb/keypath-arrays-expected.txt 2015-12-05 04:31:49 UTC (rev 193509)
+++ trunk/LayoutTests/storage/indexeddb/keypath-arrays-expected.txt 2015-12-05 05:25:11 UTC (rev 193510)
@@ -13,21 +13,21 @@
Expecting exception from db.createObjectStore('store-with-generator', {keyPath: ['a', 'b'], autoIncrement: true})
PASS Exception was thrown.
PASS code is DOMException.INVALID_ACCESS_ERR
-Exception message: InvalidAccessError: DOM IDBDatabase Exception 15
+Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
Expecting exception from store.createIndex('index-multientry', ['e', 'f'], {multiEntry: true})
PASS Exception was thrown.
PASS code is DOMException.INVALID_ACCESS_ERR
-Exception message: InvalidAccessError: DOM IDBDatabase Exception 15
+Exception message: Failed to execute 'createIndex' on 'IDBObjectStore': The keyPath argument was an array and the multiEntry option is true.
Empty arrays are not valid key paths:
Expecting exception from db.createObjectStore('store-keypath-empty-array', {keyPath: []})
PASS Exception was thrown.
PASS code is DOMException.SYNTAX_ERR
-Exception message: SyntaxError: DOM IDBDatabase Exception 12
+Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The keyPath option is not a valid key path.
Expecting exception from store.createIndex('index-keypath-empty-array', [])
PASS Exception was thrown.
PASS code is DOMException.SYNTAX_ERR
-Exception message: SyntaxError: DOM IDBDatabase Exception 12
+Exception message: Failed to execute 'createIndex' on 'IDBObjectStore': The keyPath argument contains an invalid key path.
testKeyPaths():
transaction = db.transaction(['store'], 'readwrite')
Modified: trunk/LayoutTests/storage/indexeddb/noblobs-expected.txt (193509 => 193510)
--- trunk/LayoutTests/storage/indexeddb/noblobs-expected.txt 2015-12-05 04:31:49 UTC (rev 193509)
+++ trunk/LayoutTests/storage/indexeddb/noblobs-expected.txt 2015-12-05 05:25:11 UTC (rev 193510)
@@ -22,17 +22,17 @@
Expecting exception from store.put(blob, 'key')
PASS Exception was thrown.
PASS code is DOMException.DATA_CLONE_ERR
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The object store currently does not support blob values.
+Exception message: Failed to store record in an IDBObjectStore: BlobURLs are not yet supported.
Expecting exception from store.add(blob, 'key')
PASS Exception was thrown.
PASS code is DOMException.DATA_CLONE_ERR
-Exception message: Failed to execute 'add' on 'IDBObjectStore': The object store currently does not support blob values.
+Exception message: Failed to store record in an IDBObjectStore: BlobURLs are not yet supported.
request = store.openCursor()
cursor = request.result
Expecting exception from cursor.update(blob)
PASS Exception was thrown.
PASS code is DOMException.DATA_CLONE_ERR
-Exception message: Failed to execute 'update' on 'IDBCursor': The object store currently does not support blob values.
+Exception message: Failed to store record in an IDBObjectStore: BlobURLs are not yet supported.
testFile():
file = fileInput.files[0]
@@ -43,17 +43,17 @@
Expecting exception from store.put(file, 'key')
PASS Exception was thrown.
PASS code is DOMException.DATA_CLONE_ERR
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The object store currently does not support blob values.
+Exception message: Failed to store record in an IDBObjectStore: BlobURLs are not yet supported.
Expecting exception from store.add(file, 'key')
PASS Exception was thrown.
PASS code is DOMException.DATA_CLONE_ERR
-Exception message: Failed to execute 'add' on 'IDBObjectStore': The object store currently does not support blob values.
+Exception message: Failed to store record in an IDBObjectStore: BlobURLs are not yet supported.
request = store.openCursor()
cursor = request.result
Expecting exception from cursor.update(file)
PASS Exception was thrown.
PASS code is DOMException.DATA_CLONE_ERR
-Exception message: Failed to execute 'update' on 'IDBCursor': The object store currently does not support blob values.
+Exception message: Failed to store record in an IDBObjectStore: BlobURLs are not yet supported.
testFileList():
filelist = fileInput.files
@@ -64,17 +64,17 @@
Expecting exception from store.put(filelist, 'key')
PASS Exception was thrown.
PASS code is DOMException.DATA_CLONE_ERR
-Exception message: Failed to execute 'put' on 'IDBObjectStore': The object store currently does not support blob values.
+Exception message: Failed to store record in an IDBObjectStore: BlobURLs are not yet supported.
Expecting exception from store.add(filelist, 'key')
PASS Exception was thrown.
PASS code is DOMException.DATA_CLONE_ERR
-Exception message: Failed to execute 'add' on 'IDBObjectStore': The object store currently does not support blob values.
+Exception message: Failed to store record in an IDBObjectStore: BlobURLs are not yet supported.
request = store.openCursor()
cursor = request.result
Expecting exception from cursor.update(filelist)
PASS Exception was thrown.
PASS code is DOMException.DATA_CLONE_ERR
-Exception message: Failed to execute 'update' on 'IDBCursor': The object store currently does not support blob values.
+Exception message: Failed to store record in an IDBObjectStore: BlobURLs are not yet supported.
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/storage/indexeddb/object-lookups-in-versionchange-expected.txt (193509 => 193510)
--- trunk/LayoutTests/storage/indexeddb/object-lookups-in-versionchange-expected.txt 2015-12-05 04:31:49 UTC (rev 193509)
+++ trunk/LayoutTests/storage/indexeddb/object-lookups-in-versionchange-expected.txt 2015-12-05 05:25:11 UTC (rev 193510)
@@ -16,13 +16,13 @@
PASS Exception was thrown.
PASS code is DOMException.NOT_FOUND_ERR
PASS ename is 'NotFoundError'
-Exception message: NotFoundError: DOM IDBDatabase Exception 8
+Exception message: Failed to execute 'objectStore' on 'IDBTransaction': The specified object store was not found.
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: NotFoundError: DOM IDBDatabase Exception 8
+Exception message: Failed to execute 'index' on 'IDBObjectStore': The specified index was not found.
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/storage/indexeddb/request-result-cache-expected.txt (193509 => 193510)
--- trunk/LayoutTests/storage/indexeddb/request-result-cache-expected.txt 2015-12-05 04:31:49 UTC (rev 193509)
+++ trunk/LayoutTests/storage/indexeddb/request-result-cache-expected.txt 2015-12-05 05:25:11 UTC (rev 193510)
@@ -26,7 +26,7 @@
PASS Exception was thrown.
PASS code is DOMException.INVALID_STATE_ERR
PASS ename is 'InvalidStateError'
-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
+Exception message: Failed to read the 'result' property from 'IDBRequest': The request has not finished.
cursorRequestSuccess():
PASS successfullyParsed is true
Modified: trunk/LayoutTests/storage/indexeddb/resources/transaction-and-objectstore-calls.js (193509 => 193510)
--- trunk/LayoutTests/storage/indexeddb/resources/transaction-and-objectstore-calls.js 2015-12-05 04:31:49 UTC (rev 193509)
+++ trunk/LayoutTests/storage/indexeddb/resources/transaction-and-objectstore-calls.js 2015-12-05 05:25:11 UTC (rev 193510)
@@ -98,8 +98,8 @@
debug("transaction complete, ensuring methods fail");
shouldBeNonNull("trans");
shouldBeNonNull("store");
- evalAndExpectException("trans.objectStore('store')", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'");
- evalAndExpectException("store.index('index')", "DOMException.INVALID_STATE_ERR", "'InvalidStateError'");
+ evalAndExpectException("trans.objectStore('store')", "0", "'TransactionInactiveError'");
+ evalAndExpectException("store.index('index')", "0", "'TransactionInactiveError'");
finishJSTest();
}
Modified: trunk/LayoutTests/storage/indexeddb/transaction-after-close-expected.txt (193509 => 193510)
--- trunk/LayoutTests/storage/indexeddb/transaction-after-close-expected.txt 2015-12-05 04:31:49 UTC (rev 193509)
+++ trunk/LayoutTests/storage/indexeddb/transaction-after-close-expected.txt 2015-12-05 05:25:11 UTC (rev 193510)
@@ -19,7 +19,7 @@
PASS Exception was thrown.
PASS code is DOMException.INVALID_STATE_ERR
PASS ename is 'InvalidStateError'
-Exception message: InvalidStateError: DOM IDBDatabase Exception 11
+Exception message: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
verify that we can reopen the db after calling close
indexedDB.open(dbname)
Modified: trunk/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt (193509 => 193510)
--- trunk/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt 2015-12-05 04:31:49 UTC (rev 193509)
+++ trunk/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt 2015-12-05 05:25:11 UTC (rev 193510)
@@ -83,7 +83,7 @@
PASS ename is 'NotFoundError'
Exception message: Failed to execute 'objectStore' on 'IDBTransaction': The specified object store was not found.
-PASS trans = db.transaction() threw exception TypeError: Failed to execute 'transaction' on 'IDBDatabase': 1 argument required, but only 0 present..
+PASS trans = db.transaction() threw exception TypeError: Not enough arguments.
Expecting exception from db.transaction(['x'])
PASS Exception was thrown.
@@ -154,14 +154,14 @@
PASS store is non-null.
Expecting exception from trans.objectStore('store')
PASS Exception was thrown.
-PASS code is DOMException.INVALID_STATE_ERR
-PASS ename is 'InvalidStateError'
-Exception message: Failed to execute 'objectStore' on 'IDBTransaction': The transaction has finished.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'objectStore' on 'IDBTransaction': The transaction is inactive or finished.
Expecting exception from store.index('index')
PASS Exception was thrown.
-PASS code is DOMException.INVALID_STATE_ERR
-PASS ename is 'InvalidStateError'
-Exception message: Failed to execute 'index' on 'IDBObjectStore': The transaction has finished.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'index' on 'IDBObjectStore': The transaction is inactive or finished.
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/storage/indexeddb/transaction-read-only-expected.txt (193509 => 193510)
--- trunk/LayoutTests/storage/indexeddb/transaction-read-only-expected.txt 2015-12-05 04:31:49 UTC (rev 193509)
+++ trunk/LayoutTests/storage/indexeddb/transaction-read-only-expected.txt 2015-12-05 05:25:11 UTC (rev 193510)
@@ -15,13 +15,13 @@
PASS Exception was thrown.
PASS code is 0
PASS ename is 'ReadOnlyError'
-Exception message: ReadOnlyError: DOM IDBDatabase Exception 0
+Exception message: Failed to store record in an IDBObjectStore: The transaction is read-only.
trans = db.transaction('store')
Expecting exception from trans.objectStore('store').delete('x')
PASS Exception was thrown.
PASS code is 0
PASS ename is 'ReadOnlyError'
-Exception message: ReadOnlyError: DOM IDBDatabase Exception 0
+Exception message: Failed to execute 'delete' on 'IDBObjectStore': The transaction is read-only.
trans = db.transaction('store')
cur = trans.objectStore('store').openCursor()
PASS !event.target.result is false
@@ -29,7 +29,7 @@
PASS Exception was thrown.
PASS code is 0
PASS ename is 'ReadOnlyError'
-Exception message: ReadOnlyError: DOM IDBDatabase Exception 0
+Exception message: Failed to execute 'delete' on 'IDBCursor': The record may not be deleted inside a read-only transaction.
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/Source/WebCore/ChangeLog (193509 => 193510)
--- trunk/Source/WebCore/ChangeLog 2015-12-05 04:31:49 UTC (rev 193509)
+++ trunk/Source/WebCore/ChangeLog 2015-12-05 05:25:11 UTC (rev 193510)
@@ -1,3 +1,15 @@
+2015-12-04 Brady Eidson <beid...@apple.com>
+
+ Modern IDB: Add some more custom exception messages, passing some more tests.
+ https://bugs.webkit.org/show_bug.cgi?id=151898
+
+ Reviewed by Alex Christensen.
+
+ No new tests (Some failing tests now pass).
+
+ * Modules/indexeddb/client/IDBTransactionImpl.cpp:
+ (WebCore::IDBClient::IDBTransaction::objectStore):
+
2015-12-04 Brent Fulgham <bfulg...@apple.com>
Place an upper bound on canvas pixel count
Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp (193509 => 193510)
--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp 2015-12-05 04:31:49 UTC (rev 193509)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp 2015-12-05 05:25:11 UTC (rev 193510)
@@ -126,7 +126,8 @@
LOG(IndexedDB, "IDBTransaction::objectStore");
if (isFinishedOrFinishing()) {
- ec.code = IDBDatabaseException::InvalidStateError;
+ ec.code = IDBDatabaseException::TransactionInactiveError;
+ ec.message = ASCIILiteral("Failed to execute 'objectStore' on 'IDBTransaction': The transaction is inactive or finished.");
return nullptr;
}