haikuwebkit/LayoutTests/storage/indexeddb/cursor-key-order-expected.txt

903 lines
33 KiB
Plaintext
Raw Permalink Normal View History

IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
Test IndexedDB keys ordering and readback from cursors.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
IndexedDB layout tests: factor out prefix-handling-code https://bugs.webkit.org/show_bug.cgi?id=80664 This makes our tests vendor neutral so that we can load them in any browser to check what that browser does. Also changed some instances of 'window' to 'self' so that they are more worker friendly. Reviewed by Tony Chang. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-shared-workers-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/constants-expected.txt: * storage/indexeddb/constants.html: * storage/indexeddb/create-and-remove-object-store-expected.txt: * storage/indexeddb/create-and-remove-object-store.html: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/create-object-store-options.html: * storage/indexeddb/createObjectStore-name-argument-required-expected.txt: * storage/indexeddb/createObjectStore-name-argument-required.html: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/createObjectStore-null-name.html: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue.html: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-delete.html: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-inconsistency.html: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-index-delete.html: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-key-order.html: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order.html: * storage/indexeddb/cursor-reverse-bug-expected.txt: * storage/indexeddb/cursor-reverse-bug.html: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-skip-deleted.html: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/cursor-update-value-argument-required-expected.txt: * storage/indexeddb/cursor-update-value-argument-required.html: * storage/indexeddb/cursor-update.html: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/data-corruption.html: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/database-basics.html: * storage/indexeddb/database-name-undefined-expected.txt: * storage/indexeddb/database-name-undefined.html: * storage/indexeddb/database-odd-names-expected.txt: * storage/indexeddb/database-odd-names.html: * storage/indexeddb/database-quota-expected.txt: * storage/indexeddb/database-quota.html: * storage/indexeddb/delete-closed-database-object-expected.txt: * storage/indexeddb/delete-closed-database-object.html: * storage/indexeddb/delete-range-expected.txt: * storage/indexeddb/delete-range.html: * storage/indexeddb/deleteIndex-expected.txt: * storage/indexeddb/deleteIndex.html: * storage/indexeddb/deleteObjectStore-name-argument-required-expected.txt: * storage/indexeddb/deleteObjectStore-name-argument-required.html: * storage/indexeddb/deleteObjectStore-null-name-expected.txt: * storage/indexeddb/deleteObjectStore-null-name.html: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/duplicates.html: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/error-causes-abort-by-default.html: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/exception-in-event-aborts.html: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-basics.html: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/factory-deletedatabase-interactions-expected.txt: * storage/indexeddb/factory-deletedatabase-interactions.html: * storage/indexeddb/factory-deletedatabase.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-count.html: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-cursor.html: * storage/indexeddb/index-get-key-argument-required-expected.txt: * storage/indexeddb/index-get-key-argument-required.html: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-multientry.html: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-population.html: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/index-unique.html: * storage/indexeddb/invalid-keys-expected.txt: * storage/indexeddb/invalid-keys.html: * storage/indexeddb/key-generator-expected.txt: * storage/indexeddb/key-generator.html: * storage/indexeddb/key-sort-order-across-types-expected.txt: * storage/indexeddb/key-sort-order-across-types.html: * storage/indexeddb/key-sort-order-date-expected.txt: * storage/indexeddb/key-sort-order-date.html: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/key-type-array.html: * storage/indexeddb/key-type-infinity-expected.txt: * storage/indexeddb/key-type-infinity.html: * storage/indexeddb/keypath-basics-expected.txt: * storage/indexeddb/keypath-basics.html: * storage/indexeddb/keypath-edges-expected.txt: * storage/indexeddb/keypath-edges.html: * storage/indexeddb/keypath-fetch-key-expected.txt: * storage/indexeddb/keypath-fetch-key.html: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange-required-arguments-expected.txt: * storage/indexeddb/keyrange-required-arguments.html: * storage/indexeddb/keyrange.html: * storage/indexeddb/list-ordering-expected.txt: * storage/indexeddb/list-ordering.html: * storage/indexeddb/mozilla/add-twice-failure-expected.txt: * storage/indexeddb/mozilla/add-twice-failure.html: * storage/indexeddb/mozilla/autoincrement-indexes-expected.txt: * storage/indexeddb/mozilla/autoincrement-indexes.html: * storage/indexeddb/mozilla/bad-keypath-expected.txt: * storage/indexeddb/mozilla/bad-keypath.html: * storage/indexeddb/mozilla/clear-expected.txt: * storage/indexeddb/mozilla/clear.html: * storage/indexeddb/mozilla/create-index-unique-expected.txt: * storage/indexeddb/mozilla/create-index-unique.html: * storage/indexeddb/mozilla/create-index-with-integer-keys-expected.txt: * storage/indexeddb/mozilla/create-index-with-integer-keys.html: * storage/indexeddb/mozilla/create-objectstore-basics-expected.txt: * storage/indexeddb/mozilla/create-objectstore-basics.html: * storage/indexeddb/mozilla/create-objectstore-null-name-expected.txt: * storage/indexeddb/mozilla/create-objectstore-null-name.html: * storage/indexeddb/mozilla/cursor-mutation-expected.txt: * storage/indexeddb/mozilla/cursor-mutation-objectstore-only-expected.txt: * storage/indexeddb/mozilla/cursor-mutation-objectstore-only.html: * storage/indexeddb/mozilla/cursor-mutation.html: * storage/indexeddb/mozilla/cursor-update-updates-indexes-expected.txt: * storage/indexeddb/mozilla/cursor-update-updates-indexes.html: * storage/indexeddb/mozilla/cursors-expected.txt: * storage/indexeddb/mozilla/cursors.html: * storage/indexeddb/mozilla/delete-result-expected.txt: * storage/indexeddb/mozilla/delete-result.html: * storage/indexeddb/mozilla/event-source-expected.txt: * storage/indexeddb/mozilla/event-source.html: * storage/indexeddb/mozilla/global-data-expected.txt: * storage/indexeddb/mozilla/global-data.html: * storage/indexeddb/mozilla/indexes-expected.txt: * storage/indexeddb/mozilla/indexes.html: * storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt: * storage/indexeddb/mozilla/key-requirements-delete-null-key.html: * storage/indexeddb/mozilla/key-requirements-expected.txt: * storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt: * storage/indexeddb/mozilla/key-requirements-inline-and-passed.html: * storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt: * storage/indexeddb/mozilla/key-requirements-put-no-key.html: * storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt: * storage/indexeddb/mozilla/key-requirements-put-null-key.html: * storage/indexeddb/mozilla/key-requirements.html: * storage/indexeddb/mozilla/object-cursors-expected.txt: * storage/indexeddb/mozilla/object-cursors.html: * storage/indexeddb/mozilla/object-identity-expected.txt: * storage/indexeddb/mozilla/object-identity.html: * storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put-expected.txt: * storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put.html: * storage/indexeddb/mozilla/object-store-remove-values-expected.txt: * storage/indexeddb/mozilla/object-store-remove-values.html: * storage/indexeddb/mozilla/objectstorenames-expected.txt: * storage/indexeddb/mozilla/objectstorenames.html: * storage/indexeddb/mozilla/odd-result-order-expected.txt: * storage/indexeddb/mozilla/odd-result-order.html: * storage/indexeddb/mozilla/open-database-null-name-expected.txt: * storage/indexeddb/mozilla/open-database-null-name.html: * storage/indexeddb/mozilla/put-get-values-expected.txt: * storage/indexeddb/mozilla/put-get-values.html: * storage/indexeddb/mozilla/readonly-transactions-expected.txt: * storage/indexeddb/mozilla/readonly-transactions.html: * storage/indexeddb/mozilla/readwrite-transactions-expected.txt: * storage/indexeddb/mozilla/readwrite-transactions.html: * storage/indexeddb/mozilla/readyState-expected.txt: * storage/indexeddb/mozilla/readyState.html: * storage/indexeddb/mozilla/remove-index-expected.txt: * storage/indexeddb/mozilla/remove-index.html: * storage/indexeddb/mozilla/remove-objectstore-expected.txt: * storage/indexeddb/mozilla/remove-objectstore.html: * storage/indexeddb/mozilla/versionchange-abort-expected.txt: * storage/indexeddb/mozilla/versionchange-abort.html: * storage/indexeddb/mozilla/versionchange-expected.txt: * storage/indexeddb/mozilla/versionchange.html: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/mutating-cursor.html: * storage/indexeddb/objectStore-required-arguments-expected.txt: * storage/indexeddb/objectStore-required-arguments.html: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-autoincrement.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-clear.html: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-count.html: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-cursor.html: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/objectstore-removeobjectstore.html: * storage/indexeddb/odd-strings-expected.txt: * storage/indexeddb/odd-strings.html: * storage/indexeddb/open-close-version-expected.txt: * storage/indexeddb/open-close-version.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: * storage/indexeddb/open-during-transaction-expected.txt: * storage/indexeddb/open-during-transaction.html: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/prefetch-bugfix-108071.html: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/queued-commands.html: * storage/indexeddb/readonly-expected.txt: * storage/indexeddb/readonly-properties-expected.txt: * storage/indexeddb/readonly-properties.html: * storage/indexeddb/readonly.html: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/request-event-propagation.html: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/index-basics.js: (test): * storage/indexeddb/resources/objectstore-basics.js: (test): (setVersionSuccess): (createIndex): (addData): (addAgainFailure): (removeSuccessButNotThere): (testPreConditions.request.onsuccess): (testPreConditions): * storage/indexeddb/resources/shared.js: (removeVendorPrefixes): * storage/indexeddb/resources/transaction-abort-workers.js: (transactionAborted): (transactionCompleted): (timeoutTest.transaction.onabort): (timeoutTest): (errorTransactionAborted): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/setVersion-null.html: * storage/indexeddb/setVersion-undefined-expected.txt: * storage/indexeddb/setVersion-undefined.html: * storage/indexeddb/set_version_blocked-expected.txt: * storage/indexeddb/set_version_blocked.html: * storage/indexeddb/set_version_queue-expected.txt: * storage/indexeddb/set_version_queue.html: * storage/indexeddb/structured-clone-expected.txt: * storage/indexeddb/structured-clone.html: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-abort-with-js-recursion-cross-frame-expected.txt: * storage/indexeddb/transaction-abort-with-js-recursion-cross-frame.html: * storage/indexeddb/transaction-abort-with-js-recursion-expected.txt: * storage/indexeddb/transaction-abort-with-js-recursion.html: * storage/indexeddb/transaction-abort-workers-expected.txt: * storage/indexeddb/transaction-abort.html: * storage/indexeddb/transaction-after-close-expected.txt: * storage/indexeddb/transaction-after-close.html: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls.html: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-basics.html: * storage/indexeddb/transaction-crash-on-abort-expected.txt: * storage/indexeddb/transaction-crash-on-abort.html: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-event-propagation.html: * storage/indexeddb/transaction-read-only-expected.txt: * storage/indexeddb/transaction-read-only.html: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/transaction-rollback.html: * storage/indexeddb/transaction-storeNames-required-expected.txt: * storage/indexeddb/transaction-storeNames-required.html: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/two-version-changes.html: * storage/indexeddb/value-undefined-expected.txt: * storage/indexeddb/value-undefined.html: * storage/indexeddb/values-odd-types-expected.txt: * storage/indexeddb/values-odd-types.html: * storage/indexeddb/version-change-abort-expected.txt: * storage/indexeddb/version-change-abort.html: * storage/indexeddb/version-change-exclusive-expected.txt: * storage/indexeddb/version-change-exclusive.html: * storage/indexeddb/versionchangerequest-activedomobject-expected.txt: * storage/indexeddb/versionchangerequest-activedomobject.html: Canonical link: https://commits.webkit.org/98319@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-14 21:20:56 +00:00
indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
indexedDB.deleteDatabase(dbname)
indexedDB.open(dbname)
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
db.createObjectStore('store')
populating store...
IndexedDB: Replace numeric constants with strings https://bugs.webkit.org/show_bug.cgi?id=84894 Patch by Alec Flett <alecflett@chromium.org> on 2012-05-07 Reviewed by Tony Chang. Source/WebCore: Test: storage/indexeddb/legacy-constants.html Update IDBObjectStore.openCursor, IDBIndex.openCursor, IDBIndex.openKeyCursor, IDBDatabase.transaction, IDBCursor.direction, IDBTransaction.mode, and IDBRequest.readyState to meet the latest spec. All of these APIs now support string-based values in addition to the legacy/deprecated enum-based values. * Modules/indexeddb/IDBCursor.cpp: (WebCore): (WebCore::IDBCursor::direction): (WebCore::IDBCursor::stringToDirection): (WebCore::IDBCursor::directionToString): * Modules/indexeddb/IDBCursor.h: (IDBCursor): * Modules/indexeddb/IDBCursor.idl: * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::transaction): (WebCore): * Modules/indexeddb/IDBDatabase.h: (IDBDatabase): * Modules/indexeddb/IDBDatabase.idl: * Modules/indexeddb/IDBIndex.cpp: (WebCore::IDBIndex::openCursor): (WebCore): (WebCore::IDBIndex::openKeyCursor): * Modules/indexeddb/IDBIndex.h: (WebCore::IDBIndex::openCursor): (IDBIndex): (WebCore::IDBIndex::openKeyCursor): * Modules/indexeddb/IDBIndex.idl: * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::openCursor): (WebCore): * Modules/indexeddb/IDBObjectStore.h: (WebCore::IDBObjectStore::openCursor): (IDBObjectStore): * Modules/indexeddb/IDBObjectStore.idl: * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::IDBRequest): (WebCore::IDBRequest::readyState): (WebCore::IDBRequest::markEarlyDeath): (WebCore::IDBRequest::resetReadyState): (WebCore::IDBRequest::abort): (WebCore::IDBRequest::finishCursor): (WebCore::IDBRequest::onSuccess): (WebCore::IDBRequest::stop): * Modules/indexeddb/IDBRequest.h: * Modules/indexeddb/IDBRequest.idl: * Modules/indexeddb/IDBTransaction.cpp: (WebCore): (WebCore::IDBTransaction::mode): (WebCore::IDBTransaction::stringToMode): (WebCore::IDBTransaction::modeToString): * Modules/indexeddb/IDBTransaction.h: (IDBTransaction): * Modules/indexeddb/IDBTransaction.idl: LayoutTests: New test for legacy constants (legacy-constants) and update all other tests to use the new string-based constants. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/constants-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-advance-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-prev-no-duplicate-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-reverse-bug-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-quota-expected.txt: * storage/indexeddb/delete-range-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-generator-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keypath-edges-expected.txt: * storage/indexeddb/keypath-intrinsic-properties-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: Added. * storage/indexeddb/legacy-constants.html: Added. * storage/indexeddb/mozilla/clear-expected.txt: * storage/indexeddb/mozilla/create-index-unique-expected.txt: * storage/indexeddb/mozilla/create-objectstore-basics-expected.txt: * storage/indexeddb/mozilla/cursor-mutation-expected.txt: * storage/indexeddb/mozilla/cursor-mutation-objectstore-only-expected.txt: * storage/indexeddb/mozilla/cursors-expected.txt: * storage/indexeddb/mozilla/index-prev-no-duplicate-expected.txt: * storage/indexeddb/mozilla/index-prev-no-duplicate.html: * storage/indexeddb/mozilla/indexes-expected.txt: * storage/indexeddb/mozilla/odd-result-order-expected.txt: * storage/indexeddb/mozilla/readwrite-transactions-expected.txt: * storage/indexeddb/mozilla/readyState-expected.txt: * storage/indexeddb/mozilla/resources/clear.js: (clear): * storage/indexeddb/mozilla/resources/create-index-unique.js: (createAndVerifyIndex): * storage/indexeddb/mozilla/resources/create-objectstore-basics.js: (cleanDatabase): * storage/indexeddb/mozilla/resources/cursor-mutation-objectstore-only.js: (checkCursorResultsAndSetupMutatingCursor): * storage/indexeddb/mozilla/resources/cursor-mutation.js: (setupMutatingCursor): * storage/indexeddb/mozilla/resources/cursors.js: * storage/indexeddb/mozilla/resources/indexes.js: * storage/indexeddb/mozilla/resources/odd-result-order.js: (addRecord): (deleteRecord): * storage/indexeddb/mozilla/resources/readwrite-transactions.js: (setVersionComplete): (postAdd): (postAdd2): (postPut): (postPut2): (postPut3): (postPut4): (postDelete): (postDelete2): * storage/indexeddb/mozilla/resources/readyState.js: (test): (openSuccess): (setupObjectStore): (getRecord): (finalCheck): * storage/indexeddb/mozilla/resources/versionchange.js: (postSetVersion): (postSetVersion2): * storage/indexeddb/mozilla/versionchange-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/noblobs-expected.txt: * storage/indexeddb/noblobs.html: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-during-transaction-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/readonly-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/constants.js: (test): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/cursor-added-bug.js: (openCursor): * storage/indexeddb/resources/cursor-advance.js: (runTest): (testAdvanceIndexNoDupe): (testAdvanceIndexPrev): (testAdvanceIndexPrevNoDupe): * storage/indexeddb/resources/cursor-continue-validity.js: (continueTest): (continueIndexTest): (testModifyContinueOrder): * storage/indexeddb/resources/cursor-continue.js: (ascendingTest): (descendingTest): * storage/indexeddb/resources/cursor-delete.js: (openCursor): (addObject): * storage/indexeddb/resources/cursor-inconsistency.js: (openBasicCursor): * storage/indexeddb/resources/cursor-index-delete.js: (openCursor): (addObject): * storage/indexeddb/resources/cursor-key-order.js: * storage/indexeddb/resources/cursor-prev-no-duplicate.js: (populateStore): (testFarRangeCursor_closed): (testFarRangeCursor_open): (testFarRangeCursor_indexClosed): (testFarRangeCursor_indexOpen): (testFarRangeCursor_indexKeyOpen): (testFarRangeCursor_indexKeyClosed): (testBoundaryCursor_closed): (testBoundaryCursor_open): (testBoundaryCursor_indexClosed): (testBoundaryCursor_indexOpen): (testBoundaryCursor_indexKeyClosed): (testBoundaryCursor_indexKeyOpen): (testNoDuplicate_closed): (testNoDuplicate_open): (testNoDuplicate_indexKeyClosed): * storage/indexeddb/resources/cursor-primary-key-order.js: (populateStore): * storage/indexeddb/resources/cursor-reverse-bug.js: (populateStore): (testCursor): * storage/indexeddb/resources/cursor-skip-deleted.js: (basicCursorTest): (reverseCursorTest): * storage/indexeddb/resources/cursor-update.js: (openBasicCursor): * storage/indexeddb/resources/data-corruption.js: (addData): (getData): * storage/indexeddb/resources/database-quota.js: (checkQuotaEnforcing): * storage/indexeddb/resources/delete-range.js: (runTests.nextTest): (runTests): * storage/indexeddb/resources/error-causes-abort-by-default.js: (addData): (transactionCompleted): (transactionAborted1): * storage/indexeddb/resources/exception-in-event-aborts.js: (startTest): (transactionAborted1): (transactionAborted2): * storage/indexeddb/resources/factory-deletedatabase.js: (getValue): * storage/indexeddb/resources/index-count.js: * storage/indexeddb/resources/index-cursor.js: (runNextTest): (testNullKeyRange): * storage/indexeddb/resources/index-multientry.js: * storage/indexeddb/resources/index-unique.js: (setVersionCompleted): * storage/indexeddb/resources/key-generator.js: (.): * storage/indexeddb/resources/key-type-array.js: * storage/indexeddb/resources/keypath-edges.js: * storage/indexeddb/resources/keypath-intrinsic-properties.js: * storage/indexeddb/resources/legacy-constants.js: Added. (test): (prepareDatabase.openreq.onsuccess.verreq.onsuccess): (prepareDatabase.openreq.onsuccess): (prepareDatabase): (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (openForwardCursor): (openReverseCursor): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionCompleted): * storage/indexeddb/resources/objectstore-basics.js: (addData): (addAgainFailure): * storage/indexeddb/resources/objectstore-count.js: * storage/indexeddb/resources/objectstore-cursor.js: (runNextTest): (testNullKeyRange): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): * storage/indexeddb/resources/open-during-transaction.js: * storage/indexeddb/resources/opencursor-key.js: * storage/indexeddb/resources/prefetch-bugfix-108071.js: * storage/indexeddb/resources/request-event-propagation.js: (startTest): (transactionAborted): (transactionAborted2): * storage/indexeddb/resources/set_version_blocked.js: (blocked): * storage/indexeddb/resources/transaction-abort.js: (startTest): * storage/indexeddb/resources/transaction-after-close.js: (runFirstRegularTransaction): (firstTransactionComplete): (onSecondOpen): * storage/indexeddb/resources/transaction-basics.js: (testInvalidMode): * storage/indexeddb/resources/transaction-event-propagation.js: (startTest): (dbAbortBubbleCallback): * storage/indexeddb/resources/transaction-rollback.js: (setVersionComplete): (abortCallback): * storage/indexeddb/set_version_blocked-expected.txt: * storage/indexeddb/structured-clone-expected.txt: * storage/indexeddb/structured-clone.html: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-abort-with-js-recursion-cross-frame-expected.txt: * storage/indexeddb/transaction-abort-with-js-recursion-cross-frame.html: * storage/indexeddb/transaction-abort-with-js-recursion-expected.txt: * storage/indexeddb/transaction-abort-with-js-recursion.html: * storage/indexeddb/transaction-after-close-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/tutorial.html: Canonical link: https://commits.webkit.org/103395@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@116337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-07 19:12:00 +00:00
trans = db.transaction('store', 'readwrite')
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
store = trans.objectStore('store');
store.put(0, -Infinity)
store.put(1, -Number.MAX_VALUE)
store.put(2, -1)
store.put(3, -Number.MIN_VALUE)
store.put(4, 0)
store.put(5, Number.MIN_VALUE)
store.put(6, 1)
store.put(7, Number.MAX_VALUE)
store.put(8, Infinity)
store.put(9, new Date(0))
store.put(10, new Date(1000))
store.put(11, new Date(1317399931023))
store.put(12, '')
store.put(13, '')
store.put(14, 'a')
store.put(15, 'aa')
store.put(16, 'b')
store.put(17, 'ba')
store.put(18, '¢')
store.put(19, '水')
store.put(20, '𝄞')
store.put(21, '<27>')
store.put(22, [])
store.put(23, [-Infinity])
store.put(24, [-Number.MAX_VALUE])
store.put(25, [-1])
store.put(26, [-Number.MIN_VALUE])
store.put(27, [0])
store.put(28, [Number.MIN_VALUE])
store.put(29, [1])
store.put(30, [Number.MAX_VALUE])
store.put(31, [Infinity])
store.put(32, [new Date(0)])
store.put(33, [new Date(1000)])
store.put(34, [new Date(1317399931023)])
store.put(35, [''])
store.put(36, [''])
store.put(37, ['a'])
store.put(38, ['aa'])
store.put(39, ['b'])
store.put(40, ['ba'])
store.put(41, ['¢'])
store.put(42, ['水'])
store.put(43, ['𝄞'])
store.put(44, ['<27>'])
store.put(45, [[]])
store.put(46, [[], []])
store.put(47, [[], [], []])
store.put(48, [[[]]])
store.put(49, [[[[]]]])
iterating cursor...
IndexedDB: Replace numeric constants with strings https://bugs.webkit.org/show_bug.cgi?id=84894 Patch by Alec Flett <alecflett@chromium.org> on 2012-05-07 Reviewed by Tony Chang. Source/WebCore: Test: storage/indexeddb/legacy-constants.html Update IDBObjectStore.openCursor, IDBIndex.openCursor, IDBIndex.openKeyCursor, IDBDatabase.transaction, IDBCursor.direction, IDBTransaction.mode, and IDBRequest.readyState to meet the latest spec. All of these APIs now support string-based values in addition to the legacy/deprecated enum-based values. * Modules/indexeddb/IDBCursor.cpp: (WebCore): (WebCore::IDBCursor::direction): (WebCore::IDBCursor::stringToDirection): (WebCore::IDBCursor::directionToString): * Modules/indexeddb/IDBCursor.h: (IDBCursor): * Modules/indexeddb/IDBCursor.idl: * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::transaction): (WebCore): * Modules/indexeddb/IDBDatabase.h: (IDBDatabase): * Modules/indexeddb/IDBDatabase.idl: * Modules/indexeddb/IDBIndex.cpp: (WebCore::IDBIndex::openCursor): (WebCore): (WebCore::IDBIndex::openKeyCursor): * Modules/indexeddb/IDBIndex.h: (WebCore::IDBIndex::openCursor): (IDBIndex): (WebCore::IDBIndex::openKeyCursor): * Modules/indexeddb/IDBIndex.idl: * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::openCursor): (WebCore): * Modules/indexeddb/IDBObjectStore.h: (WebCore::IDBObjectStore::openCursor): (IDBObjectStore): * Modules/indexeddb/IDBObjectStore.idl: * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::IDBRequest): (WebCore::IDBRequest::readyState): (WebCore::IDBRequest::markEarlyDeath): (WebCore::IDBRequest::resetReadyState): (WebCore::IDBRequest::abort): (WebCore::IDBRequest::finishCursor): (WebCore::IDBRequest::onSuccess): (WebCore::IDBRequest::stop): * Modules/indexeddb/IDBRequest.h: * Modules/indexeddb/IDBRequest.idl: * Modules/indexeddb/IDBTransaction.cpp: (WebCore): (WebCore::IDBTransaction::mode): (WebCore::IDBTransaction::stringToMode): (WebCore::IDBTransaction::modeToString): * Modules/indexeddb/IDBTransaction.h: (IDBTransaction): * Modules/indexeddb/IDBTransaction.idl: LayoutTests: New test for legacy constants (legacy-constants) and update all other tests to use the new string-based constants. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/constants-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-advance-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-prev-no-duplicate-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-reverse-bug-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-quota-expected.txt: * storage/indexeddb/delete-range-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-generator-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keypath-edges-expected.txt: * storage/indexeddb/keypath-intrinsic-properties-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: Added. * storage/indexeddb/legacy-constants.html: Added. * storage/indexeddb/mozilla/clear-expected.txt: * storage/indexeddb/mozilla/create-index-unique-expected.txt: * storage/indexeddb/mozilla/create-objectstore-basics-expected.txt: * storage/indexeddb/mozilla/cursor-mutation-expected.txt: * storage/indexeddb/mozilla/cursor-mutation-objectstore-only-expected.txt: * storage/indexeddb/mozilla/cursors-expected.txt: * storage/indexeddb/mozilla/index-prev-no-duplicate-expected.txt: * storage/indexeddb/mozilla/index-prev-no-duplicate.html: * storage/indexeddb/mozilla/indexes-expected.txt: * storage/indexeddb/mozilla/odd-result-order-expected.txt: * storage/indexeddb/mozilla/readwrite-transactions-expected.txt: * storage/indexeddb/mozilla/readyState-expected.txt: * storage/indexeddb/mozilla/resources/clear.js: (clear): * storage/indexeddb/mozilla/resources/create-index-unique.js: (createAndVerifyIndex): * storage/indexeddb/mozilla/resources/create-objectstore-basics.js: (cleanDatabase): * storage/indexeddb/mozilla/resources/cursor-mutation-objectstore-only.js: (checkCursorResultsAndSetupMutatingCursor): * storage/indexeddb/mozilla/resources/cursor-mutation.js: (setupMutatingCursor): * storage/indexeddb/mozilla/resources/cursors.js: * storage/indexeddb/mozilla/resources/indexes.js: * storage/indexeddb/mozilla/resources/odd-result-order.js: (addRecord): (deleteRecord): * storage/indexeddb/mozilla/resources/readwrite-transactions.js: (setVersionComplete): (postAdd): (postAdd2): (postPut): (postPut2): (postPut3): (postPut4): (postDelete): (postDelete2): * storage/indexeddb/mozilla/resources/readyState.js: (test): (openSuccess): (setupObjectStore): (getRecord): (finalCheck): * storage/indexeddb/mozilla/resources/versionchange.js: (postSetVersion): (postSetVersion2): * storage/indexeddb/mozilla/versionchange-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/noblobs-expected.txt: * storage/indexeddb/noblobs.html: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-during-transaction-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/readonly-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/constants.js: (test): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/cursor-added-bug.js: (openCursor): * storage/indexeddb/resources/cursor-advance.js: (runTest): (testAdvanceIndexNoDupe): (testAdvanceIndexPrev): (testAdvanceIndexPrevNoDupe): * storage/indexeddb/resources/cursor-continue-validity.js: (continueTest): (continueIndexTest): (testModifyContinueOrder): * storage/indexeddb/resources/cursor-continue.js: (ascendingTest): (descendingTest): * storage/indexeddb/resources/cursor-delete.js: (openCursor): (addObject): * storage/indexeddb/resources/cursor-inconsistency.js: (openBasicCursor): * storage/indexeddb/resources/cursor-index-delete.js: (openCursor): (addObject): * storage/indexeddb/resources/cursor-key-order.js: * storage/indexeddb/resources/cursor-prev-no-duplicate.js: (populateStore): (testFarRangeCursor_closed): (testFarRangeCursor_open): (testFarRangeCursor_indexClosed): (testFarRangeCursor_indexOpen): (testFarRangeCursor_indexKeyOpen): (testFarRangeCursor_indexKeyClosed): (testBoundaryCursor_closed): (testBoundaryCursor_open): (testBoundaryCursor_indexClosed): (testBoundaryCursor_indexOpen): (testBoundaryCursor_indexKeyClosed): (testBoundaryCursor_indexKeyOpen): (testNoDuplicate_closed): (testNoDuplicate_open): (testNoDuplicate_indexKeyClosed): * storage/indexeddb/resources/cursor-primary-key-order.js: (populateStore): * storage/indexeddb/resources/cursor-reverse-bug.js: (populateStore): (testCursor): * storage/indexeddb/resources/cursor-skip-deleted.js: (basicCursorTest): (reverseCursorTest): * storage/indexeddb/resources/cursor-update.js: (openBasicCursor): * storage/indexeddb/resources/data-corruption.js: (addData): (getData): * storage/indexeddb/resources/database-quota.js: (checkQuotaEnforcing): * storage/indexeddb/resources/delete-range.js: (runTests.nextTest): (runTests): * storage/indexeddb/resources/error-causes-abort-by-default.js: (addData): (transactionCompleted): (transactionAborted1): * storage/indexeddb/resources/exception-in-event-aborts.js: (startTest): (transactionAborted1): (transactionAborted2): * storage/indexeddb/resources/factory-deletedatabase.js: (getValue): * storage/indexeddb/resources/index-count.js: * storage/indexeddb/resources/index-cursor.js: (runNextTest): (testNullKeyRange): * storage/indexeddb/resources/index-multientry.js: * storage/indexeddb/resources/index-unique.js: (setVersionCompleted): * storage/indexeddb/resources/key-generator.js: (.): * storage/indexeddb/resources/key-type-array.js: * storage/indexeddb/resources/keypath-edges.js: * storage/indexeddb/resources/keypath-intrinsic-properties.js: * storage/indexeddb/resources/legacy-constants.js: Added. (test): (prepareDatabase.openreq.onsuccess.verreq.onsuccess): (prepareDatabase.openreq.onsuccess): (prepareDatabase): (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (openForwardCursor): (openReverseCursor): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionCompleted): * storage/indexeddb/resources/objectstore-basics.js: (addData): (addAgainFailure): * storage/indexeddb/resources/objectstore-count.js: * storage/indexeddb/resources/objectstore-cursor.js: (runNextTest): (testNullKeyRange): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): * storage/indexeddb/resources/open-during-transaction.js: * storage/indexeddb/resources/opencursor-key.js: * storage/indexeddb/resources/prefetch-bugfix-108071.js: * storage/indexeddb/resources/request-event-propagation.js: (startTest): (transactionAborted): (transactionAborted2): * storage/indexeddb/resources/set_version_blocked.js: (blocked): * storage/indexeddb/resources/transaction-abort.js: (startTest): * storage/indexeddb/resources/transaction-after-close.js: (runFirstRegularTransaction): (firstTransactionComplete): (onSecondOpen): * storage/indexeddb/resources/transaction-basics.js: (testInvalidMode): * storage/indexeddb/resources/transaction-event-propagation.js: (startTest): (dbAbortBubbleCallback): * storage/indexeddb/resources/transaction-rollback.js: (setVersionComplete): (abortCallback): * storage/indexeddb/set_version_blocked-expected.txt: * storage/indexeddb/structured-clone-expected.txt: * storage/indexeddb/structured-clone.html: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-abort-with-js-recursion-cross-frame-expected.txt: * storage/indexeddb/transaction-abort-with-js-recursion-cross-frame.html: * storage/indexeddb/transaction-abort-with-js-recursion-expected.txt: * storage/indexeddb/transaction-abort-with-js-recursion.html: * storage/indexeddb/transaction-after-close-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/tutorial.html: Canonical link: https://commits.webkit.org/103395@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@116337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-07 19:12:00 +00:00
trans = db.transaction('store', 'readonly')
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
store = trans.objectStore('store');
count = 0
curreq = store.openCursor()
cursor = curreq.result
PASS compare(cursor.key, -Infinity) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, -Number.MAX_VALUE) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, -1) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, -Number.MIN_VALUE) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, 0) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, Number.MIN_VALUE) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, 1) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, Number.MAX_VALUE) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, Infinity) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, new Date(0)) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, new Date(1000)) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, new Date(1317399931023)) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, '') is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, '\0') is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, 'a') is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, 'aa') is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, 'b') is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, 'ba') is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, '¢') is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, '水') is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, '𝄞') is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, '<27>') is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, []) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, [-Infinity]) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, [-Number.MAX_VALUE]) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, [-1]) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, [-Number.MIN_VALUE]) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, [0]) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, [Number.MIN_VALUE]) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, [1]) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, [Number.MAX_VALUE]) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, [Infinity]) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, [new Date(0)]) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, [new Date(1000)]) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, [new Date(1317399931023)]) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, ['']) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, ['\0']) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, ['a']) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, ['aa']) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, ['b']) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, ['ba']) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, ['¢']) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, ['水']) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, ['𝄞']) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, ['<27>']) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, [[]]) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, [[], []]) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, [[], [], []]) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, [[[]]]) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
cursor = curreq.result
PASS compare(cursor.key, [[[[]]]]) is true
getreq = store.get(cursor.key)
IndexedDB layout tests should make better use of test library functions https://bugs.webkit.org/show_bug.cgi?id=86932 Reviewed by Ojan Vafai. Use functions like shouldBeEqualToString, shouldBeNull, evalAndExpectException and so forth where possible. * storage/indexeddb/basics-expected.txt: * storage/indexeddb/basics-workers-expected.txt: * storage/indexeddb/create-object-store-options-expected.txt: * storage/indexeddb/createObjectStore-null-name-expected.txt: * storage/indexeddb/cursor-added-bug-expected.txt: * storage/indexeddb/cursor-continue-expected.txt: * storage/indexeddb/cursor-continue-validity-expected.txt: * storage/indexeddb/cursor-delete-expected.txt: * storage/indexeddb/cursor-inconsistency-expected.txt: * storage/indexeddb/cursor-index-delete-expected.txt: * storage/indexeddb/cursor-key-order-expected.txt: * storage/indexeddb/cursor-primary-key-order-expected.txt: * storage/indexeddb/cursor-skip-deleted-expected.txt: * storage/indexeddb/cursor-update-expected.txt: * storage/indexeddb/data-corruption-expected.txt: * storage/indexeddb/database-basics-expected.txt: * storage/indexeddb/duplicates-expected.txt: * storage/indexeddb/error-causes-abort-by-default-expected.txt: * storage/indexeddb/exception-in-event-aborts-expected.txt: * storage/indexeddb/factory-basics-expected.txt: * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-deletedatabase-expected.txt: * storage/indexeddb/get-keyrange-expected.txt: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics-workers-expected.txt: * storage/indexeddb/index-count-expected.txt: * storage/indexeddb/index-cursor-expected.txt: * storage/indexeddb/index-multientry-expected.txt: * storage/indexeddb/index-population-expected.txt: * storage/indexeddb/index-unique-expected.txt: * storage/indexeddb/key-type-array-expected.txt: * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/legacy-constants-expected.txt: * storage/indexeddb/mutating-cursor-expected.txt: * storage/indexeddb/objectstore-autoincrement-expected.txt: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics-workers-expected.txt: * storage/indexeddb/objectstore-clear-expected.txt: * storage/indexeddb/objectstore-count-expected.txt: * storage/indexeddb/objectstore-cursor-expected.txt: * storage/indexeddb/objectstore-removeobjectstore-expected.txt: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/opencursor-key-expected.txt: * storage/indexeddb/prefetch-bugfix-108071-expected.txt: * storage/indexeddb/queued-commands-expected.txt: * storage/indexeddb/request-event-propagation-expected.txt: * storage/indexeddb/resources/basics.js: (test): (openCallback): * storage/indexeddb/resources/create-object-store-options.js: (setVersionComplete): * storage/indexeddb/resources/createObjectStore-null-name.js: (createAndPopulateObjectStore): * storage/indexeddb/resources/cursor-added-bug.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-continue-validity.js: (deleteExisting): * storage/indexeddb/resources/cursor-continue.js: (deleteExisting): * storage/indexeddb/resources/cursor-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-inconsistency.js: (setVersionSuccess): (checkCursor): * storage/indexeddb/resources/cursor-index-delete.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-key-order.js: (checkStore.curreq.onsuccess.getreq.onsuccess): (checkStore.curreq.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-primary-key-order.js: (checkStore.cursorRequest.onsuccess): (checkStore): * storage/indexeddb/resources/cursor-skip-deleted.js: (setVersionSuccess): * storage/indexeddb/resources/cursor-update.js: (setVersionSuccess): (basicUpdateCursor.request.onsuccess): (basicUpdateCursor): (autoIncrementUpdateCursor.request.onsuccess): (autoIncrementUpdateCursor): (keyPathUpdateCursor.request.onsuccess): (keyPathUpdateCursor): (keyCursor): * storage/indexeddb/resources/data-corruption.js: (setVersionSuccess): (doCheck): * storage/indexeddb/resources/database-basics.js: (setVersionSuccess): (createAnotherObjectStore): * storage/indexeddb/resources/database-quota.js: (setVersionSuccess): * storage/indexeddb/resources/duplicates.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (last): * storage/indexeddb/resources/error-causes-abort-by-default.js: (deleteExisting): * storage/indexeddb/resources/exception-in-event-aborts.js: (deleteExisting): * storage/indexeddb/resources/factory-basics.js: (test): * storage/indexeddb/resources/factory-cmp.js: (test): (testValidKeys): (testIdenticalKeys): * storage/indexeddb/resources/factory-deletedatabase.js: (deleteExisting): * storage/indexeddb/resources/get-keyrange.js: (deleteExisting): * storage/indexeddb/resources/index-basics.js: (deleteExisting): (cursor1Continue): (cursor1Continue2): (cursor1Continue3): (openObjectCursor): (cursor2Continue): (cursor2Continue2): (cursor2Continue3): (last): * storage/indexeddb/resources/index-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/index-cursor.js: (deleteExisting): * storage/indexeddb/resources/index-multientry.js: (prepareDatabase): (verifyIndexes.request.onsuccess): (verifyIndexes): * storage/indexeddb/resources/index-population.js: (setVersion2Abort): * storage/indexeddb/resources/index-unique.js: (deleteExisting): (cursorSuccess): (keyCursorSuccess): * storage/indexeddb/resources/key-type-array.js: (test): * storage/indexeddb/resources/keyrange.js: (test): * storage/indexeddb/resources/legacy-constants.js: (populateStore): (checkNext.request.onsuccess): (checkNext): (checkNextNoDuplicate.request.onsuccess): (checkNextNoDuplicate): (checkPrev.request.onsuccess): (checkPrev): (checkPrevNoDuplicate.request.onsuccess): (checkPrevNoDuplicate): * storage/indexeddb/resources/mutating-cursor.js: (setVersionSuccess): * storage/indexeddb/resources/objectstore-autoincrement.js: (setVersionSuccess): (testLongKeyPath.cursorRequest.onsuccess): (testLongKeyPath): * storage/indexeddb/resources/objectstore-basics.js: (setVersionSuccess): (createIndex): (createAnotherIndex): (addDateSuccess): (addAgainFailure): * storage/indexeddb/resources/objectstore-clear.js: (deleteExisting): * storage/indexeddb/resources/objectstore-count.js: (prepareDatabase): (verifyCount.request.onsuccess): (verifyCount): (verifyCountWithRange.nextTest.request.onsuccess): (verifyCountWithRange.nextTest): (verifyCountWithRange): (verifyCountWithKey.nextTest.request.onsuccess): (verifyCountWithKey.nextTest): (verifyCountWithKey): * storage/indexeddb/resources/objectstore-cursor.js: (deleteExisting): * storage/indexeddb/resources/objectstore-removeobjectstore.js: (deleteExisting): (deleteObjectStore): * storage/indexeddb/resources/open-cursor.js: (cursorWithKeySuccess): (cursorSuccess): (setVersionSuccess): * storage/indexeddb/resources/opencursor-key.js: (testObjectStore.request.onsuccess): (testObjectStore): (testIndex.request.onsuccess): (testIndex): (testIndexWithKey.request.onsuccess): (testIndexWithKey): * storage/indexeddb/resources/prefetch-bugfix-108071.js: (setVersionSuccess): * storage/indexeddb/resources/queued-commands.js: * storage/indexeddb/resources/request-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/setVersion-null.js: (postSetVersion): * storage/indexeddb/resources/shared.js: (evalAndExpectExceptionClass): * storage/indexeddb/resources/transaction-abort.js: (deleteExisting): * storage/indexeddb/resources/transaction-and-objectstore-calls.js: (created): (afterComplete): * storage/indexeddb/resources/transaction-basics.js: (addRemoveIDBObjects): (addRemoveAddIDBObjects): (addIDBObjects): (addIDBObjectsAndCommit): (removeIDBObjects): (setVersionSuccess): (testDOMStringList): * storage/indexeddb/resources/transaction-event-propagation.js: (deleteExisting): * storage/indexeddb/resources/transaction-rollback.js: (addSuccess): (getSuccess): * storage/indexeddb/resources/two-version-changes.js: (test): * storage/indexeddb/resources/values-odd-types.js: (openACursor.request.onsuccess): (openACursor): * storage/indexeddb/setVersion-null-expected.txt: * storage/indexeddb/transaction-abort-expected.txt: * storage/indexeddb/transaction-and-objectstore-calls-expected.txt: * storage/indexeddb/transaction-basics-expected.txt: * storage/indexeddb/transaction-event-propagation-expected.txt: * storage/indexeddb/transaction-rollback-expected.txt: * storage/indexeddb/two-version-changes-expected.txt: * storage/indexeddb/values-odd-types-expected.txt: Canonical link: https://commits.webkit.org/104601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-05-19 23:36:46 +00:00
PASS getreq.result is count++
PASS count is keys.length
IndexedDB: implement compound (array) key support https://bugs.webkit.org/show_bug.cgi?id=62284 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-08 Reviewed by Tony Chang. Source/WebCore: Add support for Array values as IDBKeys. (Multirow indexes are still not yet supported.) Tests: storage/indexeddb/cursor-key-order.html storage/indexeddb/key-type-array.html * bindings/js/JSIDBKeyCustom.cpp: (WebCore::toJS): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue): * bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8): * storage/IDBKey.cpp: (WebCore::IDBKey::compare): * storage/IDBKey.h: (WebCore::IDBKey::createArray): (WebCore::IDBKey::valid): (WebCore::IDBKey::array): (WebCore::IDBKey::compareTypes): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::keyTypeByteToKeyType): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): * storage/IDBLevelDBCoding.h: Source/WebKit/chromium: Extend WebKit API to support Array values as IDBKeys. * public/WebIDBKey.h: * src/AssertMatchingEnums.cpp: * src/WebIDBKey.cpp: (WebKit::WebIDBKey::createArray): (WebKit::convertFromWebIDBKeyArray): (WebKit::convertToWebIDBKeyArray): (WebKit::WebIDBKey::assignArray): (WebKit::WebIDBKey::array): * tests/IDBBindingUtilitiesTest.cpp: (WebCore::TEST): * tests/IDBLevelDBCodingTest.cpp: (IDBLevelDBCoding::createArrayIDBKey): (IDBLevelDBCoding::TEST): (IDBLevelDBCoding::compareStrings): LayoutTests: * storage/indexeddb/cursor-key-order-expected.txt: Added. * storage/indexeddb/cursor-key-order.html: Added. * storage/indexeddb/factory-cmp-expected.txt: * storage/indexeddb/factory-cmp.html: * storage/indexeddb/index-basics-expected.txt: * storage/indexeddb/index-basics.html: * storage/indexeddb/key-type-array-expected.txt: Added. * storage/indexeddb/key-type-array.html: Added. * storage/indexeddb/keyrange-expected.txt: * storage/indexeddb/keyrange.html: * storage/indexeddb/objectstore-basics-expected.txt: * storage/indexeddb/objectstore-basics.html: * storage/indexeddb/open-cursor-expected.txt: * storage/indexeddb/open-cursor.html: Canonical link: https://commits.webkit.org/88176@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-08 20:51:14 +00:00
validate compare function
PASS compare(undefined, undefined) is true
PASS compare(undefined, true) is false
PASS compare(undefined, false) is false
PASS compare(undefined, 0) is false
PASS compare(undefined, -0) is false
PASS compare(undefined, 123) is false
PASS compare(undefined, Infinity) is false
PASS compare(undefined, -Infinity) is false
PASS compare(undefined, NaN) is false
PASS compare(undefined, '') is false
PASS compare(undefined, 'abc') is false
PASS compare(undefined, 'xyz') is false
PASS compare(undefined, new Date(0)) is false
PASS compare(undefined, new Date(1e3)) is false
PASS compare(undefined, new Date(1e9)) is false
PASS compare(undefined, []) is false
PASS compare(undefined, [123]) is false
PASS compare(undefined, ['abc']) is false
PASS compare(undefined, [123, 'abc']) is false
PASS compare(undefined, ['abc', 123]) is false
PASS compare(undefined, [[]]) is false
PASS compare(undefined, [[123]]) is false
PASS compare(undefined, [['abc']]) is false
PASS compare(undefined, [[123], 'abc']) is false
PASS compare(undefined, [[123], 123]) is false
PASS compare(true, undefined) is false
PASS compare(true, true) is true
PASS compare(true, false) is false
PASS compare(true, 0) is false
PASS compare(true, -0) is false
PASS compare(true, 123) is false
PASS compare(true, Infinity) is false
PASS compare(true, -Infinity) is false
PASS compare(true, NaN) is false
PASS compare(true, '') is false
PASS compare(true, 'abc') is false
PASS compare(true, 'xyz') is false
PASS compare(true, new Date(0)) is false
PASS compare(true, new Date(1e3)) is false
PASS compare(true, new Date(1e9)) is false
PASS compare(true, []) is false
PASS compare(true, [123]) is false
PASS compare(true, ['abc']) is false
PASS compare(true, [123, 'abc']) is false
PASS compare(true, ['abc', 123]) is false
PASS compare(true, [[]]) is false
PASS compare(true, [[123]]) is false
PASS compare(true, [['abc']]) is false
PASS compare(true, [[123], 'abc']) is false
PASS compare(true, [[123], 123]) is false
PASS compare(false, undefined) is false
PASS compare(false, true) is false
PASS compare(false, false) is true
PASS compare(false, 0) is false
PASS compare(false, -0) is false
PASS compare(false, 123) is false
PASS compare(false, Infinity) is false
PASS compare(false, -Infinity) is false
PASS compare(false, NaN) is false
PASS compare(false, '') is false
PASS compare(false, 'abc') is false
PASS compare(false, 'xyz') is false
PASS compare(false, new Date(0)) is false
PASS compare(false, new Date(1e3)) is false
PASS compare(false, new Date(1e9)) is false
PASS compare(false, []) is false
PASS compare(false, [123]) is false
PASS compare(false, ['abc']) is false
PASS compare(false, [123, 'abc']) is false
PASS compare(false, ['abc', 123]) is false
PASS compare(false, [[]]) is false
PASS compare(false, [[123]]) is false
PASS compare(false, [['abc']]) is false
PASS compare(false, [[123], 'abc']) is false
PASS compare(false, [[123], 123]) is false
PASS compare(0, undefined) is false
PASS compare(0, true) is false
PASS compare(0, false) is false
PASS compare(0, 0) is true
PASS compare(0, -0) is false
PASS compare(0, 123) is false
PASS compare(0, Infinity) is false
PASS compare(0, -Infinity) is false
PASS compare(0, NaN) is false
PASS compare(0, '') is false
PASS compare(0, 'abc') is false
PASS compare(0, 'xyz') is false
PASS compare(0, new Date(0)) is false
PASS compare(0, new Date(1e3)) is false
PASS compare(0, new Date(1e9)) is false
PASS compare(0, []) is false
PASS compare(0, [123]) is false
PASS compare(0, ['abc']) is false
PASS compare(0, [123, 'abc']) is false
PASS compare(0, ['abc', 123]) is false
PASS compare(0, [[]]) is false
PASS compare(0, [[123]]) is false
PASS compare(0, [['abc']]) is false
PASS compare(0, [[123], 'abc']) is false
PASS compare(0, [[123], 123]) is false
PASS compare(-0, undefined) is false
PASS compare(-0, true) is false
PASS compare(-0, false) is false
PASS compare(-0, 0) is false
PASS compare(-0, -0) is true
PASS compare(-0, 123) is false
PASS compare(-0, Infinity) is false
PASS compare(-0, -Infinity) is false
PASS compare(-0, NaN) is false
PASS compare(-0, '') is false
PASS compare(-0, 'abc') is false
PASS compare(-0, 'xyz') is false
PASS compare(-0, new Date(0)) is false
PASS compare(-0, new Date(1e3)) is false
PASS compare(-0, new Date(1e9)) is false
PASS compare(-0, []) is false
PASS compare(-0, [123]) is false
PASS compare(-0, ['abc']) is false
PASS compare(-0, [123, 'abc']) is false
PASS compare(-0, ['abc', 123]) is false
PASS compare(-0, [[]]) is false
PASS compare(-0, [[123]]) is false
PASS compare(-0, [['abc']]) is false
PASS compare(-0, [[123], 'abc']) is false
PASS compare(-0, [[123], 123]) is false
PASS compare(123, undefined) is false
PASS compare(123, true) is false
PASS compare(123, false) is false
PASS compare(123, 0) is false
PASS compare(123, -0) is false
PASS compare(123, 123) is true
PASS compare(123, Infinity) is false
PASS compare(123, -Infinity) is false
PASS compare(123, NaN) is false
PASS compare(123, '') is false
PASS compare(123, 'abc') is false
PASS compare(123, 'xyz') is false
PASS compare(123, new Date(0)) is false
PASS compare(123, new Date(1e3)) is false
PASS compare(123, new Date(1e9)) is false
PASS compare(123, []) is false
PASS compare(123, [123]) is false
PASS compare(123, ['abc']) is false
PASS compare(123, [123, 'abc']) is false
PASS compare(123, ['abc', 123]) is false
PASS compare(123, [[]]) is false
PASS compare(123, [[123]]) is false
PASS compare(123, [['abc']]) is false
PASS compare(123, [[123], 'abc']) is false
PASS compare(123, [[123], 123]) is false
PASS compare(Infinity, undefined) is false
PASS compare(Infinity, true) is false
PASS compare(Infinity, false) is false
PASS compare(Infinity, 0) is false
PASS compare(Infinity, -0) is false
PASS compare(Infinity, 123) is false
PASS compare(Infinity, Infinity) is true
PASS compare(Infinity, -Infinity) is false
PASS compare(Infinity, NaN) is false
PASS compare(Infinity, '') is false
PASS compare(Infinity, 'abc') is false
PASS compare(Infinity, 'xyz') is false
PASS compare(Infinity, new Date(0)) is false
PASS compare(Infinity, new Date(1e3)) is false
PASS compare(Infinity, new Date(1e9)) is false
PASS compare(Infinity, []) is false
PASS compare(Infinity, [123]) is false
PASS compare(Infinity, ['abc']) is false
PASS compare(Infinity, [123, 'abc']) is false
PASS compare(Infinity, ['abc', 123]) is false
PASS compare(Infinity, [[]]) is false
PASS compare(Infinity, [[123]]) is false
PASS compare(Infinity, [['abc']]) is false
PASS compare(Infinity, [[123], 'abc']) is false
PASS compare(Infinity, [[123], 123]) is false
PASS compare(-Infinity, undefined) is false
PASS compare(-Infinity, true) is false
PASS compare(-Infinity, false) is false
PASS compare(-Infinity, 0) is false
PASS compare(-Infinity, -0) is false
PASS compare(-Infinity, 123) is false
PASS compare(-Infinity, Infinity) is false
PASS compare(-Infinity, -Infinity) is true
PASS compare(-Infinity, NaN) is false
PASS compare(-Infinity, '') is false
PASS compare(-Infinity, 'abc') is false
PASS compare(-Infinity, 'xyz') is false
PASS compare(-Infinity, new Date(0)) is false
PASS compare(-Infinity, new Date(1e3)) is false
PASS compare(-Infinity, new Date(1e9)) is false
PASS compare(-Infinity, []) is false
PASS compare(-Infinity, [123]) is false
PASS compare(-Infinity, ['abc']) is false
PASS compare(-Infinity, [123, 'abc']) is false
PASS compare(-Infinity, ['abc', 123]) is false
PASS compare(-Infinity, [[]]) is false
PASS compare(-Infinity, [[123]]) is false
PASS compare(-Infinity, [['abc']]) is false
PASS compare(-Infinity, [[123], 'abc']) is false
PASS compare(-Infinity, [[123], 123]) is false
PASS compare(NaN, undefined) is false
PASS compare(NaN, true) is false
PASS compare(NaN, false) is false
PASS compare(NaN, 0) is false
PASS compare(NaN, -0) is false
PASS compare(NaN, 123) is false
PASS compare(NaN, Infinity) is false
PASS compare(NaN, -Infinity) is false
PASS compare(NaN, NaN) is true
PASS compare(NaN, '') is false
PASS compare(NaN, 'abc') is false
PASS compare(NaN, 'xyz') is false
PASS compare(NaN, new Date(0)) is false
PASS compare(NaN, new Date(1e3)) is false
PASS compare(NaN, new Date(1e9)) is false
PASS compare(NaN, []) is false
PASS compare(NaN, [123]) is false
PASS compare(NaN, ['abc']) is false
PASS compare(NaN, [123, 'abc']) is false
PASS compare(NaN, ['abc', 123]) is false
PASS compare(NaN, [[]]) is false
PASS compare(NaN, [[123]]) is false
PASS compare(NaN, [['abc']]) is false
PASS compare(NaN, [[123], 'abc']) is false
PASS compare(NaN, [[123], 123]) is false
PASS compare('', undefined) is false
PASS compare('', true) is false
PASS compare('', false) is false
PASS compare('', 0) is false
PASS compare('', -0) is false
PASS compare('', 123) is false
PASS compare('', Infinity) is false
PASS compare('', -Infinity) is false
PASS compare('', NaN) is false
PASS compare('', '') is true
PASS compare('', 'abc') is false
PASS compare('', 'xyz') is false
PASS compare('', new Date(0)) is false
PASS compare('', new Date(1e3)) is false
PASS compare('', new Date(1e9)) is false
PASS compare('', []) is false
PASS compare('', [123]) is false
PASS compare('', ['abc']) is false
PASS compare('', [123, 'abc']) is false
PASS compare('', ['abc', 123]) is false
PASS compare('', [[]]) is false
PASS compare('', [[123]]) is false
PASS compare('', [['abc']]) is false
PASS compare('', [[123], 'abc']) is false
PASS compare('', [[123], 123]) is false
PASS compare('abc', undefined) is false
PASS compare('abc', true) is false
PASS compare('abc', false) is false
PASS compare('abc', 0) is false
PASS compare('abc', -0) is false
PASS compare('abc', 123) is false
PASS compare('abc', Infinity) is false
PASS compare('abc', -Infinity) is false
PASS compare('abc', NaN) is false
PASS compare('abc', '') is false
PASS compare('abc', 'abc') is true
PASS compare('abc', 'xyz') is false
PASS compare('abc', new Date(0)) is false
PASS compare('abc', new Date(1e3)) is false
PASS compare('abc', new Date(1e9)) is false
PASS compare('abc', []) is false
PASS compare('abc', [123]) is false
PASS compare('abc', ['abc']) is false
PASS compare('abc', [123, 'abc']) is false
PASS compare('abc', ['abc', 123]) is false
PASS compare('abc', [[]]) is false
PASS compare('abc', [[123]]) is false
PASS compare('abc', [['abc']]) is false
PASS compare('abc', [[123], 'abc']) is false
PASS compare('abc', [[123], 123]) is false
PASS compare('xyz', undefined) is false
PASS compare('xyz', true) is false
PASS compare('xyz', false) is false
PASS compare('xyz', 0) is false
PASS compare('xyz', -0) is false
PASS compare('xyz', 123) is false
PASS compare('xyz', Infinity) is false
PASS compare('xyz', -Infinity) is false
PASS compare('xyz', NaN) is false
PASS compare('xyz', '') is false
PASS compare('xyz', 'abc') is false
PASS compare('xyz', 'xyz') is true
PASS compare('xyz', new Date(0)) is false
PASS compare('xyz', new Date(1e3)) is false
PASS compare('xyz', new Date(1e9)) is false
PASS compare('xyz', []) is false
PASS compare('xyz', [123]) is false
PASS compare('xyz', ['abc']) is false
PASS compare('xyz', [123, 'abc']) is false
PASS compare('xyz', ['abc', 123]) is false
PASS compare('xyz', [[]]) is false
PASS compare('xyz', [[123]]) is false
PASS compare('xyz', [['abc']]) is false
PASS compare('xyz', [[123], 'abc']) is false
PASS compare('xyz', [[123], 123]) is false
PASS compare(new Date(0), undefined) is false
PASS compare(new Date(0), true) is false
PASS compare(new Date(0), false) is false
PASS compare(new Date(0), 0) is false
PASS compare(new Date(0), -0) is false
PASS compare(new Date(0), 123) is false
PASS compare(new Date(0), Infinity) is false
PASS compare(new Date(0), -Infinity) is false
PASS compare(new Date(0), NaN) is false
PASS compare(new Date(0), '') is false
PASS compare(new Date(0), 'abc') is false
PASS compare(new Date(0), 'xyz') is false
PASS compare(new Date(0), new Date(0)) is true
PASS compare(new Date(0), new Date(1e3)) is false
PASS compare(new Date(0), new Date(1e9)) is false
PASS compare(new Date(0), []) is false
PASS compare(new Date(0), [123]) is false
PASS compare(new Date(0), ['abc']) is false
PASS compare(new Date(0), [123, 'abc']) is false
PASS compare(new Date(0), ['abc', 123]) is false
PASS compare(new Date(0), [[]]) is false
PASS compare(new Date(0), [[123]]) is false
PASS compare(new Date(0), [['abc']]) is false
PASS compare(new Date(0), [[123], 'abc']) is false
PASS compare(new Date(0), [[123], 123]) is false
PASS compare(new Date(1e3), undefined) is false
PASS compare(new Date(1e3), true) is false
PASS compare(new Date(1e3), false) is false
PASS compare(new Date(1e3), 0) is false
PASS compare(new Date(1e3), -0) is false
PASS compare(new Date(1e3), 123) is false
PASS compare(new Date(1e3), Infinity) is false
PASS compare(new Date(1e3), -Infinity) is false
PASS compare(new Date(1e3), NaN) is false
PASS compare(new Date(1e3), '') is false
PASS compare(new Date(1e3), 'abc') is false
PASS compare(new Date(1e3), 'xyz') is false
PASS compare(new Date(1e3), new Date(0)) is false
PASS compare(new Date(1e3), new Date(1e3)) is true
PASS compare(new Date(1e3), new Date(1e9)) is false
PASS compare(new Date(1e3), []) is false
PASS compare(new Date(1e3), [123]) is false
PASS compare(new Date(1e3), ['abc']) is false
PASS compare(new Date(1e3), [123, 'abc']) is false
PASS compare(new Date(1e3), ['abc', 123]) is false
PASS compare(new Date(1e3), [[]]) is false
PASS compare(new Date(1e3), [[123]]) is false
PASS compare(new Date(1e3), [['abc']]) is false
PASS compare(new Date(1e3), [[123], 'abc']) is false
PASS compare(new Date(1e3), [[123], 123]) is false
PASS compare(new Date(1e9), undefined) is false
PASS compare(new Date(1e9), true) is false
PASS compare(new Date(1e9), false) is false
PASS compare(new Date(1e9), 0) is false
PASS compare(new Date(1e9), -0) is false
PASS compare(new Date(1e9), 123) is false
PASS compare(new Date(1e9), Infinity) is false
PASS compare(new Date(1e9), -Infinity) is false
PASS compare(new Date(1e9), NaN) is false
PASS compare(new Date(1e9), '') is false
PASS compare(new Date(1e9), 'abc') is false
PASS compare(new Date(1e9), 'xyz') is false
PASS compare(new Date(1e9), new Date(0)) is false
PASS compare(new Date(1e9), new Date(1e3)) is false
PASS compare(new Date(1e9), new Date(1e9)) is true
PASS compare(new Date(1e9), []) is false
PASS compare(new Date(1e9), [123]) is false
PASS compare(new Date(1e9), ['abc']) is false
PASS compare(new Date(1e9), [123, 'abc']) is false
PASS compare(new Date(1e9), ['abc', 123]) is false
PASS compare(new Date(1e9), [[]]) is false
PASS compare(new Date(1e9), [[123]]) is false
PASS compare(new Date(1e9), [['abc']]) is false
PASS compare(new Date(1e9), [[123], 'abc']) is false
PASS compare(new Date(1e9), [[123], 123]) is false
PASS compare([], undefined) is false
PASS compare([], true) is false
PASS compare([], false) is false
PASS compare([], 0) is false
PASS compare([], -0) is false
PASS compare([], 123) is false
PASS compare([], Infinity) is false
PASS compare([], -Infinity) is false
PASS compare([], NaN) is false
PASS compare([], '') is false
PASS compare([], 'abc') is false
PASS compare([], 'xyz') is false
PASS compare([], new Date(0)) is false
PASS compare([], new Date(1e3)) is false
PASS compare([], new Date(1e9)) is false
PASS compare([], []) is true
PASS compare([], [123]) is false
PASS compare([], ['abc']) is false
PASS compare([], [123, 'abc']) is false
PASS compare([], ['abc', 123]) is false
PASS compare([], [[]]) is false
PASS compare([], [[123]]) is false
PASS compare([], [['abc']]) is false
PASS compare([], [[123], 'abc']) is false
PASS compare([], [[123], 123]) is false
PASS compare([123], undefined) is false
PASS compare([123], true) is false
PASS compare([123], false) is false
PASS compare([123], 0) is false
PASS compare([123], -0) is false
PASS compare([123], 123) is false
PASS compare([123], Infinity) is false
PASS compare([123], -Infinity) is false
PASS compare([123], NaN) is false
PASS compare([123], '') is false
PASS compare([123], 'abc') is false
PASS compare([123], 'xyz') is false
PASS compare([123], new Date(0)) is false
PASS compare([123], new Date(1e3)) is false
PASS compare([123], new Date(1e9)) is false
PASS compare([123], []) is false
PASS compare([123], [123]) is true
PASS compare([123], ['abc']) is false
PASS compare([123], [123, 'abc']) is false
PASS compare([123], ['abc', 123]) is false
PASS compare([123], [[]]) is false
PASS compare([123], [[123]]) is false
PASS compare([123], [['abc']]) is false
PASS compare([123], [[123], 'abc']) is false
PASS compare([123], [[123], 123]) is false
PASS compare(['abc'], undefined) is false
PASS compare(['abc'], true) is false
PASS compare(['abc'], false) is false
PASS compare(['abc'], 0) is false
PASS compare(['abc'], -0) is false
PASS compare(['abc'], 123) is false
PASS compare(['abc'], Infinity) is false
PASS compare(['abc'], -Infinity) is false
PASS compare(['abc'], NaN) is false
PASS compare(['abc'], '') is false
PASS compare(['abc'], 'abc') is false
PASS compare(['abc'], 'xyz') is false
PASS compare(['abc'], new Date(0)) is false
PASS compare(['abc'], new Date(1e3)) is false
PASS compare(['abc'], new Date(1e9)) is false
PASS compare(['abc'], []) is false
PASS compare(['abc'], [123]) is false
PASS compare(['abc'], ['abc']) is true
PASS compare(['abc'], [123, 'abc']) is false
PASS compare(['abc'], ['abc', 123]) is false
PASS compare(['abc'], [[]]) is false
PASS compare(['abc'], [[123]]) is false
PASS compare(['abc'], [['abc']]) is false
PASS compare(['abc'], [[123], 'abc']) is false
PASS compare(['abc'], [[123], 123]) is false
PASS compare([123, 'abc'], undefined) is false
PASS compare([123, 'abc'], true) is false
PASS compare([123, 'abc'], false) is false
PASS compare([123, 'abc'], 0) is false
PASS compare([123, 'abc'], -0) is false
PASS compare([123, 'abc'], 123) is false
PASS compare([123, 'abc'], Infinity) is false
PASS compare([123, 'abc'], -Infinity) is false
PASS compare([123, 'abc'], NaN) is false
PASS compare([123, 'abc'], '') is false
PASS compare([123, 'abc'], 'abc') is false
PASS compare([123, 'abc'], 'xyz') is false
PASS compare([123, 'abc'], new Date(0)) is false
PASS compare([123, 'abc'], new Date(1e3)) is false
PASS compare([123, 'abc'], new Date(1e9)) is false
PASS compare([123, 'abc'], []) is false
PASS compare([123, 'abc'], [123]) is false
PASS compare([123, 'abc'], ['abc']) is false
PASS compare([123, 'abc'], [123, 'abc']) is true
PASS compare([123, 'abc'], ['abc', 123]) is false
PASS compare([123, 'abc'], [[]]) is false
PASS compare([123, 'abc'], [[123]]) is false
PASS compare([123, 'abc'], [['abc']]) is false
PASS compare([123, 'abc'], [[123], 'abc']) is false
PASS compare([123, 'abc'], [[123], 123]) is false
PASS compare(['abc', 123], undefined) is false
PASS compare(['abc', 123], true) is false
PASS compare(['abc', 123], false) is false
PASS compare(['abc', 123], 0) is false
PASS compare(['abc', 123], -0) is false
PASS compare(['abc', 123], 123) is false
PASS compare(['abc', 123], Infinity) is false
PASS compare(['abc', 123], -Infinity) is false
PASS compare(['abc', 123], NaN) is false
PASS compare(['abc', 123], '') is false
PASS compare(['abc', 123], 'abc') is false
PASS compare(['abc', 123], 'xyz') is false
PASS compare(['abc', 123], new Date(0)) is false
PASS compare(['abc', 123], new Date(1e3)) is false
PASS compare(['abc', 123], new Date(1e9)) is false
PASS compare(['abc', 123], []) is false
PASS compare(['abc', 123], [123]) is false
PASS compare(['abc', 123], ['abc']) is false
PASS compare(['abc', 123], [123, 'abc']) is false
PASS compare(['abc', 123], ['abc', 123]) is true
PASS compare(['abc', 123], [[]]) is false
PASS compare(['abc', 123], [[123]]) is false
PASS compare(['abc', 123], [['abc']]) is false
PASS compare(['abc', 123], [[123], 'abc']) is false
PASS compare(['abc', 123], [[123], 123]) is false
PASS compare([[]], undefined) is false
PASS compare([[]], true) is false
PASS compare([[]], false) is false
PASS compare([[]], 0) is false
PASS compare([[]], -0) is false
PASS compare([[]], 123) is false
PASS compare([[]], Infinity) is false
PASS compare([[]], -Infinity) is false
PASS compare([[]], NaN) is false
PASS compare([[]], '') is false
PASS compare([[]], 'abc') is false
PASS compare([[]], 'xyz') is false
PASS compare([[]], new Date(0)) is false
PASS compare([[]], new Date(1e3)) is false
PASS compare([[]], new Date(1e9)) is false
PASS compare([[]], []) is false
PASS compare([[]], [123]) is false
PASS compare([[]], ['abc']) is false
PASS compare([[]], [123, 'abc']) is false
PASS compare([[]], ['abc', 123]) is false
PASS compare([[]], [[]]) is true
PASS compare([[]], [[123]]) is false
PASS compare([[]], [['abc']]) is false
PASS compare([[]], [[123], 'abc']) is false
PASS compare([[]], [[123], 123]) is false
PASS compare([[123]], undefined) is false
PASS compare([[123]], true) is false
PASS compare([[123]], false) is false
PASS compare([[123]], 0) is false
PASS compare([[123]], -0) is false
PASS compare([[123]], 123) is false
PASS compare([[123]], Infinity) is false
PASS compare([[123]], -Infinity) is false
PASS compare([[123]], NaN) is false
PASS compare([[123]], '') is false
PASS compare([[123]], 'abc') is false
PASS compare([[123]], 'xyz') is false
PASS compare([[123]], new Date(0)) is false
PASS compare([[123]], new Date(1e3)) is false
PASS compare([[123]], new Date(1e9)) is false
PASS compare([[123]], []) is false
PASS compare([[123]], [123]) is false
PASS compare([[123]], ['abc']) is false
PASS compare([[123]], [123, 'abc']) is false
PASS compare([[123]], ['abc', 123]) is false
PASS compare([[123]], [[]]) is false
PASS compare([[123]], [[123]]) is true
PASS compare([[123]], [['abc']]) is false
PASS compare([[123]], [[123], 'abc']) is false
PASS compare([[123]], [[123], 123]) is false
PASS compare([['abc']], undefined) is false
PASS compare([['abc']], true) is false
PASS compare([['abc']], false) is false
PASS compare([['abc']], 0) is false
PASS compare([['abc']], -0) is false
PASS compare([['abc']], 123) is false
PASS compare([['abc']], Infinity) is false
PASS compare([['abc']], -Infinity) is false
PASS compare([['abc']], NaN) is false
PASS compare([['abc']], '') is false
PASS compare([['abc']], 'abc') is false
PASS compare([['abc']], 'xyz') is false
PASS compare([['abc']], new Date(0)) is false
PASS compare([['abc']], new Date(1e3)) is false
PASS compare([['abc']], new Date(1e9)) is false
PASS compare([['abc']], []) is false
PASS compare([['abc']], [123]) is false
PASS compare([['abc']], ['abc']) is false
PASS compare([['abc']], [123, 'abc']) is false
PASS compare([['abc']], ['abc', 123]) is false
PASS compare([['abc']], [[]]) is false
PASS compare([['abc']], [[123]]) is false
PASS compare([['abc']], [['abc']]) is true
PASS compare([['abc']], [[123], 'abc']) is false
PASS compare([['abc']], [[123], 123]) is false
PASS compare([[123], 'abc'], undefined) is false
PASS compare([[123], 'abc'], true) is false
PASS compare([[123], 'abc'], false) is false
PASS compare([[123], 'abc'], 0) is false
PASS compare([[123], 'abc'], -0) is false
PASS compare([[123], 'abc'], 123) is false
PASS compare([[123], 'abc'], Infinity) is false
PASS compare([[123], 'abc'], -Infinity) is false
PASS compare([[123], 'abc'], NaN) is false
PASS compare([[123], 'abc'], '') is false
PASS compare([[123], 'abc'], 'abc') is false
PASS compare([[123], 'abc'], 'xyz') is false
PASS compare([[123], 'abc'], new Date(0)) is false
PASS compare([[123], 'abc'], new Date(1e3)) is false
PASS compare([[123], 'abc'], new Date(1e9)) is false
PASS compare([[123], 'abc'], []) is false
PASS compare([[123], 'abc'], [123]) is false
PASS compare([[123], 'abc'], ['abc']) is false
PASS compare([[123], 'abc'], [123, 'abc']) is false
PASS compare([[123], 'abc'], ['abc', 123]) is false
PASS compare([[123], 'abc'], [[]]) is false
PASS compare([[123], 'abc'], [[123]]) is false
PASS compare([[123], 'abc'], [['abc']]) is false
PASS compare([[123], 'abc'], [[123], 'abc']) is true
PASS compare([[123], 'abc'], [[123], 123]) is false
PASS compare([[123], 123], undefined) is false
PASS compare([[123], 123], true) is false
PASS compare([[123], 123], false) is false
PASS compare([[123], 123], 0) is false
PASS compare([[123], 123], -0) is false
PASS compare([[123], 123], 123) is false
PASS compare([[123], 123], Infinity) is false
PASS compare([[123], 123], -Infinity) is false
PASS compare([[123], 123], NaN) is false
PASS compare([[123], 123], '') is false
PASS compare([[123], 123], 'abc') is false
PASS compare([[123], 123], 'xyz') is false
PASS compare([[123], 123], new Date(0)) is false
PASS compare([[123], 123], new Date(1e3)) is false
PASS compare([[123], 123], new Date(1e9)) is false
PASS compare([[123], 123], []) is false
PASS compare([[123], 123], [123]) is false
PASS compare([[123], 123], ['abc']) is false
PASS compare([[123], 123], [123, 'abc']) is false
PASS compare([[123], 123], ['abc', 123]) is false
PASS compare([[123], 123], [[]]) is false
PASS compare([[123], 123], [[123]]) is false
PASS compare([[123], 123], [['abc']]) is false
PASS compare([[123], 123], [[123], 'abc']) is false
PASS compare([[123], 123], [[123], 123]) is true
PASS successfullyParsed is true
TEST COMPLETE