Modern IDB: Add private-browsing variant for many IDB tests, and enable private brows...
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jan 2016 06:02:30 +0000 (06:02 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jan 2016 06:02:30 +0000 (06:02 +0000)
https://bugs.webkit.org/show_bug.cgi?id=153179

Reviewed by Darin Adler.

Source/WebCore:

Tests: Many private-browsing copies of existing IDB tests.

* Modules/indexeddb/client/IDBFactoryImpl.cpp:
(WebCore::IDBClient::shouldThrowSecurityException): Allow IDB access in private browsing.

LayoutTests:

Update many expectations files to skip some of the new tests on some platforms:
* TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/wk2/TestExpectations:

Add a special case for URLs that end with "-private.html" to enable private browsing:
* resources/js-test.js:

Add a whole bunch of -private.html wrappers along with new test expectations, along
with some minor test changes to remove unnecessary ambiguity due to .html filename:
* storage/indexeddb/aborted-versionchange-closes-private-expected.txt: Added.
* storage/indexeddb/aborted-versionchange-closes-private.html: Added.
* storage/indexeddb/basics-private-expected.txt: Added.
* storage/indexeddb/basics-private.html: Added.
* storage/indexeddb/create-and-remove-object-store-private-expected.txt: Added.
* storage/indexeddb/create-and-remove-object-store-private.html: Added.
* storage/indexeddb/create-object-store-options-private-expected.txt: Added.
* storage/indexeddb/create-object-store-options-private.html: Added.
* storage/indexeddb/createIndex-after-failure-private-expected.txt: Added.
* storage/indexeddb/createIndex-after-failure-private.html: Added.
* storage/indexeddb/createObjectStore-name-argument-required-private-expected.txt: Added.
* storage/indexeddb/createObjectStore-name-argument-required-private.html: Added.
* storage/indexeddb/createObjectStore-null-name-private-expected.txt: Added.
* storage/indexeddb/createObjectStore-null-name-private.html: Added.
* storage/indexeddb/cursor-added-bug-private-expected.txt: Added.
* storage/indexeddb/cursor-added-bug-private.html: Added.
* storage/indexeddb/cursor-advance-private-expected.txt: Added.
* storage/indexeddb/cursor-advance-private.html: Added.
* storage/indexeddb/cursor-basics-private-expected.txt: Added.
* storage/indexeddb/cursor-basics-private.html: Added.
* storage/indexeddb/cursor-continue-dir-private-expected.txt: Added.
* storage/indexeddb/cursor-continue-dir-private.html: Added.
* storage/indexeddb/cursor-continue-private-expected.txt: Added.
* storage/indexeddb/cursor-continue-private.html: Added.
* storage/indexeddb/cursor-continue-validity-private-expected.txt: Added.
* storage/indexeddb/cursor-continue-validity-private.html: Added.
* storage/indexeddb/cursor-delete-private-expected.txt: Added.
* storage/indexeddb/cursor-delete-private.html: Added.
* storage/indexeddb/cursor-finished-private-expected.txt: Added.
* storage/indexeddb/cursor-finished-private.html: Added.
* storage/indexeddb/cursor-inconsistency-private-expected.txt: Added.
* storage/indexeddb/cursor-inconsistency-private.html: Added.
* storage/indexeddb/cursor-index-delete-private-expected.txt: Added.
* storage/indexeddb/cursor-index-delete-private.html: Added.
* storage/indexeddb/cursor-key-order-private-expected.txt: Added.
* storage/indexeddb/cursor-key-order-private.html: Added.
* storage/indexeddb/cursor-prev-no-duplicate-private-expected.txt: Added.
* storage/indexeddb/cursor-prev-no-duplicate-private.html: Added.
* storage/indexeddb/cursor-primary-key-order-private-expected.txt: Added.
* storage/indexeddb/cursor-primary-key-order-private.html: Added.
* storage/indexeddb/cursor-properties-private-expected.txt: Added.
* storage/indexeddb/cursor-properties-private.html: Added.
* storage/indexeddb/cursor-reverse-bug-private-expected.txt: Added.
* storage/indexeddb/cursor-reverse-bug-private.html: Added.
* storage/indexeddb/cursor-skip-deleted-private-expected.txt: Added.
* storage/indexeddb/cursor-skip-deleted-private.html: Added.
* storage/indexeddb/cursor-update-private-expected.txt: Added.
* storage/indexeddb/cursor-update-private.html: Added.
* storage/indexeddb/cursor-update-value-argument-required-private-expected.txt: Added.
* storage/indexeddb/cursor-update-value-argument-required-private.html: Added.
* storage/indexeddb/cursor-value-private-expected.txt: Added.
* storage/indexeddb/cursor-value-private.html: Added.
* storage/indexeddb/database-basics-private-expected.txt: Added.
* storage/indexeddb/database-basics-private.html: Added.
* storage/indexeddb/database-close-private-expected.txt: Added.
* storage/indexeddb/database-close-private.html: Added.
* storage/indexeddb/database-closepending-flag-private-expected.txt: Added.
* storage/indexeddb/database-closepending-flag-private.html: Added.
* storage/indexeddb/database-deletepending-flag-private-expected.txt: Added.
* storage/indexeddb/database-deletepending-flag-private.html: Added.
* storage/indexeddb/database-name-undefined-private-expected.txt: Added.
* storage/indexeddb/database-name-undefined-private.html: Added.
* storage/indexeddb/database-odd-names-private-expected.txt: Added.
* storage/indexeddb/database-odd-names-private.html: Added.
* storage/indexeddb/database-quota-private-expected.txt: Added.
* storage/indexeddb/database-quota-private.html: Added.
* storage/indexeddb/database-wrapper-private-expected.txt: Added.
* storage/indexeddb/database-wrapper-private.html: Added.
* storage/indexeddb/delete-closed-database-object-private-expected.txt: Added.
* storage/indexeddb/delete-closed-database-object-private.html: Added.
* storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-private-expected.txt: Added.
* storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-private.html: Added.
* storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-private-expected.txt: Added.
* storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-private.html: Added.
* storage/indexeddb/delete-range-private-expected.txt: Added.
* storage/indexeddb/delete-range-private.html: Added.
* storage/indexeddb/deleteIndex-private-expected.txt: Added.
* storage/indexeddb/deleteIndex-private.html: Added.
* storage/indexeddb/deleteObjectStore-name-argument-required-private-expected.txt: Added.
* storage/indexeddb/deleteObjectStore-name-argument-required-private.html: Added.
* storage/indexeddb/deleteObjectStore-null-name-private-expected.txt: Added.
* storage/indexeddb/deleteObjectStore-null-name-private.html: Added.
* storage/indexeddb/deleted-objects-private-expected.txt: Added.
* storage/indexeddb/deleted-objects-private.html: Added.
* storage/indexeddb/deletedatabase-blocked-private-expected.txt: Added.
* storage/indexeddb/deletedatabase-blocked-private.html: Added.
* storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-private-expected.txt: Added.
* storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-private.html: Added.
* storage/indexeddb/deletedatabase-delayed-by-versionchange-private-expected.txt: Added.
* storage/indexeddb/deletedatabase-not-blocked-private-expected.txt: Added.
* storage/indexeddb/deletedatabase-not-blocked-private.html: Added.
* storage/indexeddb/dont-wedge-private-expected.txt: Added.
* storage/indexeddb/dont-wedge-private.html: Added.
* storage/indexeddb/duplicates-private-expected.txt: Added.
* storage/indexeddb/duplicates-private.html: Added.
* storage/indexeddb/error-causes-abort-by-default-private-expected.txt: Added.
* storage/indexeddb/error-causes-abort-by-default-private.html: Added.
* storage/indexeddb/events-private-expected.txt: Added.
* storage/indexeddb/events-private.html: Added.
* storage/indexeddb/exception-in-event-aborts-private-expected.txt: Added.
* storage/indexeddb/exception-in-event-aborts-private.html: Added.
* storage/indexeddb/exceptions-private-expected.txt: Added.
* storage/indexeddb/exceptions-private.html: Added.
* storage/indexeddb/factory-cmp-private-expected.txt: Added.
* storage/indexeddb/factory-cmp-private.html: Added.
* storage/indexeddb/factory-deletedatabase-private-expected.txt: Added.
* storage/indexeddb/factory-deletedatabase-private.html: Added.
* storage/indexeddb/get-keyrange-private-expected.txt: Added.
* storage/indexeddb/get-keyrange-private.html: Added.
* storage/indexeddb/index-basics-private-expected.txt: Added.
* storage/indexeddb/index-basics-private.html: Added.
* storage/indexeddb/index-count-private-expected.txt: Added.
* storage/indexeddb/index-count-private.html: Added.
* storage/indexeddb/index-cursor-private-expected.txt: Added.
* storage/indexeddb/index-cursor-private.html: Added.
* storage/indexeddb/index-duplicate-keypaths-private-expected.txt: Added.
* storage/indexeddb/index-duplicate-keypaths-private.html: Added.
* storage/indexeddb/index-get-key-argument-required-private-expected.txt: Added.
* storage/indexeddb/index-get-key-argument-required-private.html: Added.
* storage/indexeddb/index-multientry-private-expected.txt: Added.
* storage/indexeddb/index-multientry-private.html: Added.
* storage/indexeddb/index-population-private-expected.txt: Added.
* storage/indexeddb/index-population-private.html: Added.
* storage/indexeddb/index-unique-private-expected.txt: Added.
* storage/indexeddb/index-unique-private.html: Added.
* storage/indexeddb/interfaces-private-expected.txt: Added.
* storage/indexeddb/interfaces-private.html: Added.
* storage/indexeddb/intversion-abort-in-initial-upgradeneeded-private-expected.txt: Added.
* storage/indexeddb/intversion-abort-in-initial-upgradeneeded-private.html: Added.
* storage/indexeddb/intversion-bad-parameters-private-expected.txt: Added.
* storage/indexeddb/intversion-bad-parameters-private.html: Added.
* storage/indexeddb/intversion-blocked-private-expected.txt: Added.
* storage/indexeddb/intversion-blocked-private.html: Added.
* storage/indexeddb/intversion-close-between-events-private-expected.txt: Added.
* storage/indexeddb/intversion-close-between-events-private.html: Added.
* storage/indexeddb/intversion-close-in-oncomplete-private-expected.txt: Added.
* storage/indexeddb/intversion-close-in-oncomplete-private.html: Added.
* storage/indexeddb/intversion-close-in-upgradeneeded-private-expected.txt: Added.
* storage/indexeddb/intversion-close-in-upgradeneeded-private.html: Added.
* storage/indexeddb/intversion-encoding-private-expected.txt: Added.
* storage/indexeddb/intversion-encoding-private.html: Added.
* storage/indexeddb/intversion-gated-on-delete-private-expected.txt: Added.
* storage/indexeddb/intversion-gated-on-delete-private.html: Added.
* storage/indexeddb/intversion-long-queue-private-expected.txt: Added.
* storage/indexeddb/intversion-long-queue-private.html: Added.
* storage/indexeddb/intversion-omit-parameter-private-expected.txt: Added.
* storage/indexeddb/intversion-omit-parameter-private.html: Added.
* storage/indexeddb/intversion-open-in-upgradeneeded-private-expected.txt: Added.
* storage/indexeddb/intversion-open-in-upgradeneeded-private.html: Added.
* storage/indexeddb/intversion-open-with-version-private-expected.txt: Added.
* storage/indexeddb/intversion-open-with-version-private.html: Added.
* storage/indexeddb/intversion-pending-version-changes-ascending-private-expected.txt: Added.
* storage/indexeddb/intversion-pending-version-changes-ascending-private.html: Added.
* storage/indexeddb/intversion-pending-version-changes-descending-private-expected.txt: Added.
* storage/indexeddb/intversion-pending-version-changes-descending-private.html: Added.
* storage/indexeddb/intversion-pending-version-changes-same-private-expected.txt: Added.
* storage/indexeddb/intversion-pending-version-changes-same-private.html: Added.
* storage/indexeddb/intversion-persistence-private-expected.txt: Added.
* storage/indexeddb/intversion-persistence-private.html: Added.
* storage/indexeddb/intversion-revert-on-abort-private-expected.txt: Added.
* storage/indexeddb/intversion-revert-on-abort-private.html: Added.
* storage/indexeddb/intversion-two-opens-no-versions-private-expected.txt: Added.
* storage/indexeddb/intversion-two-opens-no-versions-private.html: Added.
* storage/indexeddb/intversion-upgrades-private-expected.txt: Added.
* storage/indexeddb/intversion-upgrades-private.html: Added.
* storage/indexeddb/invalid-keys-private-expected.txt: Added.
* storage/indexeddb/invalid-keys-private.html: Added.
* storage/indexeddb/key-generator-private-expected.txt: Added.
* storage/indexeddb/key-generator-private.html: Added.
* storage/indexeddb/key-sort-order-across-types-private-expected.txt: Added.
* storage/indexeddb/key-sort-order-across-types-private.html: Added.
* storage/indexeddb/key-sort-order-date-private-expected.txt: Added.
* storage/indexeddb/key-sort-order-date-private.html: Added.
* storage/indexeddb/key-type-array-private-expected.txt: Added.
* storage/indexeddb/key-type-array-private.html: Added.
* storage/indexeddb/key-type-binary-private-expected.txt: Added.
* storage/indexeddb/key-type-binary-private.html: Added.
* storage/indexeddb/key-type-infinity-private-expected.txt: Added.
* storage/indexeddb/key-type-infinity-private.html: Added.
* storage/indexeddb/keypath-arrays-private-expected.txt: Added.
* storage/indexeddb/keypath-arrays-private.html: Added.
* storage/indexeddb/keypath-basics-private-expected.txt: Added.
* storage/indexeddb/keypath-basics-private.html: Added.
* storage/indexeddb/keypath-edges-private-expected.txt: Added.
* storage/indexeddb/keypath-edges-private.html: Added.
* storage/indexeddb/keypath-fetch-key-private-expected.txt: Added.
* storage/indexeddb/keypath-fetch-key-private.html: Added.
* storage/indexeddb/keypath-intrinsic-properties-private-expected.txt: Added.
* storage/indexeddb/keypath-intrinsic-properties-private.html: Added.
* storage/indexeddb/keyrange-private-expected.txt: Added.
* storage/indexeddb/keyrange-private.html: Added.
* storage/indexeddb/keyrange-required-arguments-private-expected.txt: Added.
* storage/indexeddb/keyrange-required-arguments-private.html: Added.
* storage/indexeddb/lazy-index-types-private-expected.txt: Added.
* storage/indexeddb/lazy-index-types-private.html: Added.
* storage/indexeddb/legacy-constants-private-expected.txt: Added.
* storage/indexeddb/legacy-constants-private.html: Added.
* storage/indexeddb/list-ordering-private-expected.txt: Added.
* storage/indexeddb/list-ordering-private.html: Added.
* storage/indexeddb/metadata-private-expected.txt: Added.
* storage/indexeddb/metadata-private.html: Added.
* storage/indexeddb/mutating-cursor-private-expected.txt: Added.
* storage/indexeddb/mutating-cursor-private.html: Added.
* storage/indexeddb/objectStore-required-arguments-private-expected.txt: Added.
* storage/indexeddb/objectStore-required-arguments-private.html: Added.
* storage/indexeddb/objectstore-autoincrement-private-expected.txt: Added.
* storage/indexeddb/objectstore-autoincrement-private.html: Added.
* storage/indexeddb/objectstore-basics-private-expected.txt: Added.
* storage/indexeddb/objectstore-basics-private.html: Added.
* storage/indexeddb/objectstore-clear-private-expected.txt: Added.
* storage/indexeddb/objectstore-clear-private.html: Added.
* storage/indexeddb/objectstore-count-private-expected.txt: Added.
* storage/indexeddb/objectstore-count-private.html: Added.
* storage/indexeddb/objectstore-cursor-private-expected.txt: Added.
* storage/indexeddb/objectstore-cursor-private.html: Added.
* storage/indexeddb/objectstore-removeobjectstore-private-expected.txt: Added.
* storage/indexeddb/objectstore-removeobjectstore-private.html: Added.
* storage/indexeddb/odd-strings-private-expected.txt: Added.
* storage/indexeddb/odd-strings-private.html: Added.
* storage/indexeddb/open-cursor-private-expected.txt: Added.
* storage/indexeddb/open-cursor-private.html: Added.
* storage/indexeddb/open-during-transaction-private-expected.txt: Added.
* storage/indexeddb/open-during-transaction-private.html: Added.
* storage/indexeddb/open-ordering-private-expected.txt: Added.
* storage/indexeddb/open-ordering-private.html: Added.
* storage/indexeddb/opencursor-key-private-expected.txt: Added.
* storage/indexeddb/opencursor-key-private.html: Added.
* storage/indexeddb/pending-activity-private-expected.txt: Added.
* storage/indexeddb/pending-activity-private.html: Added.
* storage/indexeddb/pending-version-change-on-exit-private-expected.txt: Added.
* storage/indexeddb/pending-version-change-on-exit-private.html: Added.
* storage/indexeddb/pending-version-change-stuck-private-expected.txt: Added.
* storage/indexeddb/pending-version-change-stuck-private.html: Added.
* storage/indexeddb/persistence-expected.txt:
* storage/indexeddb/persistence-private-expected.txt: Copied from LayoutTests/storage/indexeddb/persistence-expected.txt.
* storage/indexeddb/persistence-private.html: Added.
* storage/indexeddb/prefetch-bugfix-108071-private-expected.txt: Added.
* storage/indexeddb/prefetch-bugfix-108071-private.html: Added.
* storage/indexeddb/queued-commands-private-expected.txt: Added.
* storage/indexeddb/queued-commands-private.html: Added.
* storage/indexeddb/readonly-private-expected.txt: Added.
* storage/indexeddb/readonly-private.html: Added.
* storage/indexeddb/readonly-properties-private-expected.txt: Added.
* storage/indexeddb/readonly-properties-private.html: Added.
* storage/indexeddb/removed-private-expected.txt: Added.
* storage/indexeddb/removed-private.html: Added.
* storage/indexeddb/request-continue-abort-private-expected.txt: Added.
* storage/indexeddb/request-continue-abort-private.html: Added.
* storage/indexeddb/request-event-propagation-private-expected.txt: Added.
* storage/indexeddb/request-event-propagation-private.html: Added.
* storage/indexeddb/resources/persistence.js:
* storage/indexeddb/set_version_blocked-private-expected.txt: Added.
* storage/indexeddb/set_version_blocked-private.html: Added.
* storage/indexeddb/setversion-blocked-by-versionchange-close-private-expected.txt: Added.
* storage/indexeddb/setversion-blocked-by-versionchange-close-private.html: Added.
* storage/indexeddb/setversion-not-blocked-private-expected.txt: Added.
* storage/indexeddb/setversion-not-blocked-private.html: Added.
* storage/indexeddb/transaction-abort-private-expected.txt: Added.
* storage/indexeddb/transaction-abort-private.html: Added.
* storage/indexeddb/transaction-active-flag-private-expected.txt: Added.
* storage/indexeddb/transaction-active-flag-private.html: Added.
* storage/indexeddb/transaction-after-close-private-expected.txt: Added.
* storage/indexeddb/transaction-after-close-private.html: Added.
* storage/indexeddb/transaction-and-objectstore-calls-private-expected.txt: Added.
* storage/indexeddb/transaction-and-objectstore-calls-private.html: Added.
* storage/indexeddb/transaction-basics-private-expected.txt: Added.
* storage/indexeddb/transaction-basics-private.html: Added.
* storage/indexeddb/transaction-complete-workers-private-expected.txt: Added.
* storage/indexeddb/transaction-complete-workers-private.html: Added.
* storage/indexeddb/transaction-coordination-across-databases-private-expected.txt: Added.
* storage/indexeddb/transaction-coordination-across-databases-private.html: Added.
* storage/indexeddb/transaction-coordination-within-database-private-expected.txt: Added.
* storage/indexeddb/transaction-coordination-within-database-private.html: Added.
* storage/indexeddb/transaction-crash-on-abort-private-expected.txt: Added.
* storage/indexeddb/transaction-crash-on-abort-private.html: Added.
* storage/indexeddb/transaction-error-private-expected.txt: Added.
* storage/indexeddb/transaction-error-private.html: Added.
* storage/indexeddb/transaction-event-propagation-private-expected.txt: Added.
* storage/indexeddb/transaction-event-propagation-private.html: Added.
* storage/indexeddb/transaction-read-only-private-expected.txt: Added.
* storage/indexeddb/transaction-read-only-private.html: Added.
* storage/indexeddb/transaction-readwrite-exclusive-private-expected.txt: Added.
* storage/indexeddb/transaction-readwrite-exclusive-private.html: Added.
* storage/indexeddb/transaction-rollback-private-expected.txt: Added.
* storage/indexeddb/transaction-rollback-private.html: Added.
* storage/indexeddb/transaction-scope-sequencing-private-expected.txt: Added.
* storage/indexeddb/transaction-scope-sequencing-private.html: Added.
* storage/indexeddb/transaction-starvation-private-expected.txt: Added.
* storage/indexeddb/transaction-storeNames-required-private-expected.txt: Added.
* storage/indexeddb/transaction-storeNames-required-private.html: Added.
* storage/indexeddb/unblocked-version-changes-private-expected.txt: Added.
* storage/indexeddb/unblocked-version-changes-private.html: Added.
* storage/indexeddb/unprefix-private-expected.txt: Added.
* storage/indexeddb/unprefix-private.html: Added.
* storage/indexeddb/value-undefined-private-expected.txt: Added.
* storage/indexeddb/value-undefined-private.html: Added.
* storage/indexeddb/values-odd-types-private-expected.txt: Added.
* storage/indexeddb/values-odd-types-private.html: Added.
* storage/indexeddb/version-change-abort-private-expected.txt: Added.
* storage/indexeddb/version-change-abort-private.html: Added.
* storage/indexeddb/version-change-exclusive-private-expected.txt: Added.
* storage/indexeddb/version-change-exclusive-private.html: Added.
* storage/indexeddb/versionchangerequest-activedomobject-private-expected.txt: Added.
* storage/indexeddb/versionchangerequest-activedomobject-private.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195247 268f45cc-cd09-0410-ab3c-d52691b4dbfc

311 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/platform/mac-wk1/TestExpectations
LayoutTests/platform/wk2/TestExpectations
LayoutTests/resources/js-test.js
LayoutTests/storage/indexeddb/aborted-versionchange-closes-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/aborted-versionchange-closes-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/basics-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/basics-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/create-and-remove-object-store-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/create-and-remove-object-store-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/create-object-store-options-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/create-object-store-options-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/createIndex-after-failure-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/createIndex-after-failure-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/createObjectStore-name-argument-required-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/createObjectStore-name-argument-required-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/createObjectStore-null-name-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/createObjectStore-null-name-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-added-bug-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-added-bug-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-advance-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-advance-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-basics-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-basics-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-continue-dir-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-continue-dir-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-continue-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-continue-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-continue-validity-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-continue-validity-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-delete-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-delete-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-finished-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-finished-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-inconsistency-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-inconsistency-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-index-delete-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-index-delete-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-key-order-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-key-order-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-prev-no-duplicate-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-prev-no-duplicate-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-primary-key-order-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-primary-key-order-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-properties-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-properties-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-reverse-bug-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-reverse-bug-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-skip-deleted-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-skip-deleted-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-update-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-update-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-update-value-argument-required-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-update-value-argument-required-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-value-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/cursor-value-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/database-basics-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/database-basics-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/database-close-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/database-close-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/database-closepending-flag-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/database-closepending-flag-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/database-deletepending-flag-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/database-deletepending-flag-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/database-name-undefined-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/database-name-undefined-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/database-odd-names-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/database-odd-names-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/database-quota-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/database-quota-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/database-wrapper-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/database-wrapper-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/delete-closed-database-object-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/delete-closed-database-object-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/delete-range-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/delete-range-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/deleteIndex-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/deleteIndex-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/deleteObjectStore-name-argument-required-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/deleteObjectStore-name-argument-required-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/deleteObjectStore-null-name-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/deleteObjectStore-null-name-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/deleted-objects-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/deleted-objects-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/deletedatabase-blocked-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/deletedatabase-blocked-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/deletedatabase-delayed-by-versionchange-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/deletedatabase-not-blocked-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/deletedatabase-not-blocked-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/dont-wedge-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/dont-wedge-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/duplicates-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/duplicates-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/error-causes-abort-by-default-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/error-causes-abort-by-default-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/events-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/events-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/exception-in-event-aborts-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/exception-in-event-aborts-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/exceptions-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/exceptions-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/factory-cmp-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/factory-cmp-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/factory-deletedatabase-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/factory-deletedatabase-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/get-keyrange-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/get-keyrange-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/index-basics-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/index-basics-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/index-count-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/index-count-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/index-cursor-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/index-cursor-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/index-duplicate-keypaths-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/index-duplicate-keypaths-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/index-get-key-argument-required-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/index-get-key-argument-required-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/index-multientry-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/index-multientry-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/index-population-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/index-population-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/index-unique-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/index-unique-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/interfaces-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/interfaces-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-abort-in-initial-upgradeneeded-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-abort-in-initial-upgradeneeded-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-bad-parameters-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-bad-parameters-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-blocked-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-blocked-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-close-between-events-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-close-between-events-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-close-in-oncomplete-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-close-in-oncomplete-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-close-in-upgradeneeded-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-close-in-upgradeneeded-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-encoding-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-encoding-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-gated-on-delete-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-gated-on-delete-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-long-queue-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-long-queue-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-omit-parameter-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-omit-parameter-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-open-in-upgradeneeded-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-open-in-upgradeneeded-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-open-with-version-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-open-with-version-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-pending-version-changes-ascending-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-pending-version-changes-ascending-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-pending-version-changes-descending-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-pending-version-changes-descending-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-pending-version-changes-same-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-pending-version-changes-same-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-persistence-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-persistence-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-revert-on-abort-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-revert-on-abort-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-two-opens-no-versions-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-two-opens-no-versions-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-upgrades-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/intversion-upgrades-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/invalid-keys-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/invalid-keys-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/key-generator-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/key-generator-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/key-sort-order-across-types-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/key-sort-order-across-types-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/key-sort-order-date-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/key-sort-order-date-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/key-type-array-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/key-type-array-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/key-type-binary-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/key-type-binary-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/key-type-infinity-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/key-type-infinity-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/keypath-arrays-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/keypath-arrays-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/keypath-basics-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/keypath-basics-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/keypath-edges-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/keypath-edges-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/keypath-fetch-key-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/keypath-fetch-key-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/keypath-intrinsic-properties-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/keypath-intrinsic-properties-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/keyrange-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/keyrange-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/keyrange-required-arguments-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/keyrange-required-arguments-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/lazy-index-types-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/lazy-index-types-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/legacy-constants-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/legacy-constants-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/list-ordering-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/list-ordering-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/metadata-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/metadata-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/mutating-cursor-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/mutating-cursor-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/objectStore-required-arguments-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/objectStore-required-arguments-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/objectstore-autoincrement-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/objectstore-autoincrement-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/objectstore-basics-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/objectstore-basics-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/objectstore-clear-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/objectstore-clear-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/objectstore-count-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/objectstore-count-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/objectstore-cursor-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/objectstore-cursor-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/objectstore-removeobjectstore-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/objectstore-removeobjectstore-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/odd-strings-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/odd-strings-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/open-cursor-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/open-cursor-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/open-during-transaction-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/open-during-transaction-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/open-ordering-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/open-ordering-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/opencursor-key-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/opencursor-key-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/pending-activity-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/pending-activity-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/pending-version-change-on-exit-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/pending-version-change-on-exit-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/pending-version-change-stuck-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/pending-version-change-stuck-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/persistence-expected.txt
LayoutTests/storage/indexeddb/persistence-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/persistence-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/prefetch-bugfix-108071-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/prefetch-bugfix-108071-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/queued-commands-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/queued-commands-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/readonly-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/readonly-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/readonly-properties-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/readonly-properties-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/removed-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/removed-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/request-continue-abort-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/request-continue-abort-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/request-event-propagation-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/request-event-propagation-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/resources/persistence.js
LayoutTests/storage/indexeddb/set_version_blocked-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/set_version_blocked-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/setversion-blocked-by-versionchange-close-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/setversion-blocked-by-versionchange-close-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/setversion-not-blocked-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/setversion-not-blocked-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-abort-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-abort-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-active-flag-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-active-flag-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-after-close-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-after-close-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-basics-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-basics-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-complete-workers-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-complete-workers-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-coordination-across-databases-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-coordination-across-databases-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-coordination-within-database-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-coordination-within-database-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-crash-on-abort-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-crash-on-abort-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-error-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-error-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-event-propagation-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-event-propagation-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-read-only-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-read-only-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-readwrite-exclusive-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-readwrite-exclusive-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-rollback-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-rollback-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-scope-sequencing-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-scope-sequencing-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-starvation-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-storeNames-required-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/transaction-storeNames-required-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/unblocked-version-changes-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/unblocked-version-changes-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/unprefix-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/unprefix-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/value-undefined-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/value-undefined-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/values-odd-types-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/values-odd-types-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/version-change-abort-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/version-change-abort-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/version-change-exclusive-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/version-change-exclusive-private.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/versionchangerequest-activedomobject-private-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/versionchangerequest-activedomobject-private.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp

index 5dacf29..8b67d6a 100644 (file)
@@ -1,3 +1,325 @@
+2016-01-18  Brady Eidson  <beidson@apple.com>
+
+        Modern IDB: Add private-browsing variant for many IDB tests, and enable private browsing in Modern IDB.
+        https://bugs.webkit.org/show_bug.cgi?id=153179
+
+        Reviewed by Darin Adler.
+
+        Update many expectations files to skip some of the new tests on some platforms:
+        * TestExpectations:
+        * platform/mac-wk1/TestExpectations:
+        * platform/wk2/TestExpectations:
+        
+        Add a special case for URLs that end with "-private.html" to enable private browsing:
+        * resources/js-test.js:
+        
+        Add a whole bunch of -private.html wrappers along with new test expectations, along 
+        with some minor test changes to remove unnecessary ambiguity due to .html filename:
+        * storage/indexeddb/aborted-versionchange-closes-private-expected.txt: Added.
+        * storage/indexeddb/aborted-versionchange-closes-private.html: Added.
+        * storage/indexeddb/basics-private-expected.txt: Added.
+        * storage/indexeddb/basics-private.html: Added.
+        * storage/indexeddb/create-and-remove-object-store-private-expected.txt: Added.
+        * storage/indexeddb/create-and-remove-object-store-private.html: Added.
+        * storage/indexeddb/create-object-store-options-private-expected.txt: Added.
+        * storage/indexeddb/create-object-store-options-private.html: Added.
+        * storage/indexeddb/createIndex-after-failure-private-expected.txt: Added.
+        * storage/indexeddb/createIndex-after-failure-private.html: Added.
+        * storage/indexeddb/createObjectStore-name-argument-required-private-expected.txt: Added.
+        * storage/indexeddb/createObjectStore-name-argument-required-private.html: Added.
+        * storage/indexeddb/createObjectStore-null-name-private-expected.txt: Added.
+        * storage/indexeddb/createObjectStore-null-name-private.html: Added.
+        * storage/indexeddb/cursor-added-bug-private-expected.txt: Added.
+        * storage/indexeddb/cursor-added-bug-private.html: Added.
+        * storage/indexeddb/cursor-advance-private-expected.txt: Added.
+        * storage/indexeddb/cursor-advance-private.html: Added.
+        * storage/indexeddb/cursor-basics-private-expected.txt: Added.
+        * storage/indexeddb/cursor-basics-private.html: Added.
+        * storage/indexeddb/cursor-continue-dir-private-expected.txt: Added.
+        * storage/indexeddb/cursor-continue-dir-private.html: Added.
+        * storage/indexeddb/cursor-continue-private-expected.txt: Added.
+        * storage/indexeddb/cursor-continue-private.html: Added.
+        * storage/indexeddb/cursor-continue-validity-private-expected.txt: Added.
+        * storage/indexeddb/cursor-continue-validity-private.html: Added.
+        * storage/indexeddb/cursor-delete-private-expected.txt: Added.
+        * storage/indexeddb/cursor-delete-private.html: Added.
+        * storage/indexeddb/cursor-finished-private-expected.txt: Added.
+        * storage/indexeddb/cursor-finished-private.html: Added.
+        * storage/indexeddb/cursor-inconsistency-private-expected.txt: Added.
+        * storage/indexeddb/cursor-inconsistency-private.html: Added.
+        * storage/indexeddb/cursor-index-delete-private-expected.txt: Added.
+        * storage/indexeddb/cursor-index-delete-private.html: Added.
+        * storage/indexeddb/cursor-key-order-private-expected.txt: Added.
+        * storage/indexeddb/cursor-key-order-private.html: Added.
+        * storage/indexeddb/cursor-prev-no-duplicate-private-expected.txt: Added.
+        * storage/indexeddb/cursor-prev-no-duplicate-private.html: Added.
+        * storage/indexeddb/cursor-primary-key-order-private-expected.txt: Added.
+        * storage/indexeddb/cursor-primary-key-order-private.html: Added.
+        * storage/indexeddb/cursor-properties-private-expected.txt: Added.
+        * storage/indexeddb/cursor-properties-private.html: Added.
+        * storage/indexeddb/cursor-reverse-bug-private-expected.txt: Added.
+        * storage/indexeddb/cursor-reverse-bug-private.html: Added.
+        * storage/indexeddb/cursor-skip-deleted-private-expected.txt: Added.
+        * storage/indexeddb/cursor-skip-deleted-private.html: Added.
+        * storage/indexeddb/cursor-update-private-expected.txt: Added.
+        * storage/indexeddb/cursor-update-private.html: Added.
+        * storage/indexeddb/cursor-update-value-argument-required-private-expected.txt: Added.
+        * storage/indexeddb/cursor-update-value-argument-required-private.html: Added.
+        * storage/indexeddb/cursor-value-private-expected.txt: Added.
+        * storage/indexeddb/cursor-value-private.html: Added.
+        * storage/indexeddb/database-basics-private-expected.txt: Added.
+        * storage/indexeddb/database-basics-private.html: Added.
+        * storage/indexeddb/database-close-private-expected.txt: Added.
+        * storage/indexeddb/database-close-private.html: Added.
+        * storage/indexeddb/database-closepending-flag-private-expected.txt: Added.
+        * storage/indexeddb/database-closepending-flag-private.html: Added.
+        * storage/indexeddb/database-deletepending-flag-private-expected.txt: Added.
+        * storage/indexeddb/database-deletepending-flag-private.html: Added.
+        * storage/indexeddb/database-name-undefined-private-expected.txt: Added.
+        * storage/indexeddb/database-name-undefined-private.html: Added.
+        * storage/indexeddb/database-odd-names-private-expected.txt: Added.
+        * storage/indexeddb/database-odd-names-private.html: Added.
+        * storage/indexeddb/database-quota-private-expected.txt: Added.
+        * storage/indexeddb/database-quota-private.html: Added.
+        * storage/indexeddb/database-wrapper-private-expected.txt: Added.
+        * storage/indexeddb/database-wrapper-private.html: Added.
+        * storage/indexeddb/delete-closed-database-object-private-expected.txt: Added.
+        * storage/indexeddb/delete-closed-database-object-private.html: Added.
+        * storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-private-expected.txt: Added.
+        * storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-private.html: Added.
+        * storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-private-expected.txt: Added.
+        * storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-private.html: Added.
+        * storage/indexeddb/delete-range-private-expected.txt: Added.
+        * storage/indexeddb/delete-range-private.html: Added.
+        * storage/indexeddb/deleteIndex-private-expected.txt: Added.
+        * storage/indexeddb/deleteIndex-private.html: Added.
+        * storage/indexeddb/deleteObjectStore-name-argument-required-private-expected.txt: Added.
+        * storage/indexeddb/deleteObjectStore-name-argument-required-private.html: Added.
+        * storage/indexeddb/deleteObjectStore-null-name-private-expected.txt: Added.
+        * storage/indexeddb/deleteObjectStore-null-name-private.html: Added.
+        * storage/indexeddb/deleted-objects-private-expected.txt: Added.
+        * storage/indexeddb/deleted-objects-private.html: Added.
+        * storage/indexeddb/deletedatabase-blocked-private-expected.txt: Added.
+        * storage/indexeddb/deletedatabase-blocked-private.html: Added.
+        * storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-private-expected.txt: Added.
+        * storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-private.html: Added.
+        * storage/indexeddb/deletedatabase-delayed-by-versionchange-private-expected.txt: Added.
+        * storage/indexeddb/deletedatabase-not-blocked-private-expected.txt: Added.
+        * storage/indexeddb/deletedatabase-not-blocked-private.html: Added.
+        * storage/indexeddb/dont-wedge-private-expected.txt: Added.
+        * storage/indexeddb/dont-wedge-private.html: Added.
+        * storage/indexeddb/duplicates-private-expected.txt: Added.
+        * storage/indexeddb/duplicates-private.html: Added.
+        * storage/indexeddb/error-causes-abort-by-default-private-expected.txt: Added.
+        * storage/indexeddb/error-causes-abort-by-default-private.html: Added.
+        * storage/indexeddb/events-private-expected.txt: Added.
+        * storage/indexeddb/events-private.html: Added.
+        * storage/indexeddb/exception-in-event-aborts-private-expected.txt: Added.
+        * storage/indexeddb/exception-in-event-aborts-private.html: Added.
+        * storage/indexeddb/exceptions-private-expected.txt: Added.
+        * storage/indexeddb/exceptions-private.html: Added.
+        * storage/indexeddb/factory-cmp-private-expected.txt: Added.
+        * storage/indexeddb/factory-cmp-private.html: Added.
+        * storage/indexeddb/factory-deletedatabase-private-expected.txt: Added.
+        * storage/indexeddb/factory-deletedatabase-private.html: Added.
+        * storage/indexeddb/get-keyrange-private-expected.txt: Added.
+        * storage/indexeddb/get-keyrange-private.html: Added.
+        * storage/indexeddb/index-basics-private-expected.txt: Added.
+        * storage/indexeddb/index-basics-private.html: Added.
+        * storage/indexeddb/index-count-private-expected.txt: Added.
+        * storage/indexeddb/index-count-private.html: Added.
+        * storage/indexeddb/index-cursor-private-expected.txt: Added.
+        * storage/indexeddb/index-cursor-private.html: Added.
+        * storage/indexeddb/index-duplicate-keypaths-private-expected.txt: Added.
+        * storage/indexeddb/index-duplicate-keypaths-private.html: Added.
+        * storage/indexeddb/index-get-key-argument-required-private-expected.txt: Added.
+        * storage/indexeddb/index-get-key-argument-required-private.html: Added.
+        * storage/indexeddb/index-multientry-private-expected.txt: Added.
+        * storage/indexeddb/index-multientry-private.html: Added.
+        * storage/indexeddb/index-population-private-expected.txt: Added.
+        * storage/indexeddb/index-population-private.html: Added.
+        * storage/indexeddb/index-unique-private-expected.txt: Added.
+        * storage/indexeddb/index-unique-private.html: Added.
+        * storage/indexeddb/interfaces-private-expected.txt: Added.
+        * storage/indexeddb/interfaces-private.html: Added.
+        * storage/indexeddb/intversion-abort-in-initial-upgradeneeded-private-expected.txt: Added.
+        * storage/indexeddb/intversion-abort-in-initial-upgradeneeded-private.html: Added.
+        * storage/indexeddb/intversion-bad-parameters-private-expected.txt: Added.
+        * storage/indexeddb/intversion-bad-parameters-private.html: Added.
+        * storage/indexeddb/intversion-blocked-private-expected.txt: Added.
+        * storage/indexeddb/intversion-blocked-private.html: Added.
+        * storage/indexeddb/intversion-close-between-events-private-expected.txt: Added.
+        * storage/indexeddb/intversion-close-between-events-private.html: Added.
+        * storage/indexeddb/intversion-close-in-oncomplete-private-expected.txt: Added.
+        * storage/indexeddb/intversion-close-in-oncomplete-private.html: Added.
+        * storage/indexeddb/intversion-close-in-upgradeneeded-private-expected.txt: Added.
+        * storage/indexeddb/intversion-close-in-upgradeneeded-private.html: Added.
+        * storage/indexeddb/intversion-encoding-private-expected.txt: Added.
+        * storage/indexeddb/intversion-encoding-private.html: Added.
+        * storage/indexeddb/intversion-gated-on-delete-private-expected.txt: Added.
+        * storage/indexeddb/intversion-gated-on-delete-private.html: Added.
+        * storage/indexeddb/intversion-long-queue-private-expected.txt: Added.
+        * storage/indexeddb/intversion-long-queue-private.html: Added.
+        * storage/indexeddb/intversion-omit-parameter-private-expected.txt: Added.
+        * storage/indexeddb/intversion-omit-parameter-private.html: Added.
+        * storage/indexeddb/intversion-open-in-upgradeneeded-private-expected.txt: Added.
+        * storage/indexeddb/intversion-open-in-upgradeneeded-private.html: Added.
+        * storage/indexeddb/intversion-open-with-version-private-expected.txt: Added.
+        * storage/indexeddb/intversion-open-with-version-private.html: Added.
+        * storage/indexeddb/intversion-pending-version-changes-ascending-private-expected.txt: Added.
+        * storage/indexeddb/intversion-pending-version-changes-ascending-private.html: Added.
+        * storage/indexeddb/intversion-pending-version-changes-descending-private-expected.txt: Added.
+        * storage/indexeddb/intversion-pending-version-changes-descending-private.html: Added.
+        * storage/indexeddb/intversion-pending-version-changes-same-private-expected.txt: Added.
+        * storage/indexeddb/intversion-pending-version-changes-same-private.html: Added.
+        * storage/indexeddb/intversion-persistence-private-expected.txt: Added.
+        * storage/indexeddb/intversion-persistence-private.html: Added.
+        * storage/indexeddb/intversion-revert-on-abort-private-expected.txt: Added.
+        * storage/indexeddb/intversion-revert-on-abort-private.html: Added.
+        * storage/indexeddb/intversion-two-opens-no-versions-private-expected.txt: Added.
+        * storage/indexeddb/intversion-two-opens-no-versions-private.html: Added.
+        * storage/indexeddb/intversion-upgrades-private-expected.txt: Added.
+        * storage/indexeddb/intversion-upgrades-private.html: Added.
+        * storage/indexeddb/invalid-keys-private-expected.txt: Added.
+        * storage/indexeddb/invalid-keys-private.html: Added.
+        * storage/indexeddb/key-generator-private-expected.txt: Added.
+        * storage/indexeddb/key-generator-private.html: Added.
+        * storage/indexeddb/key-sort-order-across-types-private-expected.txt: Added.
+        * storage/indexeddb/key-sort-order-across-types-private.html: Added.
+        * storage/indexeddb/key-sort-order-date-private-expected.txt: Added.
+        * storage/indexeddb/key-sort-order-date-private.html: Added.
+        * storage/indexeddb/key-type-array-private-expected.txt: Added.
+        * storage/indexeddb/key-type-array-private.html: Added.
+        * storage/indexeddb/key-type-binary-private-expected.txt: Added.
+        * storage/indexeddb/key-type-binary-private.html: Added.
+        * storage/indexeddb/key-type-infinity-private-expected.txt: Added.
+        * storage/indexeddb/key-type-infinity-private.html: Added.
+        * storage/indexeddb/keypath-arrays-private-expected.txt: Added.
+        * storage/indexeddb/keypath-arrays-private.html: Added.
+        * storage/indexeddb/keypath-basics-private-expected.txt: Added.
+        * storage/indexeddb/keypath-basics-private.html: Added.
+        * storage/indexeddb/keypath-edges-private-expected.txt: Added.
+        * storage/indexeddb/keypath-edges-private.html: Added.
+        * storage/indexeddb/keypath-fetch-key-private-expected.txt: Added.
+        * storage/indexeddb/keypath-fetch-key-private.html: Added.
+        * storage/indexeddb/keypath-intrinsic-properties-private-expected.txt: Added.
+        * storage/indexeddb/keypath-intrinsic-properties-private.html: Added.
+        * storage/indexeddb/keyrange-private-expected.txt: Added.
+        * storage/indexeddb/keyrange-private.html: Added.
+        * storage/indexeddb/keyrange-required-arguments-private-expected.txt: Added.
+        * storage/indexeddb/keyrange-required-arguments-private.html: Added.
+        * storage/indexeddb/lazy-index-types-private-expected.txt: Added.
+        * storage/indexeddb/lazy-index-types-private.html: Added.
+        * storage/indexeddb/legacy-constants-private-expected.txt: Added.
+        * storage/indexeddb/legacy-constants-private.html: Added.
+        * storage/indexeddb/list-ordering-private-expected.txt: Added.
+        * storage/indexeddb/list-ordering-private.html: Added.
+        * storage/indexeddb/metadata-private-expected.txt: Added.
+        * storage/indexeddb/metadata-private.html: Added.
+        * storage/indexeddb/mutating-cursor-private-expected.txt: Added.
+        * storage/indexeddb/mutating-cursor-private.html: Added.
+        * storage/indexeddb/objectStore-required-arguments-private-expected.txt: Added.
+        * storage/indexeddb/objectStore-required-arguments-private.html: Added.
+        * storage/indexeddb/objectstore-autoincrement-private-expected.txt: Added.
+        * storage/indexeddb/objectstore-autoincrement-private.html: Added.
+        * storage/indexeddb/objectstore-basics-private-expected.txt: Added.
+        * storage/indexeddb/objectstore-basics-private.html: Added.
+        * storage/indexeddb/objectstore-clear-private-expected.txt: Added.
+        * storage/indexeddb/objectstore-clear-private.html: Added.
+        * storage/indexeddb/objectstore-count-private-expected.txt: Added.
+        * storage/indexeddb/objectstore-count-private.html: Added.
+        * storage/indexeddb/objectstore-cursor-private-expected.txt: Added.
+        * storage/indexeddb/objectstore-cursor-private.html: Added.
+        * storage/indexeddb/objectstore-removeobjectstore-private-expected.txt: Added.
+        * storage/indexeddb/objectstore-removeobjectstore-private.html: Added.
+        * storage/indexeddb/odd-strings-private-expected.txt: Added.
+        * storage/indexeddb/odd-strings-private.html: Added.
+        * storage/indexeddb/open-cursor-private-expected.txt: Added.
+        * storage/indexeddb/open-cursor-private.html: Added.
+        * storage/indexeddb/open-during-transaction-private-expected.txt: Added.
+        * storage/indexeddb/open-during-transaction-private.html: Added.
+        * storage/indexeddb/open-ordering-private-expected.txt: Added.
+        * storage/indexeddb/open-ordering-private.html: Added.
+        * storage/indexeddb/opencursor-key-private-expected.txt: Added.
+        * storage/indexeddb/opencursor-key-private.html: Added.
+        * storage/indexeddb/pending-activity-private-expected.txt: Added.
+        * storage/indexeddb/pending-activity-private.html: Added.
+        * storage/indexeddb/pending-version-change-on-exit-private-expected.txt: Added.
+        * storage/indexeddb/pending-version-change-on-exit-private.html: Added.
+        * storage/indexeddb/pending-version-change-stuck-private-expected.txt: Added.
+        * storage/indexeddb/pending-version-change-stuck-private.html: Added.
+        * storage/indexeddb/persistence-expected.txt:
+        * storage/indexeddb/persistence-private-expected.txt: Copied from LayoutTests/storage/indexeddb/persistence-expected.txt.
+        * storage/indexeddb/persistence-private.html: Added.
+        * storage/indexeddb/prefetch-bugfix-108071-private-expected.txt: Added.
+        * storage/indexeddb/prefetch-bugfix-108071-private.html: Added.
+        * storage/indexeddb/queued-commands-private-expected.txt: Added.
+        * storage/indexeddb/queued-commands-private.html: Added.
+        * storage/indexeddb/readonly-private-expected.txt: Added.
+        * storage/indexeddb/readonly-private.html: Added.
+        * storage/indexeddb/readonly-properties-private-expected.txt: Added.
+        * storage/indexeddb/readonly-properties-private.html: Added.
+        * storage/indexeddb/removed-private-expected.txt: Added.
+        * storage/indexeddb/removed-private.html: Added.
+        * storage/indexeddb/request-continue-abort-private-expected.txt: Added.
+        * storage/indexeddb/request-continue-abort-private.html: Added.
+        * storage/indexeddb/request-event-propagation-private-expected.txt: Added.
+        * storage/indexeddb/request-event-propagation-private.html: Added.
+        * storage/indexeddb/resources/persistence.js:
+        * storage/indexeddb/set_version_blocked-private-expected.txt: Added.
+        * storage/indexeddb/set_version_blocked-private.html: Added.
+        * storage/indexeddb/setversion-blocked-by-versionchange-close-private-expected.txt: Added.
+        * storage/indexeddb/setversion-blocked-by-versionchange-close-private.html: Added.
+        * storage/indexeddb/setversion-not-blocked-private-expected.txt: Added.
+        * storage/indexeddb/setversion-not-blocked-private.html: Added.
+        * storage/indexeddb/transaction-abort-private-expected.txt: Added.
+        * storage/indexeddb/transaction-abort-private.html: Added.
+        * storage/indexeddb/transaction-active-flag-private-expected.txt: Added.
+        * storage/indexeddb/transaction-active-flag-private.html: Added.
+        * storage/indexeddb/transaction-after-close-private-expected.txt: Added.
+        * storage/indexeddb/transaction-after-close-private.html: Added.
+        * storage/indexeddb/transaction-and-objectstore-calls-private-expected.txt: Added.
+        * storage/indexeddb/transaction-and-objectstore-calls-private.html: Added.
+        * storage/indexeddb/transaction-basics-private-expected.txt: Added.
+        * storage/indexeddb/transaction-basics-private.html: Added.
+        * storage/indexeddb/transaction-complete-workers-private-expected.txt: Added.
+        * storage/indexeddb/transaction-complete-workers-private.html: Added.
+        * storage/indexeddb/transaction-coordination-across-databases-private-expected.txt: Added.
+        * storage/indexeddb/transaction-coordination-across-databases-private.html: Added.
+        * storage/indexeddb/transaction-coordination-within-database-private-expected.txt: Added.
+        * storage/indexeddb/transaction-coordination-within-database-private.html: Added.
+        * storage/indexeddb/transaction-crash-on-abort-private-expected.txt: Added.
+        * storage/indexeddb/transaction-crash-on-abort-private.html: Added.
+        * storage/indexeddb/transaction-error-private-expected.txt: Added.
+        * storage/indexeddb/transaction-error-private.html: Added.
+        * storage/indexeddb/transaction-event-propagation-private-expected.txt: Added.
+        * storage/indexeddb/transaction-event-propagation-private.html: Added.
+        * storage/indexeddb/transaction-read-only-private-expected.txt: Added.
+        * storage/indexeddb/transaction-read-only-private.html: Added.
+        * storage/indexeddb/transaction-readwrite-exclusive-private-expected.txt: Added.
+        * storage/indexeddb/transaction-readwrite-exclusive-private.html: Added.
+        * storage/indexeddb/transaction-rollback-private-expected.txt: Added.
+        * storage/indexeddb/transaction-rollback-private.html: Added.
+        * storage/indexeddb/transaction-scope-sequencing-private-expected.txt: Added.
+        * storage/indexeddb/transaction-scope-sequencing-private.html: Added.
+        * storage/indexeddb/transaction-starvation-private-expected.txt: Added.
+        * storage/indexeddb/transaction-storeNames-required-private-expected.txt: Added.
+        * storage/indexeddb/transaction-storeNames-required-private.html: Added.
+        * storage/indexeddb/unblocked-version-changes-private-expected.txt: Added.
+        * storage/indexeddb/unblocked-version-changes-private.html: Added.
+        * storage/indexeddb/unprefix-private-expected.txt: Added.
+        * storage/indexeddb/unprefix-private.html: Added.
+        * storage/indexeddb/value-undefined-private-expected.txt: Added.
+        * storage/indexeddb/value-undefined-private.html: Added.
+        * storage/indexeddb/values-odd-types-private-expected.txt: Added.
+        * storage/indexeddb/values-odd-types-private.html: Added.
+        * storage/indexeddb/version-change-abort-private-expected.txt: Added.
+        * storage/indexeddb/version-change-abort-private.html: Added.
+        * storage/indexeddb/version-change-exclusive-private-expected.txt: Added.
+        * storage/indexeddb/version-change-exclusive-private.html: Added.
+        * storage/indexeddb/versionchangerequest-activedomobject-private-expected.txt: Added.
+        * storage/indexeddb/versionchangerequest-activedomobject-private.html: Added.
+
 2016-01-18  Nan Wang  <n_wang@apple.com>
 
         AX: [Mac] Implement next/previous text marker functions using TextIterator
index 1a3f4e9..eecb541 100644 (file)
@@ -667,7 +667,9 @@ webkit.org/b/144258 [ Debug ] js/class-syntax-semicolon.html [ Skip ]
 # IDBVersionChangeEvent tests need to be rewritten to use event constructors instead of createEvent,
 # after we implement the IDBVersionChangeEvent constructor.
 webkit.org/b/145390 storage/indexeddb/events.html [ Failure ]
+webkit.org/b/145390 storage/indexeddb/events-private.html [ Failure ]
 webkit.org/b/145390 storage/indexeddb/removed.html [ Failure ]
+webkit.org/b/145390 storage/indexeddb/removed-private.html [ Failure ]
 
 webkit.org/b/145390 storage/indexeddb/deleteIndex-bug110792.html [ Pass Failure ]
 
index 4ae5388..67fc984 100644 (file)
@@ -78,6 +78,7 @@ imported/w3c/indexeddb/idbindex_openKeyCursor3.htm [ Failure ]
 
 # Times out for unexplored reasons                                                             
 storage/indexeddb/database-quota.html [ Skip ]
+storage/indexeddb/database-quota-private.html [ Skip ]
 
 # Modern IDB page cache interaction not yet sorted out
 fast/history/page-cache-indexed-closed-db.html [ Failure ]
@@ -91,6 +92,7 @@ storage/indexeddb/connection-leak.html [ Skip ]
 storage/indexeddb/cursor-leak.html [ Failure ]
 storage/indexeddb/cursor-request-cycle.html [ Failure ]
 storage/indexeddb/delete-closed-database-object.html [ Skip ]
+storage/indexeddb/delete-closed-database-object-private.html [ Skip ]
 storage/indexeddb/request-leak.html [ Failure ]
 
 # No workers support in Modern IDB yet
@@ -106,9 +108,12 @@ storage/indexeddb/objectstore-basics-workers.html
 storage/indexeddb/open-twice-workers.html
 storage/indexeddb/pending-activity-workers.html
 storage/indexeddb/pending-version-change-on-exit.html
+storage/indexeddb/pending-version-change-on-exit-private.html
 storage/indexeddb/pending-version-change-stuck-works-with-terminate.html
 storage/indexeddb/pending-version-change-stuck.html
+storage/indexeddb/pending-version-change-stuck-private.html
 storage/indexeddb/transaction-complete-workers.html
+storage/indexeddb/transaction-complete-workers-private.html
 storage/indexeddb/unprefix-workers.html
 
 # Need a different way to get database names to the web inspector
index d73e22a..1f633d0 100644 (file)
@@ -719,6 +719,158 @@ webkit.org/b/115274 http/tests/security/contentSecurityPolicy/report-cross-origi
 webkit.org/b/115274 http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled.html [ Skip ]
 webkit.org/b/115274 http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled.html [ Skip ]
 
+# Legacy IndexedDB will never properly support IDB in private browsing
+storage/indexeddb/aborted-versionchange-closes-private.html
+storage/indexeddb/basics-private.html
+storage/indexeddb/create-and-remove-object-store-private.html
+storage/indexeddb/create-object-store-options-private.html
+storage/indexeddb/createIndex-after-failure-private.html
+storage/indexeddb/createObjectStore-name-argument-required-private.html
+storage/indexeddb/createObjectStore-null-name-private.html
+storage/indexeddb/cursor-added-bug-private.html
+storage/indexeddb/cursor-advance-private.html
+storage/indexeddb/cursor-basics-private.html
+storage/indexeddb/cursor-continue-dir-private.html
+storage/indexeddb/cursor-continue-private.html
+storage/indexeddb/cursor-continue-validity-private.html
+storage/indexeddb/cursor-delete-private.html
+storage/indexeddb/cursor-finished-private.html
+storage/indexeddb/cursor-inconsistency-private.html
+storage/indexeddb/cursor-index-delete-private.html
+storage/indexeddb/cursor-key-order-private.html
+storage/indexeddb/cursor-prev-no-duplicate-private.html
+storage/indexeddb/cursor-primary-key-order-private.html
+storage/indexeddb/cursor-properties-private.html
+storage/indexeddb/cursor-reverse-bug-private.html
+storage/indexeddb/cursor-skip-deleted-private.html
+storage/indexeddb/cursor-update-private.html
+storage/indexeddb/cursor-update-value-argument-required-private.html
+storage/indexeddb/cursor-value-private.html
+storage/indexeddb/database-basics-private.html
+storage/indexeddb/database-close-private.html
+storage/indexeddb/database-closepending-flag-private.html
+storage/indexeddb/database-deletepending-flag-private.html
+storage/indexeddb/database-name-undefined-private.html
+storage/indexeddb/database-odd-names-private.html
+storage/indexeddb/database-quota-private.html
+storage/indexeddb/database-wrapper-private.html
+storage/indexeddb/delete-closed-database-object-private.html
+storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-private.html
+storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-private.html
+storage/indexeddb/delete-range-private.html
+storage/indexeddb/deleteIndex-private.html
+storage/indexeddb/deleteObjectStore-name-argument-required-private.html
+storage/indexeddb/deleteObjectStore-null-name-private.html
+storage/indexeddb/deleted-objects-private.html
+storage/indexeddb/deletedatabase-blocked-private.html
+storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-private.html
+storage/indexeddb/deletedatabase-not-blocked-private.html
+storage/indexeddb/dont-wedge-private.html
+storage/indexeddb/duplicates-private.html
+storage/indexeddb/error-causes-abort-by-default-private.html
+storage/indexeddb/events-private.html
+storage/indexeddb/exception-in-event-aborts-private.html
+storage/indexeddb/exceptions-private.html
+storage/indexeddb/factory-cmp-private.html
+storage/indexeddb/factory-deletedatabase-private.html
+storage/indexeddb/get-keyrange-private.html
+storage/indexeddb/index-basics-private.html
+storage/indexeddb/index-count-private.html
+storage/indexeddb/index-cursor-private.html
+storage/indexeddb/index-duplicate-keypaths-private.html
+storage/indexeddb/index-get-key-argument-required-private.html
+storage/indexeddb/index-multientry-private.html
+storage/indexeddb/index-population-private.html
+storage/indexeddb/index-unique-private.html
+storage/indexeddb/interfaces-private.html
+storage/indexeddb/intversion-abort-in-initial-upgradeneeded-private.html
+storage/indexeddb/intversion-bad-parameters-private.html
+storage/indexeddb/intversion-blocked-private.html
+storage/indexeddb/intversion-close-between-events-private.html
+storage/indexeddb/intversion-close-in-oncomplete-private.html
+storage/indexeddb/intversion-close-in-upgradeneeded-private.html
+storage/indexeddb/intversion-encoding-private.html
+storage/indexeddb/intversion-gated-on-delete-private.html
+storage/indexeddb/intversion-long-queue-private.html
+storage/indexeddb/intversion-omit-parameter-private.html
+storage/indexeddb/intversion-open-in-upgradeneeded-private.html
+storage/indexeddb/intversion-open-with-version-private.html
+storage/indexeddb/intversion-pending-version-changes-ascending-private.html
+storage/indexeddb/intversion-pending-version-changes-descending-private.html
+storage/indexeddb/intversion-pending-version-changes-same-private.html
+storage/indexeddb/intversion-persistence-private.html
+storage/indexeddb/intversion-revert-on-abort-private.html
+storage/indexeddb/intversion-two-opens-no-versions-private.html
+storage/indexeddb/intversion-upgrades-private.html
+storage/indexeddb/invalid-keys-private.html
+storage/indexeddb/key-generator-private.html
+storage/indexeddb/key-sort-order-across-types-private.html
+storage/indexeddb/key-sort-order-date-private.html
+storage/indexeddb/key-type-array-private.html
+storage/indexeddb/key-type-binary-private.html
+storage/indexeddb/key-type-infinity-private.html
+storage/indexeddb/keypath-arrays-private.html
+storage/indexeddb/keypath-basics-private.html
+storage/indexeddb/keypath-edges-private.html
+storage/indexeddb/keypath-fetch-key-private.html
+storage/indexeddb/keypath-intrinsic-properties-private.html
+storage/indexeddb/keyrange-private.html
+storage/indexeddb/keyrange-required-arguments-private.html
+storage/indexeddb/lazy-index-types-private.html
+storage/indexeddb/legacy-constants-private.html
+storage/indexeddb/list-ordering-private.html
+storage/indexeddb/metadata-private.html
+storage/indexeddb/mutating-cursor-private.html
+storage/indexeddb/objectStore-required-arguments-private.html
+storage/indexeddb/objectstore-autoincrement-private.html
+storage/indexeddb/objectstore-basics-private.html
+storage/indexeddb/objectstore-clear-private.html
+storage/indexeddb/objectstore-count-private.html
+storage/indexeddb/objectstore-cursor-private.html
+storage/indexeddb/objectstore-removeobjectstore-private.html
+storage/indexeddb/odd-strings-private.html
+storage/indexeddb/open-cursor-private.html
+storage/indexeddb/open-during-transaction-private.html
+storage/indexeddb/open-ordering-private.html
+storage/indexeddb/opencursor-key-private.html
+storage/indexeddb/pending-activity-private.html
+storage/indexeddb/pending-version-change-on-exit-private.html
+storage/indexeddb/pending-version-change-stuck-private.html
+storage/indexeddb/persistence-private.html
+storage/indexeddb/prefetch-bugfix-108071-private.html
+storage/indexeddb/queued-commands-private.html
+storage/indexeddb/readonly-private.html
+storage/indexeddb/readonly-properties-private.html
+storage/indexeddb/removed-private.html
+storage/indexeddb/request-continue-abort-private.html
+storage/indexeddb/request-event-propagation-private.html
+storage/indexeddb/set_version_blocked-private.html
+storage/indexeddb/setversion-blocked-by-versionchange-close-private.html
+storage/indexeddb/setversion-not-blocked-private.html
+storage/indexeddb/transaction-abort-private.html
+storage/indexeddb/transaction-active-flag-private.html
+storage/indexeddb/transaction-after-close-private.html
+storage/indexeddb/transaction-and-objectstore-calls-private.html
+storage/indexeddb/transaction-basics-private.html
+storage/indexeddb/transaction-complete-workers-private.html
+storage/indexeddb/transaction-coordination-across-databases-private.html
+storage/indexeddb/transaction-coordination-within-database-private.html
+storage/indexeddb/transaction-crash-on-abort-private.html
+storage/indexeddb/transaction-error-private.html
+storage/indexeddb/transaction-event-propagation-private.html
+storage/indexeddb/transaction-read-only-private.html
+storage/indexeddb/transaction-readwrite-exclusive-private.html
+storage/indexeddb/transaction-rollback-private.html
+storage/indexeddb/transaction-scope-sequencing-private.html
+storage/indexeddb/transaction-storeNames-required-private.html
+storage/indexeddb/unblocked-version-changes-private.html
+storage/indexeddb/unprefix-private.html
+storage/indexeddb/value-undefined-private.html
+storage/indexeddb/values-odd-types-private.html
+storage/indexeddb/versionchangerequest-activedomobject-private.html
+storage/indexeddb/version-change-abort-private.html
+storage/indexeddb/version-change-exclusive-private.html
+
 ### END OF (4) Features that are not supported in WebKit2 and likely never will be
 ########################################
 
index 9cc7af2..7ee25d7 100644 (file)
@@ -1,9 +1,13 @@
-// svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump text + pixel results
 if (self.testRunner) {
+       // svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump text + pixel results
     if (self.enablePixelTesting)
         testRunner.dumpAsTextWithPixelResults();
     else
         testRunner.dumpAsText();
+
+    // If the test file URL ends in "-private.html", enable private browsing.
+    if (window.location.href.endsWith("-private.html"))
+        testRunner.setPrivateBrowsingEnabled(true);
 }
 
 var description, debug, successfullyParsed;
diff --git a/LayoutTests/storage/indexeddb/aborted-versionchange-closes-private-expected.txt b/LayoutTests/storage/indexeddb/aborted-versionchange-closes-private-expected.txt
new file mode 100644 (file)
index 0000000..291971a
--- /dev/null
@@ -0,0 +1,47 @@
+Test that an aborted 'versionchange' transaction closes the connection.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname, 1)
+
+prepareDatabase():
+db = event.target.result
+db.createObjectStore('store')
+
+onOpen():
+db = event.target.result
+db.close()
+
+openAgain():
+request = indexedDB.open(dbname, 2)
+
+onUpgradeNeeded():
+db = event.target.result
+transaction = event.target.transaction
+sawTransactionAbort = false
+
+onTransactionAbort():
+sawTransactionAbort = true
+creating a transaction should fail because connection is closed:
+Expecting exception from db.transaction('store')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
+
+onOpenError():
+PASS sawTransactionAbort is true
+creating a transaction should fail because connection is closed:
+Expecting exception from db.transaction('store')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/aborted-versionchange-closes-private.html b/LayoutTests/storage/indexeddb/aborted-versionchange-closes-private.html
new file mode 100644 (file)
index 0000000..c519185
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/aborted-versionchange-closes.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/basics-private-expected.txt b/LayoutTests/storage/indexeddb/basics-private-expected.txt
new file mode 100644 (file)
index 0000000..bf9efb8
--- /dev/null
@@ -0,0 +1,46 @@
+Test IndexedDB's basics.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.open('basics')
+PASS 'result' in request is true
+Expecting exception from request.result
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to read the 'result' property from 'IDBRequest': The request has not finished.
+PASS 'error' in request is true
+Expecting exception from request.error
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to read the 'error' property from 'IDBRequest': The request has not finished.
+PASS 'source' in request is true
+PASS request.source is null
+PASS 'transaction' in request is true
+PASS request.transaction is null
+PASS 'readyState' in request is true
+PASS request.readyState is "pending"
+PASS 'onsuccess' in request is true
+PASS request.onsuccess is null
+PASS 'onerror' in request is true
+PASS request.onerror is null
+PASS 'result' in event.target is true
+PASS !!event.target.result is true
+PASS 'error' in event.target is true
+PASS event.target.error is null
+PASS 'source' in event.target is true
+PASS request.source is null
+PASS 'transaction' in event.target is true
+PASS event.target.transaction is null
+PASS 'readyState' in request is true
+PASS event.target.readyState is "done"
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/basics-private.html b/LayoutTests/storage/indexeddb/basics-private.html
new file mode 100644 (file)
index 0000000..465971f
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/basics.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/create-and-remove-object-store-private-expected.txt b/LayoutTests/storage/indexeddb/create-and-remove-object-store-private-expected.txt
new file mode 100644 (file)
index 0000000..dbe9645
--- /dev/null
@@ -0,0 +1,46 @@
+Test IndexedDB's create and removeObjectStore
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore('tmp')
+Expecting exception from db.createObjectStore('tmp')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ConstraintError'
+Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': An object store with the specified name already exists.
+trans = db.transaction(['tmp'])
+trans.objectStore('tmp').get(0)
+PASS event.target.result is undefined.
+Trying create
+Expecting exception from db.createObjectStore("some os")
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
+Trying remove
+Expecting exception from db.deleteObjectStore("some os")
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
+Trying create with store that already exists
+Expecting exception from db.createObjectStore('tmp')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
+Trying remove with store that already exists
+Expecting exception from db.deleteObjectStore('tmp')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/create-and-remove-object-store-private.html b/LayoutTests/storage/indexeddb/create-and-remove-object-store-private.html
new file mode 100644 (file)
index 0000000..623debf
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/create-and-remove-object-store.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/create-object-store-options-private-expected.txt b/LayoutTests/storage/indexeddb/create-object-store-options-private-expected.txt
new file mode 100644 (file)
index 0000000..f5b2e52
--- /dev/null
@@ -0,0 +1,30 @@
+Test IndexedDB's createObjectStore's various options
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore('a', {keyPath: 'a'})
+db.createObjectStore('b')
+db.createObjectStore('c', {autoIncrement: true});
+trans = db.transaction(['a', 'b'], 'readwrite')
+PASS trans.mode is "readwrite"
+trans.objectStore('a').put({'a': 0})
+Expecting TypeError exception from db.createObjectStore('d', 'bar');
+PASS Exception was thrown.
+PASS db.createObjectStore('d', 'bar'); threw TypeError: Not an object.
+Expecting TypeError exception from db.createObjectStore('e', false);
+PASS Exception was thrown.
+PASS db.createObjectStore('e', false); threw TypeError: Not an object.
+trans.objectStore('b').put({'a': 0}, 0)
+trans.objectStore('a').get(0)
+PASS event.target.result.a is {a: 0}
+trans.objectStore('b').get(0)
+PASS event.target.result.a is {a: 0}
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/create-object-store-options-private.html b/LayoutTests/storage/indexeddb/create-object-store-options-private.html
new file mode 100644 (file)
index 0000000..1a715cb
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/create-object-store-options.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/createIndex-after-failure-private-expected.txt b/LayoutTests/storage/indexeddb/createIndex-after-failure-private-expected.txt
new file mode 100644 (file)
index 0000000..3ff1f4a
--- /dev/null
@@ -0,0 +1,24 @@
+Test createIndex failing due to a ConstraintError
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+objectStore.createIndex('index', 'key', {unique: true})
+objectStore.deleteIndex('index')
+Expecting exception from objectStore.deleteIndex('index')
+PASS Exception was thrown.
+PASS code is DOMException.NOT_FOUND_ERR
+PASS ename is 'NotFoundError'
+Exception message: Failed to execute 'deleteIndex' on 'IDBObjectStore': The specified index was not found.
+Now requesting object2
+now we wait.
+Error function called: (AbortError) undefined
+PASS Abort function called: (ConstraintError) undefined
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/createIndex-after-failure-private.html b/LayoutTests/storage/indexeddb/createIndex-after-failure-private.html
new file mode 100644 (file)
index 0000000..3125881
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/createIndex-after-failure.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/createObjectStore-name-argument-required-private-expected.txt b/LayoutTests/storage/indexeddb/createObjectStore-name-argument-required-private-expected.txt
new file mode 100644 (file)
index 0000000..359b7b4
--- /dev/null
@@ -0,0 +1,15 @@
+Test IndexedDB createObjectStore name argument is required
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db = event.target.result
+PASS db.createObjectStore(); threw exception TypeError: Not enough arguments.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/createObjectStore-name-argument-required-private.html b/LayoutTests/storage/indexeddb/createObjectStore-name-argument-required-private.html
new file mode 100644 (file)
index 0000000..e124f9b
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/createObjectStore-name-argument-required.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/createObjectStore-null-name-private-expected.txt b/LayoutTests/storage/indexeddb/createObjectStore-null-name-private-expected.txt
new file mode 100644 (file)
index 0000000..f34bbbc
--- /dev/null
@@ -0,0 +1,15 @@
+Test IndexedDB createObjectStore null handling
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore(null);
+PASS objectStore.name is "null"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/createObjectStore-null-name-private.html b/LayoutTests/storage/indexeddb/createObjectStore-null-name-private.html
new file mode 100644 (file)
index 0000000..4116a99
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/createObjectStore-null-name.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-added-bug-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-added-bug-private-expected.txt
new file mode 100644 (file)
index 0000000..81dc034
--- /dev/null
@@ -0,0 +1,37 @@
+Test IndexedDB cursor iterates correctly over values added during iteration.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+trans = event.target.transaction
+PASS trans is non-null.
+objectStore = db.createObjectStore('test')
+objectStore.add(1, 1)
+objectStore.add(2, 2)
+objectStore.add(3, 3)
+trans = db.transaction(['test'], 'readwrite')
+trans.objectStore('test').openCursor()
+PASS event.target.result.key is 1
+trans.objectStore('test').add(6, 6)
+event.target.result.continue()
+PASS event.target.result.key is 2
+trans.objectStore('test').add(5, 5)
+event.target.result.continue()
+PASS event.target.result.key is 3
+trans.objectStore('test').add(4, 4)
+event.target.result.continue()
+PASS event.target.result.key is 4
+event.target.result.continue()
+PASS event.target.result.key is 5
+event.target.result.continue()
+PASS event.target.result.key is 6
+event.target.result.continue()
+PASS counter is 6
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-added-bug-private.html b/LayoutTests/storage/indexeddb/cursor-added-bug-private.html
new file mode 100644 (file)
index 0000000..614012f
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-added-bug.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-advance-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-advance-private-expected.txt
new file mode 100644 (file)
index 0000000..8a6277b
--- /dev/null
@@ -0,0 +1,253 @@
+Test IndexedDB cursor.advance().
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+
+prepareDatabase():
+objectStore = db.createObjectStore(objectStoreName);
+Now create the indexes.
+objectStore.createIndex(indexData[i].name, indexData[i].keyPath, indexData[i].options);
+objectStore.createIndex(indexData[i].name, indexData[i].keyPath, indexData[i].options);
+objectStore.createIndex(indexData[i].name, indexData[i].keyPath, indexData[i].options);
+trans = db.transaction(objectStoreName, 'readwrite')
+objectStore = trans.objectStore(objectStoreName)
+First, add all our data to the object store.
+request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
+request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
+request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
+request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
+request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
+request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
+request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
+request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
+request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
+request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
+request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
+request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
+request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
+testSimple()
+trans = db.transaction(objectStoreName)
+store = trans.objectStore(objectStoreName)
+request = store.openCursor()
+cursor.advance(1)
+PASS expected is "{\"key\":\"237-23-7733\",\"value\":{\"name\":\"Ann\",\"height\":52,\"weight\":110},\"primaryKey\":\"237-23-7733\"}"
+testContinueThenAdvance()
+trans = db.transaction(objectStoreName)
+store = trans.objectStore(objectStoreName)
+request = store.openCursor()
+cursor.continue();
+cursor.continue();
+cursor.continue();
+cursor.advance(1)
+PASS expected is "{\"key\":\"237-23-7736\",\"value\":{\"name\":\"Joe\",\"height\":65,\"weight\":150},\"primaryKey\":\"237-23-7736\"}"
+testAdvanceMultiple()
+trans = db.transaction(objectStoreName)
+store = trans.objectStore(objectStoreName)
+request = store.openCursor()
+cursor.advance(3)
+PASS expected is "{\"key\":\"237-23-7735\",\"value\":{\"name\":\"Sue\",\"height\":58,\"weight\":130},\"primaryKey\":\"237-23-7735\"}"
+testAdvanceIndex()
+trans = db.transaction(objectStoreName)
+store = trans.objectStore(objectStoreName)
+request = store.openCursor()
+cursor.advance(3)
+PASS expected is "{\"key\":\"Jef\",\"value\":{\"name\":\"Jef\",\"height\":65,\"weight\":120},\"primaryKey\":\"237-23-7739\"}"
+testAdvanceIndexNoDupe()
+trans = db.transaction(objectStoreName)
+store = trans.objectStore(objectStoreName)
+request = store.openCursor(null, 'nextunique')
+cursor.advance(3)
+PASS expected is "{\"key\":130,\"value\":{\"name\":\"Sue\",\"height\":58,\"weight\":130},\"primaryKey\":\"237-23-7735\"}"
+testAdvanceIndexPrev()
+trans = db.transaction(objectStoreName)
+store = trans.objectStore(objectStoreName)
+request = store.openCursor(null, 'prev')
+cursor.advance(3)
+PASS expected is "{\"key\":150,\"value\":{\"name\":\"Joe\",\"height\":65,\"weight\":150},\"primaryKey\":\"237-23-7736\"}"
+testAdvanceIndexPrevNoDupe()
+trans = db.transaction(objectStoreName)
+store = trans.objectStore(objectStoreName)
+request = store.openCursor(null, 'prevunique')
+cursor.advance(3)
+PASS expected is "{\"key\":120,\"value\":{\"name\":\"Bob\",\"height\":60,\"weight\":120},\"primaryKey\":\"237-23-7732\"}"
+testAdvanceToEnd()
+trans = db.transaction(objectStoreName)
+store = trans.objectStore(objectStoreName)
+request = store.openCursor()
+cursor.advance(100)
+PASS expected is "null"
+testPrefetchInRange()
+trans = db.transaction(objectStoreName)
+objectStore = trans.objectStore(objectStoreName)
+request = objectStore.openCursor()
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7732\",\"value\":{\"name\":\"Bob\",\"height\":60,\"weight\":120},\"primaryKey\":\"237-23-7732\"}"
+cursor.continue()
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7733\",\"value\":{\"name\":\"Ann\",\"height\":52,\"weight\":110},\"primaryKey\":\"237-23-7733\"}"
+cursor.continue()
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7734\",\"value\":{\"name\":\"Ron\",\"height\":73,\"weight\":180},\"primaryKey\":\"237-23-7734\"}"
+cursor.continue()
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7735\",\"value\":{\"name\":\"Sue\",\"height\":58,\"weight\":130},\"primaryKey\":\"237-23-7735\"}"
+cursor.advance(2)
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7737\",\"value\":{\"name\":\"Pat\",\"height\":65,\"weight\":100},\"primaryKey\":\"237-23-7737\"}"
+cursor.continue()
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7738\",\"value\":{\"name\":\"Leo\",\"height\":65,\"weight\":180},\"primaryKey\":\"237-23-7738\"}"
+cursor.continue()
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7739\",\"value\":{\"name\":\"Jef\",\"height\":65,\"weight\":120},\"primaryKey\":\"237-23-7739\"}"
+cursor.continue()
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7740\",\"value\":{\"name\":\"Sam\",\"height\":71,\"weight\":110},\"primaryKey\":\"237-23-7740\"}"
+cursor.continue()
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7741\",\"value\":{\"name\":\"Bug\",\"height\":63,\"weight\":100},\"primaryKey\":\"237-23-7741\"}"
+cursor.continue()
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7742\",\"value\":{\"name\":\"Tub\",\"height\":69,\"weight\":180},\"primaryKey\":\"237-23-7742\"}"
+cursor.continue()
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7743\",\"value\":{\"name\":\"Rug\",\"height\":77,\"weight\":120},\"primaryKey\":\"237-23-7743\"}"
+cursor.continue()
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7744\",\"value\":{\"name\":\"Pug\",\"height\":66,\"weight\":110},\"primaryKey\":\"237-23-7744\"}"
+cursor.continue()
+
+prefetch():
+testPrefetchOutOfRange()
+trans = db.transaction(objectStoreName)
+objectStore = trans.objectStore(objectStoreName)
+request = objectStore.openCursor()
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7732\",\"value\":{\"name\":\"Bob\",\"height\":60,\"weight\":120},\"primaryKey\":\"237-23-7732\"}"
+cursor.continue()
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7733\",\"value\":{\"name\":\"Ann\",\"height\":52,\"weight\":110},\"primaryKey\":\"237-23-7733\"}"
+cursor.continue()
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7734\",\"value\":{\"name\":\"Ron\",\"height\":73,\"weight\":180},\"primaryKey\":\"237-23-7734\"}"
+cursor.continue()
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7735\",\"value\":{\"name\":\"Sue\",\"height\":58,\"weight\":130},\"primaryKey\":\"237-23-7735\"}"
+cursor.advance(7)
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7742\",\"value\":{\"name\":\"Tub\",\"height\":69,\"weight\":180},\"primaryKey\":\"237-23-7742\"}"
+cursor.continue()
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7743\",\"value\":{\"name\":\"Rug\",\"height\":77,\"weight\":120},\"primaryKey\":\"237-23-7743\"}"
+cursor.continue()
+
+prefetch():
+PASS expected is "{\"key\":\"237-23-7744\",\"value\":{\"name\":\"Pug\",\"height\":66,\"weight\":110},\"primaryKey\":\"237-23-7744\"}"
+cursor.continue()
+
+prefetch():
+testBadAdvance()
+trans = db.transaction(objectStoreName, 'readwrite')
+objectStore = trans.objectStore(objectStoreName)
+request = objectStore.openCursor()
+
+advanceBadly():
+Expecting TypeError exception from cursor.advance(0)
+PASS Exception was thrown.
+PASS cursor.advance(0) threw TypeError: Failed to execute 'advance' on 'IDBCursor': A count argument with value 0 (zero) was supplied, must be greater than 0.
+Expecting TypeError exception from cursor.advance(-1)
+PASS Exception was thrown.
+PASS cursor.advance(-1) threw TypeError: Value -1 is outside the range [0, 4294967295]
+Expecting TypeError exception from cursor.advance(0x100000000)
+PASS Exception was thrown.
+PASS cursor.advance(0x100000000) threw TypeError: Value 4294967296 is outside the range [0, 4294967295]
+Expecting TypeError exception from cursor.advance(0x20000000000000)
+PASS Exception was thrown.
+PASS cursor.advance(0x20000000000000) threw TypeError: Value 9007199254740992 is outside the range [0, 4294967295]
+
+testEdges():
+trans = db.transaction(objectStoreName, 'readonly')
+objectStore = trans.objectStore(objectStoreName)
+request = objectStore.openCursor()
+
+onSuccess():
+cursor = event.target.result
+PASS cursor is non-null.
+cursor.advance(0xffffffff)
+
+onSuccess():
+cursor = event.target.result
+PASS cursor is null
+testDelete()
+trans = db.transaction(objectStoreName, 'readwrite')
+objectStore = trans.objectStore(objectStoreName)
+request = objectStore.openCursor()
+
+deleteSecond():
+PASS expected is "{\"key\":\"237-23-7732\",\"value\":{\"name\":\"Bob\",\"height\":60,\"weight\":120},\"primaryKey\":\"237-23-7732\"}"
+cursor.advance(1)
+
+deleteSecond():
+PASS expected is "{\"key\":\"237-23-7733\",\"value\":{\"name\":\"Ann\",\"height\":52,\"weight\":110},\"primaryKey\":\"237-23-7733\"}"
+cursor.advance(1)
+
+deleteSecond():
+PASS expected is "{\"key\":\"237-23-7734\",\"value\":{\"name\":\"Ron\",\"height\":73,\"weight\":180},\"primaryKey\":\"237-23-7734\"}"
+cursor.delete()
+
+deleteSecond():
+PASS expected is "{\"key\":\"237-23-7738\",\"value\":{\"name\":\"Leo\",\"height\":65,\"weight\":180},\"primaryKey\":\"237-23-7738\"}"
+cursor.advance(1)
+
+deleteSecond():
+PASS expected is "{\"key\":\"237-23-7739\",\"value\":{\"name\":\"Jef\",\"height\":65,\"weight\":120},\"primaryKey\":\"237-23-7739\"}"
+cursor.advance(1)
+
+deleteSecond():
+PASS expected is "{\"key\":\"237-23-7740\",\"value\":{\"name\":\"Sam\",\"height\":71,\"weight\":110},\"primaryKey\":\"237-23-7740\"}"
+cursor.advance(1)
+
+deleteSecond():
+PASS expected is "{\"key\":\"237-23-7741\",\"value\":{\"name\":\"Bug\",\"height\":63,\"weight\":100},\"primaryKey\":\"237-23-7741\"}"
+cursor.advance(1)
+
+deleteSecond():
+PASS expected is "{\"key\":\"237-23-7742\",\"value\":{\"name\":\"Tub\",\"height\":69,\"weight\":180},\"primaryKey\":\"237-23-7742\"}"
+cursor.advance(1)
+
+deleteSecond():
+PASS expected is "{\"key\":\"237-23-7743\",\"value\":{\"name\":\"Rug\",\"height\":77,\"weight\":120},\"primaryKey\":\"237-23-7743\"}"
+cursor.advance(1)
+
+deleteSecond():
+PASS expected is "{\"key\":\"237-23-7744\",\"value\":{\"name\":\"Pug\",\"height\":66,\"weight\":110},\"primaryKey\":\"237-23-7744\"}"
+cursor.advance(1)
+
+deleteSecond():
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-advance-private.html b/LayoutTests/storage/indexeddb/cursor-advance-private.html
new file mode 100644 (file)
index 0000000..2eb9abe
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-advance.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-basics-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-basics-private-expected.txt
new file mode 100644 (file)
index 0000000..379f57f
--- /dev/null
@@ -0,0 +1,87 @@
+Test the basics of IndexedDB's IDBCursor objects.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+
+prepareDatabase():
+store = db.createObjectStore('storeName')
+index = store.createIndex('indexName', 'indexOn')
+store.put({indexOn: 'a'}, 0)
+store.openCursor()
+index.openCursor()
+index.openKeyCursor()
+
+onStoreOpenCursor():
+cursor = event.target.result
+PASS cursor is non-null.
+PASS cursor instanceof IDBCursor is true
+PASS 'key' in cursor is true
+PASS 'primaryKey' in cursor is true
+PASS 'continue' in cursor is true
+PASS typeof cursor.continue is "function"
+FAIL 'continuePrimaryKey' in cursor should be true. Was false.
+FAIL typeof cursor.continuePrimaryKey should be function. Was undefined.
+PASS 'advance' in cursor is true
+PASS typeof cursor.advance is "function"
+PASS 'update' in cursor is true
+PASS typeof cursor.update is "function"
+PASS 'delete' in cursor is true
+PASS typeof cursor.delete is "function"
+PASS cursor.key is 0
+PASS cursor.primaryKey is 0
+PASS cursor instanceof IDBCursorWithValue is true
+PASS 'value' in cursor is true
+PASS JSON.stringify(cursor.value) is "{\"indexOn\":\"a\"}"
+
+onIndexOpenCursor():
+cursor = event.target.result
+PASS cursor is non-null.
+PASS cursor instanceof IDBCursor is true
+PASS 'key' in cursor is true
+PASS 'primaryKey' in cursor is true
+PASS 'continue' in cursor is true
+PASS typeof cursor.continue is "function"
+FAIL 'continuePrimaryKey' in cursor should be true. Was false.
+FAIL typeof cursor.continuePrimaryKey should be function. Was undefined.
+PASS 'advance' in cursor is true
+PASS typeof cursor.advance is "function"
+PASS 'update' in cursor is true
+PASS typeof cursor.update is "function"
+PASS 'delete' in cursor is true
+PASS typeof cursor.delete is "function"
+PASS cursor.key is "a"
+PASS cursor.primaryKey is 0
+PASS cursor instanceof IDBCursorWithValue is true
+PASS 'value' in cursor is true
+PASS JSON.stringify(cursor.value) is "{\"indexOn\":\"a\"}"
+
+onIndexOpenKeyCursor():
+cursor = event.target.result
+PASS cursor is non-null.
+PASS cursor instanceof IDBCursor is true
+PASS 'key' in cursor is true
+PASS 'primaryKey' in cursor is true
+PASS 'continue' in cursor is true
+PASS typeof cursor.continue is "function"
+FAIL 'continuePrimaryKey' in cursor should be true. Was false.
+FAIL typeof cursor.continuePrimaryKey should be function. Was undefined.
+PASS 'advance' in cursor is true
+PASS typeof cursor.advance is "function"
+PASS 'update' in cursor is true
+PASS typeof cursor.update is "function"
+PASS 'delete' in cursor is true
+PASS typeof cursor.delete is "function"
+PASS cursor.key is "a"
+PASS cursor.primaryKey is 0
+PASS cursor instanceof IDBCursorWithValue is false
+PASS cursor.primaryKey is 0
+PASS 'value' in cursor is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-basics-private.html b/LayoutTests/storage/indexeddb/cursor-basics-private.html
new file mode 100644 (file)
index 0000000..ee5cc7f
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-basics.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-continue-dir-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-continue-dir-private-expected.txt
new file mode 100644 (file)
index 0000000..be2e77d
--- /dev/null
@@ -0,0 +1,46 @@
+Test that continue() calls against cursors are validated by direction.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = db.createObjectStore('store')
+store.put(1,1)
+store.put(2,2)
+store.put(3,3)
+store.put(4,4)
+store.put(5,5)
+store.put(6,6)
+store.put(7,7)
+store.put(8,8)
+store.put(9,9)
+store.put(10,10)
+trans = db.transaction('store')
+store = trans.objectStore('store')
+request = store.openCursor(IDBKeyRange.bound(-Infinity, Infinity), 'next')
+cursor = request.result
+PASS cursor is non-null.
+Expect DataError if: The parameter is less than or equal to this cursor's position and this cursor's direction is "next" or "nextunique".
+PASS cursor.key is 1
+Expecting exception from cursor.continue(-1)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'continue' on 'IDBCursor': The parameter is less than or equal to this cursor's position.
+request = store.openCursor(IDBKeyRange.bound(-Infinity, Infinity), 'prev')
+cursor = request.result
+PASS cursor is non-null.
+Expect DataError if: The parameter is greater than or equal to this cursor's position and this cursor's direction is "prev" or "prevunique".
+PASS cursor.key is 10
+Expecting exception from cursor.continue(11)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'continue' on 'IDBCursor': The parameter is greater than or equal to this cursor's position.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-continue-dir-private.html b/LayoutTests/storage/indexeddb/cursor-continue-dir-private.html
new file mode 100644 (file)
index 0000000..1b172ca
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-continue-dir.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-continue-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-continue-private-expected.txt
new file mode 100644 (file)
index 0000000..2bf154f
--- /dev/null
@@ -0,0 +1,123 @@
+Test IndexedDB's IDBCursor.continue() with a key parameter.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore('someObjectStore')
+objectStore.createIndex('someIndex', 'x')
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+objectStore.add({'x': testData[nextToAdd]}, nextToAdd)
+
+indexObject.openKeyCursor(null, 'next')
+PASS event.target.result.primaryKey is 0
+event.target.result.continue(3.14159)
+PASS event.target.result.primaryKey is 3
+event.target.result.continue()
+PASS event.target.result.primaryKey is 4
+event.target.result.continue()
+PASS event.target.result.primaryKey is 5
+event.target.result.continue(12)
+PASS event.target.result.primaryKey is 7
+event.target.result.continue(date)
+PASS event.target.result.primaryKey is 9
+event.target.result.continue()
+PASS event.target.result.primaryKey is 10
+event.target.result.continue()
+PASS event.target.result.primaryKey is 11
+event.target.result.continue('A bit1')
+PASS event.target.result.primaryKey is 14
+event.target.result.continue('A bit3')
+PASS event.target.result.primaryKey is 16
+event.target.result.continue('the BIGGEST string')
+PASS event.target.result.primaryKey is 17
+event.target.result.continue()
+PASS event.target.result is null
+
+indexObject.openKeyCursor(null, 'prev')
+PASS event.target.result.primaryKey is 17
+event.target.result.continue('A bit2')
+PASS event.target.result.primaryKey is 15
+event.target.result.continue()
+PASS event.target.result.primaryKey is 14
+event.target.result.continue(date)
+PASS event.target.result.primaryKey is 10
+event.target.result.continue()
+PASS event.target.result.primaryKey is 9
+event.target.result.continue(1)
+PASS event.target.result.primaryKey is 2
+event.target.result.continue()
+PASS event.target.result.primaryKey is 1
+event.target.result.continue()
+PASS event.target.result.primaryKey is 0
+event.target.result.continue()
+PASS event.target.result is null
+
+indexObject.openKeyCursor(null, 'next')
+PASS event.target.result.primaryKey is 0
+event.target.result.continue(3.14159)
+PASS event.target.result.primaryKey is 3
+Expecting exception from event.target.result.continue(1)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'continue' on 'IDBCursor': The parameter is less than or equal to this cursor's position.
+
+indexObject.openKeyCursor(null, 'next')
+PASS event.target.result.primaryKey is 0
+event.target.result.continue(3.14159)
+PASS event.target.result.primaryKey is 3
+Expecting exception from event.target.result.continue(3.14159)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'continue' on 'IDBCursor': The parameter is less than or equal to this cursor's position.
+
+indexObject.openKeyCursor(null, 'prev')
+PASS event.target.result.primaryKey is 17
+event.target.result.continue('A bit2')
+PASS event.target.result.primaryKey is 15
+Expecting exception from event.target.result.continue('A bit3')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'continue' on 'IDBCursor': The parameter is greater than or equal to this cursor's position.
+
+indexObject.openKeyCursor(null, 'prev')
+PASS event.target.result.primaryKey is 17
+event.target.result.continue('A bit2')
+PASS event.target.result.primaryKey is 15
+cursor = event.target.result
+Expecting exception from event.target.result.continue('A bit2')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'continue' on 'IDBCursor': The parameter is greater than or equal to this cursor's position.
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'continue' on 'IDBCursor': The transaction is inactive or finished.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-continue-private.html b/LayoutTests/storage/indexeddb/cursor-continue-private.html
new file mode 100644 (file)
index 0000000..41b3bbf
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-continue.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-continue-validity-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-continue-validity-private-expected.txt
new file mode 100644 (file)
index 0000000..fdebe46
--- /dev/null
@@ -0,0 +1,939 @@
+Test IndexedDB's IDBCursor.continue() behavior when called beyond normal scope.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+trans = event.target.transaction
+PASS trans is non-null.
+db.createObjectStore('someObjectStore')
+objectStore.createIndex('someIndex', 'x')
+objectStore.add({'x': 0 }, 0)
+objectStore.add({'x': 1 }, 1)
+objectStore.add({'x': 2 }, 2)
+objectStore.add({'x': 3 }, 3)
+objectStore.add({'x': 4 }, 4)
+objectStore.add({'x': 5 }, 5)
+objectStore.add({'x': 6 }, 6)
+objectStore.add({'x': 7 }, 7)
+objectStore.add({'x': 8 }, 8)
+objectStore.add({'x': 9 }, 9)
+objectStore.add({'x': 10 }, 10)
+objectStore.add({'x': 11 }, 11)
+objectStore.add({'x': 12 }, 12)
+objectStore.add({'x': 13 }, 13)
+objectStore.add({'x': 14 }, 14)
+objectStore.add({'x': 15 }, 15)
+objectStore.add({'x': 16 }, 16)
+objectStore.add({'x': 17 }, 17)
+objectStore.add({'x': 18 }, 18)
+objectStore.add({'x': 19 }, 19)
+objectStore.add({'x': 20 }, 20)
+objectStore.add({'x': 21 }, 21)
+objectStore.add({'x': 22 }, 22)
+objectStore.add({'x': 23 }, 23)
+objectStore.add({'x': 24 }, 24)
+continueTest()
+
+Checking objectStore
+====================
+indexObject.openCursor(null, 'next')
+self.continueValue = 0
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 0
+PASS cursor.key is 0
+PASS cursor.value.x is 0
+cursor.continue()
+PASS cursor.key is 0
+PASS cursor.value.x is 0
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 0
+PASS cursor.value.x is 0
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 1
+PASS cursor.key is 1
+PASS cursor.value.x is 1
+cursor.continue()
+PASS cursor.key is 1
+PASS cursor.value.x is 1
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 1
+PASS cursor.value.x is 1
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 2
+PASS cursor.key is 2
+PASS cursor.value.x is 2
+cursor.continue()
+PASS cursor.key is 2
+PASS cursor.value.x is 2
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 2
+PASS cursor.value.x is 2
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 3
+PASS cursor.key is 3
+PASS cursor.value.x is 3
+cursor.continue()
+PASS cursor.key is 3
+PASS cursor.value.x is 3
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 3
+PASS cursor.value.x is 3
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 4
+PASS cursor.key is 4
+PASS cursor.value.x is 4
+cursor.continue()
+PASS cursor.key is 4
+PASS cursor.value.x is 4
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 4
+PASS cursor.value.x is 4
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 5
+PASS cursor.key is 5
+PASS cursor.value.x is 5
+cursor.continue()
+PASS cursor.key is 5
+PASS cursor.value.x is 5
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 5
+PASS cursor.value.x is 5
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 6
+PASS cursor.key is 6
+PASS cursor.value.x is 6
+cursor.continue()
+PASS cursor.key is 6
+PASS cursor.value.x is 6
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 6
+PASS cursor.value.x is 6
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 7
+PASS cursor.key is 7
+PASS cursor.value.x is 7
+cursor.continue()
+PASS cursor.key is 7
+PASS cursor.value.x is 7
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 7
+PASS cursor.value.x is 7
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 8
+PASS cursor.key is 8
+PASS cursor.value.x is 8
+cursor.continue()
+PASS cursor.key is 8
+PASS cursor.value.x is 8
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 8
+PASS cursor.value.x is 8
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 9
+PASS cursor.key is 9
+PASS cursor.value.x is 9
+cursor.continue()
+PASS cursor.key is 9
+PASS cursor.value.x is 9
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 9
+PASS cursor.value.x is 9
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 10
+PASS cursor.key is 10
+PASS cursor.value.x is 10
+cursor.continue()
+PASS cursor.key is 10
+PASS cursor.value.x is 10
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 10
+PASS cursor.value.x is 10
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 11
+PASS cursor.key is 11
+PASS cursor.value.x is 11
+cursor.continue()
+PASS cursor.key is 11
+PASS cursor.value.x is 11
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 11
+PASS cursor.value.x is 11
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 12
+PASS cursor.key is 12
+PASS cursor.value.x is 12
+cursor.continue()
+PASS cursor.key is 12
+PASS cursor.value.x is 12
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 12
+PASS cursor.value.x is 12
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 13
+PASS cursor.key is 13
+PASS cursor.value.x is 13
+cursor.continue()
+PASS cursor.key is 13
+PASS cursor.value.x is 13
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 13
+PASS cursor.value.x is 13
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 14
+PASS cursor.key is 14
+PASS cursor.value.x is 14
+cursor.continue()
+PASS cursor.key is 14
+PASS cursor.value.x is 14
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 14
+PASS cursor.value.x is 14
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 15
+PASS cursor.key is 15
+PASS cursor.value.x is 15
+cursor.continue()
+PASS cursor.key is 15
+PASS cursor.value.x is 15
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 15
+PASS cursor.value.x is 15
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 16
+PASS cursor.key is 16
+PASS cursor.value.x is 16
+cursor.continue()
+PASS cursor.key is 16
+PASS cursor.value.x is 16
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 16
+PASS cursor.value.x is 16
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 17
+PASS cursor.key is 17
+PASS cursor.value.x is 17
+cursor.continue()
+PASS cursor.key is 17
+PASS cursor.value.x is 17
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 17
+PASS cursor.value.x is 17
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 18
+PASS cursor.key is 18
+PASS cursor.value.x is 18
+cursor.continue()
+PASS cursor.key is 18
+PASS cursor.value.x is 18
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 18
+PASS cursor.value.x is 18
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 19
+PASS cursor.key is 19
+PASS cursor.value.x is 19
+cursor.continue()
+PASS cursor.key is 19
+PASS cursor.value.x is 19
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 19
+PASS cursor.value.x is 19
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 20
+PASS cursor.key is 20
+PASS cursor.value.x is 20
+cursor.continue()
+PASS cursor.key is 20
+PASS cursor.value.x is 20
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 20
+PASS cursor.value.x is 20
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 21
+PASS cursor.key is 21
+PASS cursor.value.x is 21
+cursor.continue()
+PASS cursor.key is 21
+PASS cursor.value.x is 21
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 21
+PASS cursor.value.x is 21
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 22
+PASS cursor.key is 22
+PASS cursor.value.x is 22
+cursor.continue()
+PASS cursor.key is 22
+PASS cursor.value.x is 22
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 22
+PASS cursor.value.x is 22
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 23
+PASS cursor.key is 23
+PASS cursor.value.x is 23
+cursor.continue()
+PASS cursor.key is 23
+PASS cursor.value.x is 23
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 23
+PASS cursor.value.x is 23
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+Checking value at 24
+PASS cursor.key is 24
+PASS cursor.value.x is 24
+cursor.continue()
+PASS cursor.key is 24
+PASS cursor.value.x is 24
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 24
+PASS cursor.value.x is 24
+self.continueValue++;
+doubleContinueCallback()
+cursor = event.target.result
+continueIndexTest()
+
+Checking index
+==============
+indexObject.openCursor(null, 'next')
+self.continueValue = 0
+cursor = event.target.result
+Checking value at 0
+PASS cursor.key is 0
+PASS cursor.value.x is 0
+cursor.continue()
+PASS cursor.key is 0
+PASS cursor.value.x is 0
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 0
+PASS cursor.value.x is 0
+self.continueValue++;
+cursor = event.target.result
+Checking value at 1
+PASS cursor.key is 1
+PASS cursor.value.x is 1
+cursor.continue()
+PASS cursor.key is 1
+PASS cursor.value.x is 1
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 1
+PASS cursor.value.x is 1
+self.continueValue++;
+cursor = event.target.result
+Checking value at 2
+PASS cursor.key is 2
+PASS cursor.value.x is 2
+cursor.continue()
+PASS cursor.key is 2
+PASS cursor.value.x is 2
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 2
+PASS cursor.value.x is 2
+self.continueValue++;
+cursor = event.target.result
+Checking value at 3
+PASS cursor.key is 3
+PASS cursor.value.x is 3
+cursor.continue()
+PASS cursor.key is 3
+PASS cursor.value.x is 3
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 3
+PASS cursor.value.x is 3
+self.continueValue++;
+cursor = event.target.result
+Checking value at 4
+PASS cursor.key is 4
+PASS cursor.value.x is 4
+cursor.continue()
+PASS cursor.key is 4
+PASS cursor.value.x is 4
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 4
+PASS cursor.value.x is 4
+self.continueValue++;
+cursor = event.target.result
+Checking value at 5
+PASS cursor.key is 5
+PASS cursor.value.x is 5
+cursor.continue()
+PASS cursor.key is 5
+PASS cursor.value.x is 5
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 5
+PASS cursor.value.x is 5
+self.continueValue++;
+cursor = event.target.result
+Checking value at 6
+PASS cursor.key is 6
+PASS cursor.value.x is 6
+cursor.continue()
+PASS cursor.key is 6
+PASS cursor.value.x is 6
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 6
+PASS cursor.value.x is 6
+self.continueValue++;
+cursor = event.target.result
+Checking value at 7
+PASS cursor.key is 7
+PASS cursor.value.x is 7
+cursor.continue()
+PASS cursor.key is 7
+PASS cursor.value.x is 7
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 7
+PASS cursor.value.x is 7
+self.continueValue++;
+cursor = event.target.result
+Checking value at 8
+PASS cursor.key is 8
+PASS cursor.value.x is 8
+cursor.continue()
+PASS cursor.key is 8
+PASS cursor.value.x is 8
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 8
+PASS cursor.value.x is 8
+self.continueValue++;
+cursor = event.target.result
+Checking value at 9
+PASS cursor.key is 9
+PASS cursor.value.x is 9
+cursor.continue()
+PASS cursor.key is 9
+PASS cursor.value.x is 9
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 9
+PASS cursor.value.x is 9
+self.continueValue++;
+cursor = event.target.result
+Checking value at 10
+PASS cursor.key is 10
+PASS cursor.value.x is 10
+cursor.continue()
+PASS cursor.key is 10
+PASS cursor.value.x is 10
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 10
+PASS cursor.value.x is 10
+self.continueValue++;
+cursor = event.target.result
+Checking value at 11
+PASS cursor.key is 11
+PASS cursor.value.x is 11
+cursor.continue()
+PASS cursor.key is 11
+PASS cursor.value.x is 11
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 11
+PASS cursor.value.x is 11
+self.continueValue++;
+cursor = event.target.result
+Checking value at 12
+PASS cursor.key is 12
+PASS cursor.value.x is 12
+cursor.continue()
+PASS cursor.key is 12
+PASS cursor.value.x is 12
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 12
+PASS cursor.value.x is 12
+self.continueValue++;
+cursor = event.target.result
+Checking value at 13
+PASS cursor.key is 13
+PASS cursor.value.x is 13
+cursor.continue()
+PASS cursor.key is 13
+PASS cursor.value.x is 13
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 13
+PASS cursor.value.x is 13
+self.continueValue++;
+cursor = event.target.result
+Checking value at 14
+PASS cursor.key is 14
+PASS cursor.value.x is 14
+cursor.continue()
+PASS cursor.key is 14
+PASS cursor.value.x is 14
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 14
+PASS cursor.value.x is 14
+self.continueValue++;
+cursor = event.target.result
+Checking value at 15
+PASS cursor.key is 15
+PASS cursor.value.x is 15
+cursor.continue()
+PASS cursor.key is 15
+PASS cursor.value.x is 15
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 15
+PASS cursor.value.x is 15
+self.continueValue++;
+cursor = event.target.result
+Checking value at 16
+PASS cursor.key is 16
+PASS cursor.value.x is 16
+cursor.continue()
+PASS cursor.key is 16
+PASS cursor.value.x is 16
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 16
+PASS cursor.value.x is 16
+self.continueValue++;
+cursor = event.target.result
+Checking value at 17
+PASS cursor.key is 17
+PASS cursor.value.x is 17
+cursor.continue()
+PASS cursor.key is 17
+PASS cursor.value.x is 17
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 17
+PASS cursor.value.x is 17
+self.continueValue++;
+cursor = event.target.result
+Checking value at 18
+PASS cursor.key is 18
+PASS cursor.value.x is 18
+cursor.continue()
+PASS cursor.key is 18
+PASS cursor.value.x is 18
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 18
+PASS cursor.value.x is 18
+self.continueValue++;
+cursor = event.target.result
+Checking value at 19
+PASS cursor.key is 19
+PASS cursor.value.x is 19
+cursor.continue()
+PASS cursor.key is 19
+PASS cursor.value.x is 19
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 19
+PASS cursor.value.x is 19
+self.continueValue++;
+cursor = event.target.result
+Checking value at 20
+PASS cursor.key is 20
+PASS cursor.value.x is 20
+cursor.continue()
+PASS cursor.key is 20
+PASS cursor.value.x is 20
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 20
+PASS cursor.value.x is 20
+self.continueValue++;
+cursor = event.target.result
+Checking value at 21
+PASS cursor.key is 21
+PASS cursor.value.x is 21
+cursor.continue()
+PASS cursor.key is 21
+PASS cursor.value.x is 21
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 21
+PASS cursor.value.x is 21
+self.continueValue++;
+cursor = event.target.result
+Checking value at 22
+PASS cursor.key is 22
+PASS cursor.value.x is 22
+cursor.continue()
+PASS cursor.key is 22
+PASS cursor.value.x is 22
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 22
+PASS cursor.value.x is 22
+self.continueValue++;
+cursor = event.target.result
+Checking value at 23
+PASS cursor.key is 23
+PASS cursor.value.x is 23
+cursor.continue()
+PASS cursor.key is 23
+PASS cursor.value.x is 23
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 23
+PASS cursor.value.x is 23
+self.continueValue++;
+cursor = event.target.result
+Checking value at 24
+PASS cursor.key is 24
+PASS cursor.value.x is 24
+cursor.continue()
+PASS cursor.key is 24
+PASS cursor.value.x is 24
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+PASS cursor.key is 24
+PASS cursor.value.x is 24
+self.continueValue++;
+cursor = event.target.result
+testModifyContinueOrder()
+
+Checking modification
+=====================
+indexObject.openCursor(null, 'next')
+self.continueValue = 0
+cursor = event.target.result
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.delete()
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.continue()
+Expecting exception from cursor.update({ x: 100 + self.continueValue})
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'update' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.continue()
+Expecting exception from cursor.delete()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'delete' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.delete()
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.delete()
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.delete()
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.continue()
+Expecting exception from cursor.update({ x: 100 + self.continueValue})
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'update' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.delete()
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.delete()
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.continue()
+Expecting exception from cursor.update({ x: 100 + self.continueValue})
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'update' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.delete()
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.delete()
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.continue()
+cursor = event.target.result
+cursor.update({ x: 100 + self.continueValue })
+cursor.continue()
+cursor = event.target.result
+cursor.continue()
+Expecting exception from cursor.delete()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+Exception message: Failed to execute 'delete' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+cursor = event.target.result
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-continue-validity-private.html b/LayoutTests/storage/indexeddb/cursor-continue-validity-private.html
new file mode 100644 (file)
index 0000000..5ea24f2
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-continue-validity.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-delete-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-delete-private-expected.txt
new file mode 100644 (file)
index 0000000..318dd00
--- /dev/null
@@ -0,0 +1,48 @@
+Test IndexedDB's openCursor.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+setVersionSuccess():
+trans = event.target.result
+PASS trans is non-null.
+objectStore = db.createObjectStore('test')
+objectStore.add('myValue1', 'myKey1')
+objectStore.add('myValue2', 'myKey2')
+objectStore.add('myValue3', 'myKey3')
+objectStore.add('myValue4', 'myKey4')
+openCursor1
+trans = db.transaction(['test'], 'readwrite')
+trans.objectStore('test').openCursor(keyRange)
+event.target.result.delete()
+PASS event.target.result.value is "myValue1"
+event.target.result.continue()
+event.target.result.delete()
+PASS event.target.result.value is "myValue2"
+event.target.result.continue()
+event.target.result.delete()
+PASS event.target.result.value is "myValue3"
+event.target.result.continue()
+event.target.result.delete()
+PASS event.target.result.value is "myValue4"
+event.target.result.continue()
+PASS counter is 5
+trans.objectStore('test').openCursor(keyRange)
+PASS event.target.result is null
+trans = db.transaction(['test'], 'readwrite')
+objectStore = trans.objectStore('test')
+objectStore.add('myValue1', 'myKey1')
+openCursor2
+objectStore.openCursor(keyRange)
+PASS [object IDBCursorWithValue] is non-null.
+event.target.result.delete()
+objectStore.get('myKey1')
+PASS event.target.result is undefined
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-delete-private.html b/LayoutTests/storage/indexeddb/cursor-delete-private.html
new file mode 100644 (file)
index 0000000..92a38e1
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-delete.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-finished-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-finished-private-expected.txt
new file mode 100644 (file)
index 0000000..102795f
--- /dev/null
@@ -0,0 +1,76 @@
+Ensure cursor calls behave as expected after cursor has run to the end.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+
+prepareDatabase():
+indexedDB.deleteDatabase(dbname)
+
+onDeleteSuccess():
+indexedDB.open(dbname, 1)
+
+onUpgradeNeeded():
+db = event.target.result
+store = db.createObjectStore('store')
+store.put(1, 1)
+store.put(2, 2)
+
+onOpenSuccess():
+db = event.target.result
+transaction = db.transaction('store', 'readwrite')
+store = transaction.objectStore('store')
+count = 0
+cursorRequest = store.openCursor()
+
+onCursorSuccess():
+cursor = event.target.result
+PASS cursor is non-null.
+count++
+savedCursor = cursor
+cursor.continue()
+
+onCursorSuccess():
+cursor = event.target.result
+PASS cursor is non-null.
+count++
+savedCursor = cursor
+cursor.continue()
+
+onCursorSuccess():
+cursor = event.target.result
+PASS cursor is null
+PASS savedCursor is non-null.
+
+Expecting exception from savedCursor.update('value')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+Expecting exception from savedCursor.advance(1)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'advance' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+Expecting exception from savedCursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+Expecting exception from savedCursor.continue('key')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+Expecting exception from savedCursor.delete()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'delete' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-finished-private.html b/LayoutTests/storage/indexeddb/cursor-finished-private.html
new file mode 100644 (file)
index 0000000..b655348
--- /dev/null
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-finished.js"></script>
+</body>
+</html>
+
+
diff --git a/LayoutTests/storage/indexeddb/cursor-inconsistency-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-inconsistency-private-expected.txt
new file mode 100644 (file)
index 0000000..0f12dd2
--- /dev/null
@@ -0,0 +1,62 @@
+Test consistency of IndexedDB's cursor objects.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+setVersionSuccess():
+trans = event.target.transaction
+PASS trans is non-null.
+objectStore = db.createObjectStore('basicStore')
+objectStore.add('someValue1', 'someKey1').onerror = unexpectedErrorCallback
+objectStore.add('someValue2', 'someKey2').onerror = unexpectedErrorCallback
+objectStore.add('someValue3', 'someKey3').onerror = unexpectedErrorCallback
+objectStore.add('someValue4', 'someKey4').onerror = unexpectedErrorCallback
+openBasicCursor()
+trans = db.transaction(['basicStore'], 'readwrite')
+trans.objectStore('basicStore')
+objectStore.openCursor(keyRange)
+
+checkCursor()
+storedCursor = event.target.result
+PASS storedCursor is event.target.result
+PASS storedCursor.key is "someKey1"
+PASS event.target.result.key is "someKey1"
+PASS storedCursor.value is "someValue1"
+PASS event.target.result.value is "someValue1"
+event.target.result.continue()
+
+checkCursor()
+PASS storedCursor is event.target.result
+PASS storedCursor.key is "someKey2"
+PASS event.target.result.key is "someKey2"
+PASS storedCursor.value is "someValue2"
+PASS event.target.result.value is "someValue2"
+event.target.result.continue()
+
+checkCursor()
+PASS storedCursor is event.target.result
+PASS storedCursor.key is "someKey3"
+PASS event.target.result.key is "someKey3"
+PASS storedCursor.value is "someValue3"
+PASS event.target.result.value is "someValue3"
+event.target.result.continue()
+
+checkCursor()
+PASS storedCursor is event.target.result
+PASS storedCursor.key is "someKey4"
+PASS event.target.result.key is "someKey4"
+PASS storedCursor.value is "someValue4"
+PASS event.target.result.value is "someValue4"
+event.target.result.continue()
+
+checkCursor()
+PASS counter is 5
+transactionComplete()
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-inconsistency-private.html b/LayoutTests/storage/indexeddb/cursor-inconsistency-private.html
new file mode 100644 (file)
index 0000000..7307266
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-inconsistency.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-index-delete-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-index-delete-private-expected.txt
new file mode 100644 (file)
index 0000000..cd9fd40
--- /dev/null
@@ -0,0 +1,49 @@
+Test IndexedDB's openCursor.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+trans = event.target.transaction
+PASS trans is non-null.
+objectStore = db.createObjectStore('test')
+objectStore.createIndex('testIndex', 'x')
+objectStore.add({x: 1}, 'myKey1')
+objectStore.add({x: 2}, 'myKey2')
+objectStore.add({x: 3}, 'myKey3')
+objectStore.add({x: 4}, 'myKey4')
+openCursor1
+trans = db.transaction(['test'], 'readwrite')
+trans.objectStore('test').index('testIndex').openCursor(keyRange)
+event.target.result.delete()
+PASS event.target.result.key is counter++
+event.target.result.continue()
+event.target.result.delete()
+PASS event.target.result.key is counter++
+event.target.result.continue()
+event.target.result.delete()
+PASS event.target.result.key is counter++
+event.target.result.continue()
+event.target.result.delete()
+PASS event.target.result.key is counter++
+event.target.result.continue()
+PASS counter is 5
+trans.objectStore('test').index('testIndex').openCursor(keyRange)
+PASS event.target.result is null
+trans = db.transaction(['test'], 'readwrite')
+objectStore = trans.objectStore('test')
+objectStore.add({x: 1}, 'myKey1')
+openCursor2
+index = event.target.source.index('testIndex')
+index.openCursor(keyRange)
+PASS [object IDBCursorWithValue] is non-null.
+event.target.result.delete()
+index.get(1)
+PASS event.target.result is undefined
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-index-delete-private.html b/LayoutTests/storage/indexeddb/cursor-index-delete-private.html
new file mode 100644 (file)
index 0000000..b5a9b61
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-index-delete.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-key-order-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-key-order-private-expected.txt
new file mode 100644 (file)
index 0000000..0f9de1f
--- /dev/null
@@ -0,0 +1,902 @@
+Test IndexedDB keys ordering and readback from cursors.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore('store')
+
+populating store...
+trans = db.transaction('store', 'readwrite')
+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, '�')
+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, ['�'])
+store.put(45, [[]])
+store.put(46, [[], []])
+store.put(47, [[], [], []])
+store.put(48, [[[]]])
+store.put(49, [[[[]]]])
+
+iterating cursor...
+trans = db.transaction('store', 'readonly')
+store = trans.objectStore('store');
+count = 0
+curreq = store.openCursor()
+cursor = curreq.result
+PASS compare(cursor.key, -Infinity) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, -Number.MAX_VALUE) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, -1) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, -Number.MIN_VALUE) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, 0) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, Number.MIN_VALUE) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, 1) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, Number.MAX_VALUE) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, Infinity) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, new Date(0)) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, new Date(1000)) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, new Date(1317399931023)) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, '') is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, '\0') is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, 'a') is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, 'aa') is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, 'b') is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, 'ba') is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, '¢') is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, '水') is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, '𝄞') is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, '�') is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, []) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, [-Infinity]) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, [-Number.MAX_VALUE]) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, [-1]) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, [-Number.MIN_VALUE]) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, [0]) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, [Number.MIN_VALUE]) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, [1]) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, [Number.MAX_VALUE]) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, [Infinity]) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, [new Date(0)]) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, [new Date(1000)]) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, [new Date(1317399931023)]) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, ['']) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, ['\0']) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, ['a']) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, ['aa']) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, ['b']) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, ['ba']) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, ['¢']) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, ['水']) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, ['𝄞']) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, ['�']) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, [[]]) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, [[], []]) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, [[], [], []]) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, [[[]]]) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+cursor = curreq.result
+PASS compare(cursor.key, [[[[]]]]) is true
+getreq = store.get(cursor.key)
+PASS getreq.result is count++
+PASS count is keys.length
+
+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
+
diff --git a/LayoutTests/storage/indexeddb/cursor-key-order-private.html b/LayoutTests/storage/indexeddb/cursor-key-order-private.html
new file mode 100644 (file)
index 0000000..e1845fa
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-key-order.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-prev-no-duplicate-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-prev-no-duplicate-private-expected.txt
new file mode 100644 (file)
index 0000000..eb9218e
--- /dev/null
@@ -0,0 +1,109 @@
+Test IndexedDB behavior when iterating backwards with and without NO_DUPLICATE
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = db.createObjectStore('store')
+store.createIndex('index', 'sorted')
+
+populating store...
+trans = db.transaction('store', 'readwrite')
+store = trans.objectStore('store');
+store.put({sorted: 3, value: 111}, 1)
+store.put({sorted: 2, value: 222}, 2)
+store.put({sorted: 1, value: 333}, 3)
+store.put({sorted: 10, value: 444}, 17)
+store.put({sorted: 10, value: 555}, 16)
+store.put({sorted: 10, value: 666}, 15)
+
+testFarRangeCursor: upper bound is well out of range, results always the same, whether open or closed
+storeReq = store.openCursor(IDBKeyRange.upperBound(7, false), 'prev')
+PASS cursor.key is 3
+PASS cursor.value.value is 333
+DONE
+
+storeReq = store.openCursor(IDBKeyRange.upperBound(7, true), 'prev')
+PASS cursor.key is 3
+PASS cursor.value.value is 333
+DONE
+
+storeReq = index.openCursor(IDBKeyRange.upperBound(7, false), 'prev')
+PASS cursor.key is 3
+PASS cursor.value.value is 111
+PASS cursor.primaryKey is 1
+DONE
+
+storeReq = index.openCursor(IDBKeyRange.upperBound(7, true), 'prev')
+PASS cursor.key is 3
+PASS cursor.value.value is 111
+PASS cursor.primaryKey is 1
+DONE
+
+storeReq = index.openKeyCursor(IDBKeyRange.upperBound(7, false), 'prev')
+PASS cursor.key is 3
+PASS cursor.primaryKey is 1
+DONE
+
+storeReq = index.openKeyCursor(IDBKeyRange.upperBound(7, true), 'prev')
+PASS cursor.key is 3
+PASS cursor.primaryKey is 1
+DONE
+
+storeReq = store.openCursor(IDBKeyRange.upperBound(3, false), 'prev')
+PASS cursor.key is 3
+PASS cursor.value.value is 333
+DONE
+
+storeReq = store.openCursor(IDBKeyRange.upperBound(3, true), 'prev')
+PASS cursor.key is 2
+PASS cursor.value.value is 222
+DONE
+
+storeReq = index.openCursor(IDBKeyRange.upperBound(3, false), 'prev')
+PASS cursor.key is 3
+PASS cursor.value.value is 111
+PASS cursor.primaryKey is 1
+DONE
+
+storeReq = index.openCursor(IDBKeyRange.upperBound(3, true), 'prev')
+PASS cursor.key is 2
+PASS cursor.value.value is 222
+PASS cursor.primaryKey is 2
+DONE
+
+storeReq = index.openKeyCursor(IDBKeyRange.upperBound(3, false), 'prev')
+PASS cursor.key is 3
+PASS cursor.primaryKey is 1
+DONE
+
+storeReq = index.openKeyCursor(IDBKeyRange.upperBound(3, true), 'prev')
+PASS cursor.key is 2
+PASS cursor.primaryKey is 2
+DONE
+
+testNoDuplicate: there are 3 values, but we should return always the first one
+storeReq = store.openCursor(IDBKeyRange.upperBound(15, false), 'prevunique')
+PASS cursor.key is 15
+PASS cursor.value.value is 666
+PASS cursor.primaryKey is 15
+DONE
+
+storeReq = index.openCursor(IDBKeyRange.upperBound(15, false), 'prevunique')
+PASS cursor.key is 10
+PASS cursor.value.value is 666
+PASS cursor.primaryKey is 15
+DONE
+
+storeReq = index.openKeyCursor(IDBKeyRange.upperBound(15, false), 'prevunique')
+PASS cursor.key is 10
+PASS cursor.primaryKey is 15
+DONE
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-prev-no-duplicate-private.html b/LayoutTests/storage/indexeddb/cursor-prev-no-duplicate-private.html
new file mode 100644 (file)
index 0000000..da27e35
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-prev-no-duplicate.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-primary-key-order-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-primary-key-order-private-expected.txt
new file mode 100644 (file)
index 0000000..ae24032
--- /dev/null
@@ -0,0 +1,91 @@
+Test IndexedDB primary key ordering and readback from cursors.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = db.createObjectStore('store')
+index = store.createIndex('index', 'indexKey')
+
+populating store...
+trans = db.transaction('store', 'readwrite')
+store = trans.objectStore('store');
+store.put({"indexKey":0,"count":0}, 'c')
+store.put({"indexKey":0,"count":1}, 'b')
+store.put({"indexKey":0,"count":2}, 'a')
+store.put({"indexKey":0,"count":3}, 'C')
+store.put({"indexKey":0,"count":4}, 'B')
+store.put({"indexKey":0,"count":5}, 'A')
+store.put({"indexKey":0,"count":6}, '2')
+store.put({"indexKey":0,"count":7}, '1')
+store.put({"indexKey":0,"count":8}, '0')
+store.put({"indexKey":0,"count":9}, Infinity)
+store.put({"indexKey":0,"count":10}, 2)
+store.put({"indexKey":0,"count":11}, 1)
+store.put({"indexKey":0,"count":12}, 0)
+store.put({"indexKey":0,"count":13}, -1)
+store.put({"indexKey":0,"count":14}, -2)
+store.put({"indexKey":0,"count":15}, -Infinity)
+
+iterating cursor...
+trans = db.transaction('store', 'readonly')
+store = trans.objectStore('store');
+index = store.index('index');
+cursorRequest = index.openCursor()
+count = 0
+cursor = cursorRequest.result
+PASS cursor.key is 0
+PASS cursor.primaryKey is -Infinity
+cursor = cursorRequest.result
+PASS cursor.key is 0
+PASS cursor.primaryKey is -2
+cursor = cursorRequest.result
+PASS cursor.key is 0
+PASS cursor.primaryKey is -1
+cursor = cursorRequest.result
+PASS cursor.key is 0
+PASS cursor.primaryKey is 0
+cursor = cursorRequest.result
+PASS cursor.key is 0
+PASS cursor.primaryKey is 1
+cursor = cursorRequest.result
+PASS cursor.key is 0
+PASS cursor.primaryKey is 2
+cursor = cursorRequest.result
+PASS cursor.key is 0
+PASS cursor.primaryKey is Infinity
+cursor = cursorRequest.result
+PASS cursor.key is 0
+PASS cursor.primaryKey is '0'
+cursor = cursorRequest.result
+PASS cursor.key is 0
+PASS cursor.primaryKey is '1'
+cursor = cursorRequest.result
+PASS cursor.key is 0
+PASS cursor.primaryKey is '2'
+cursor = cursorRequest.result
+PASS cursor.key is 0
+PASS cursor.primaryKey is 'A'
+cursor = cursorRequest.result
+PASS cursor.key is 0
+PASS cursor.primaryKey is 'B'
+cursor = cursorRequest.result
+PASS cursor.key is 0
+PASS cursor.primaryKey is 'C'
+cursor = cursorRequest.result
+PASS cursor.key is 0
+PASS cursor.primaryKey is 'a'
+cursor = cursorRequest.result
+PASS cursor.key is 0
+PASS cursor.primaryKey is 'b'
+cursor = cursorRequest.result
+PASS cursor.key is 0
+PASS cursor.primaryKey is 'c'
+PASS count is keys.length
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-primary-key-order-private.html b/LayoutTests/storage/indexeddb/cursor-primary-key-order-private.html
new file mode 100644 (file)
index 0000000..369df5f
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-primary-key-order.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-properties-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-properties-private-expected.txt
new file mode 100644 (file)
index 0000000..640af26
--- /dev/null
@@ -0,0 +1,63 @@
+Test that IndexedDB's cursor key/primaryKey/value properties preserve mutations.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname, 1)
+
+onUpgradeNeeded():
+db = event.target.result
+store = db.createObjectStore('store')
+index = store.createIndex('index', 'id')
+store.put({id: ['indexKey']}, ['primaryKey'])
+
+onOpenSuccess():
+db = event.target.result
+trans = db.transaction('store')
+store = trans.objectStore('store')
+index = store.index('index')
+
+request = index.openCursor()
+
+onCursorSuccess():
+cursor = event.target.result
+PASS cursor is non-null.
+PASS areArraysEqual(cursor.key, ['indexKey']) is true
+PASS areArraysEqual(cursor.primaryKey, ['primaryKey']) is true
+
+Check identity:
+v = cursor.key
+PASS v === cursor.key is true
+Check read-only:
+cursor.key = null
+PASS v === cursor.key is true
+Check mutability:
+cursor.key.expando = 123
+PASS cursor.key.expando is 123
+
+Check identity:
+v = cursor.primaryKey
+PASS v === cursor.primaryKey is true
+Check read-only:
+cursor.primaryKey = null
+PASS v === cursor.primaryKey is true
+Check mutability:
+cursor.primaryKey.expando = 123
+PASS cursor.primaryKey.expando is 123
+
+Check identity:
+v = cursor.value
+PASS v === cursor.value is true
+Check read-only:
+cursor.value = null
+PASS v === cursor.value is true
+Check mutability:
+cursor.value.expando = 123
+PASS cursor.value.expando is 123
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-properties-private.html b/LayoutTests/storage/indexeddb/cursor-properties-private.html
new file mode 100644 (file)
index 0000000..a297fa0
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-properties.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-reverse-bug-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-reverse-bug-private-expected.txt
new file mode 100644 (file)
index 0000000..68423cb
--- /dev/null
@@ -0,0 +1,100 @@
+Test IndexedDB keys ordering and readback from cursors.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = db.createObjectStore('store')
+store.createIndex('index', '')
+
+populating store...
+trans = db.transaction('store', 'readwrite')
+store = trans.objectStore('store');
+store.put(1, 1)
+store.put(2, 2)
+store.put(3, 3)
+testCursor()
+trans = db.transaction('store', 'readonly')
+store = trans.objectStore('store');
+index = store.index('index');
+upperBound: 7 open: false expected: 3
+storeReq = store.openCursor(IDBKeyRange.upperBound(test.upperBound, test.open), 'prev')
+indexReq = index.openCursor(IDBKeyRange.upperBound(test.upperBound, test.open), 'prev')
+indexKeyReq = index.openKeyCursor(IDBKeyRange.upperBound(test.upperBound, test.open), 'prev')
+cursor = event.target.result
+PASS cursor.key is test.expected
+PASS cursor.value is test.expected
+PASS cursor.primaryKey is test.expected
+cursor = event.target.result
+PASS cursor.key is test.expected
+PASS cursor.value is test.expected
+PASS cursor.primaryKey is test.expected
+cursor = event.target.result
+PASS cursor.key is test.expected
+PASS cursor.primaryKey is test.expected
+testCursor()
+trans = db.transaction('store', 'readonly')
+store = trans.objectStore('store');
+index = store.index('index');
+upperBound: 7 open: true expected: 3
+storeReq = store.openCursor(IDBKeyRange.upperBound(test.upperBound, test.open), 'prev')
+indexReq = index.openCursor(IDBKeyRange.upperBound(test.upperBound, test.open), 'prev')
+indexKeyReq = index.openKeyCursor(IDBKeyRange.upperBound(test.upperBound, test.open), 'prev')
+cursor = event.target.result
+PASS cursor.key is test.expected
+PASS cursor.value is test.expected
+PASS cursor.primaryKey is test.expected
+cursor = event.target.result
+PASS cursor.key is test.expected
+PASS cursor.value is test.expected
+PASS cursor.primaryKey is test.expected
+cursor = event.target.result
+PASS cursor.key is test.expected
+PASS cursor.primaryKey is test.expected
+testCursor()
+trans = db.transaction('store', 'readonly')
+store = trans.objectStore('store');
+index = store.index('index');
+upperBound: 3 open: false expected: 3
+storeReq = store.openCursor(IDBKeyRange.upperBound(test.upperBound, test.open), 'prev')
+indexReq = index.openCursor(IDBKeyRange.upperBound(test.upperBound, test.open), 'prev')
+indexKeyReq = index.openKeyCursor(IDBKeyRange.upperBound(test.upperBound, test.open), 'prev')
+cursor = event.target.result
+PASS cursor.key is test.expected
+PASS cursor.value is test.expected
+PASS cursor.primaryKey is test.expected
+cursor = event.target.result
+PASS cursor.key is test.expected
+PASS cursor.value is test.expected
+PASS cursor.primaryKey is test.expected
+cursor = event.target.result
+PASS cursor.key is test.expected
+PASS cursor.primaryKey is test.expected
+testCursor()
+trans = db.transaction('store', 'readonly')
+store = trans.objectStore('store');
+index = store.index('index');
+upperBound: 3 open: true expected: 2
+storeReq = store.openCursor(IDBKeyRange.upperBound(test.upperBound, test.open), 'prev')
+indexReq = index.openCursor(IDBKeyRange.upperBound(test.upperBound, test.open), 'prev')
+indexKeyReq = index.openKeyCursor(IDBKeyRange.upperBound(test.upperBound, test.open), 'prev')
+cursor = event.target.result
+PASS cursor.key is test.expected
+PASS cursor.value is test.expected
+PASS cursor.primaryKey is test.expected
+cursor = event.target.result
+PASS cursor.key is test.expected
+PASS cursor.value is test.expected
+PASS cursor.primaryKey is test.expected
+cursor = event.target.result
+PASS cursor.key is test.expected
+PASS cursor.primaryKey is test.expected
+testCursor()
+No more tests.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-reverse-bug-private.html b/LayoutTests/storage/indexeddb/cursor-reverse-bug-private.html
new file mode 100644 (file)
index 0000000..a4d0e0f
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-reverse-bug.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-skip-deleted-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-skip-deleted-private-expected.txt
new file mode 100644 (file)
index 0000000..bd73310
--- /dev/null
@@ -0,0 +1,137 @@
+Test IndexedDB's cursor skips deleted entries.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+setVersionSuccess():
+trans = event.target.transaction
+PASS trans is non-null.
+objectStore = db.createObjectStore('store', {keyPath: 'id'})
+objectStore.createIndex('nameIndex', 'name')
+
+resetObjectStore():
+
+basicCursorTest()
+trans = db.transaction(['store'], 'readwrite')
+
+testCursor():
+trans.objectStore('store').openCursor(IDBKeyRange.lowerBound(0))
+0: Alpha
+1: Bravo
+request = trans.objectStore('store').delete(0)
+2: Charlie
+request = trans.objectStore('store').delete(25)
+3: Delta
+request = trans.objectStore('store').delete(5)
+request = trans.objectStore('store').delete(6)
+request = trans.objectStore('store').delete(7)
+4: Echo
+8: India
+9: Juliet
+10: Kilo
+request = trans.objectStore('store').delete(10)
+11: Lima
+12: Mike
+request = trans.objectStore('store').delete(13)
+14: Oscar
+15: Papa
+request = trans.objectStore('store').delete(14)
+16: Quebec
+17: Romeo
+18: Sierra
+19: Tango
+20: Uniform
+request = trans.objectStore('store').delete(17)
+request = trans.objectStore('store').delete(18)
+21: Victor
+22: Whiskey
+23: X-ray
+24: Yankee
+
+
+resetObjectStore():
+
+reverseCursorTest():
+
+testCursor():
+trans.objectStore('store').openCursor(IDBKeyRange.lowerBound(0), 'prev')
+25: Zulu
+24: Yankee
+request = trans.objectStore('store').delete(25)
+23: X-ray
+request = trans.objectStore('store').delete(0)
+22: Whiskey
+request = trans.objectStore('store').delete(20)
+request = trans.objectStore('store').delete(19)
+request = trans.objectStore('store').delete(18)
+21: Victor
+17: Romeo
+16: Quebec
+15: Papa
+request = trans.objectStore('store').delete(15)
+14: Oscar
+13: November
+request = trans.objectStore('store').delete(12)
+11: Lima
+10: Kilo
+request = trans.objectStore('store').delete(11)
+9: Juliet
+8: India
+7: Hotel
+6: Golf
+5: Foxtrot
+request = trans.objectStore('store').delete(7)
+request = trans.objectStore('store').delete(8)
+4: Echo
+3: Delta
+2: Charlie
+1: Bravo
+
+
+resetObjectStore():
+
+indexCursorTest():
+
+testCursor():
+trans.objectStore('store').index('nameIndex').openCursor(IDBKeyRange.lowerBound('Alpha'))
+0: Alpha
+1: Bravo
+request = trans.objectStore('store').delete(0)
+2: Charlie
+request = trans.objectStore('store').delete(25)
+3: Delta
+request = trans.objectStore('store').delete(5)
+request = trans.objectStore('store').delete(6)
+request = trans.objectStore('store').delete(7)
+4: Echo
+8: India
+9: Juliet
+10: Kilo
+request = trans.objectStore('store').delete(10)
+11: Lima
+12: Mike
+request = trans.objectStore('store').delete(13)
+14: Oscar
+15: Papa
+request = trans.objectStore('store').delete(14)
+16: Quebec
+17: Romeo
+18: Sierra
+19: Tango
+20: Uniform
+request = trans.objectStore('store').delete(17)
+request = trans.objectStore('store').delete(18)
+21: Victor
+22: Whiskey
+23: X-ray
+24: Yankee
+
+transactionComplete():
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-skip-deleted-private.html b/LayoutTests/storage/indexeddb/cursor-skip-deleted-private.html
new file mode 100644 (file)
index 0000000..9475ce7
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-skip-deleted.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-update-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-update-private-expected.txt
new file mode 100644 (file)
index 0000000..266866c
--- /dev/null
@@ -0,0 +1,240 @@
+Test IndexedDB's cursor update.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+setVersionSuccess():
+trans = event.target.transaction
+PASS trans is non-null.
+Deleted all object stores.
+objectStore = db.createObjectStore('basicStore')
+objectStore.add('myValue1', 'myKey1').onerror = unexpectedErrorCallback
+objectStore.add('myValue2', 'myKey2').onerror = unexpectedErrorCallback
+objectStore.add('myValue3', 'myKey3').onerror = unexpectedErrorCallback
+objectStore.add('myValue4', 'myKey4').onerror = unexpectedErrorCallback
+objectStore = db.createObjectStore('autoIncrementStore', {autoIncrement: true})
+objectStore.add('foo1').onerror = unexpectedErrorCallback
+objectStore.add('foo2').onerror = unexpectedErrorCallback
+objectStore.add('foo3').onerror = unexpectedErrorCallback
+objectStore.add('foo4').onerror = unexpectedErrorCallback
+objectStore = db.createObjectStore('keyPathStore', {keyPath: 'id'})
+objectStore.createIndex('numberIndex', 'number')
+objectStore.add({number: 1, id: 1}).onerror = unexpectedErrorCallback
+objectStore.add({number: 2, id: 2}).onerror = unexpectedErrorCallback
+objectStore.add({number: 3, id: 3}).onerror = unexpectedErrorCallback
+objectStore.add({number: 4, id: 4}).onerror = unexpectedErrorCallback
+openBasicCursor()
+trans = db.transaction(['basicStore', 'autoIncrementStore', 'keyPathStore'], 'readwrite')
+trans.objectStore('basicStore')
+objectStore.openCursor(keyRange)
+basicUpdateCursor()
+PASS event.target.source is objectStore
+event.target.result.update('myUpdatedValue' + counter++)
+event.target.source.continue()
+basicUpdateCursor()
+PASS event.target.source is objectStore
+event.target.result.update('myUpdatedValue' + counter++)
+event.target.source.continue()
+basicUpdateCursor()
+PASS event.target.source is objectStore
+event.target.result.update('myUpdatedValue' + counter++)
+event.target.source.continue()
+basicUpdateCursor()
+PASS event.target.source is objectStore
+event.target.result.update('myUpdatedValue' + counter++)
+event.target.source.continue()
+basicUpdateCursor()
+PASS event.target.source is objectStore
+PASS counter is 5
+trans.objectStore('basicStore').openCursor(keyRange)
+basicCheckCursor()
+PASS event.target.result.key is "myKey1"
+PASS event.target.result.value is "myUpdatedValue1"
+event.target.result.continue()
+basicCheckCursor()
+PASS event.target.result.key is "myKey2"
+PASS event.target.result.value is "myUpdatedValue2"
+event.target.result.continue()
+basicCheckCursor()
+PASS event.target.result.key is "myKey3"
+PASS event.target.result.value is "myUpdatedValue3"
+event.target.result.continue()
+basicCheckCursor()
+PASS event.target.result.key is "myKey4"
+PASS event.target.result.value is "myUpdatedValue4"
+event.target.result.continue()
+basicCheckCursor()
+PASS counter is 5
+trans.objectStore('autoIncrementStore').openCursor(keyRange)
+autoIncrementUpdateCursor()
+event.target.result.update('myUpdatedFoo' + counter++)
+event.target.source.continue()
+autoIncrementUpdateCursor()
+event.target.result.update('myUpdatedFoo' + counter++)
+event.target.source.continue()
+autoIncrementUpdateCursor()
+event.target.result.update('myUpdatedFoo' + counter++)
+event.target.source.continue()
+autoIncrementUpdateCursor()
+event.target.result.update('myUpdatedFoo' + counter++)
+event.target.source.continue()
+autoIncrementUpdateCursor()
+PASS counter is 5
+trans.objectStore('autoIncrementStore').openCursor(keyRange)
+autoIncrementCheckCursor()
+PASS event.target.result.key is counter
+PASS event.target.result.value is "myUpdatedFoo1"
+event.target.result.continue()
+autoIncrementCheckCursor()
+PASS event.target.result.key is counter
+PASS event.target.result.value is "myUpdatedFoo2"
+event.target.result.continue()
+autoIncrementCheckCursor()
+PASS event.target.result.key is counter
+PASS event.target.result.value is "myUpdatedFoo3"
+event.target.result.continue()
+autoIncrementCheckCursor()
+PASS event.target.result.key is counter
+PASS event.target.result.value is "myUpdatedFoo4"
+event.target.result.continue()
+autoIncrementCheckCursor()
+PASS counter is 5
+trans.objectStore('keyPathStore').openCursor(keyRange)
+keyPathUpdateCursor()
+Expecting exception from event.target.result.update({id: 100 + counter, number: 100 + counter})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The effective object store of this cursor uses in-line keys and evaluating the key path of the value parameter results in a different value than the cursor's effective key.
+event.target.result.update({id: counter, number: 100 + counter++})
+event.target.source.continue()
+keyPathUpdateCursor()
+Expecting exception from event.target.result.update({id: 100 + counter, number: 100 + counter})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The effective object store of this cursor uses in-line keys and evaluating the key path of the value parameter results in a different value than the cursor's effective key.
+event.target.result.update({id: counter, number: 100 + counter++})
+event.target.source.continue()
+keyPathUpdateCursor()
+Expecting exception from event.target.result.update({id: 100 + counter, number: 100 + counter})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The effective object store of this cursor uses in-line keys and evaluating the key path of the value parameter results in a different value than the cursor's effective key.
+event.target.result.update({id: counter, number: 100 + counter++})
+event.target.source.continue()
+keyPathUpdateCursor()
+Expecting exception from event.target.result.update({id: 100 + counter, number: 100 + counter})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The effective object store of this cursor uses in-line keys and evaluating the key path of the value parameter results in a different value than the cursor's effective key.
+event.target.result.update({id: counter, number: 100 + counter++})
+event.target.source.continue()
+keyPathUpdateCursor()
+PASS counter is 5
+trans.objectStore('keyPathStore').openCursor(keyRange)
+keyPathCheckCursor()
+PASS event.target.result.key is counter
+PASS event.target.result.value.id is counter
+PASS event.target.result.value.number is 101
+event.target.result.continue()
+keyPathCheckCursor()
+PASS event.target.result.key is counter
+PASS event.target.result.value.id is counter
+PASS event.target.result.value.number is 102
+event.target.result.continue()
+keyPathCheckCursor()
+PASS event.target.result.key is counter
+PASS event.target.result.value.id is counter
+PASS event.target.result.value.number is 103
+event.target.result.continue()
+keyPathCheckCursor()
+PASS event.target.result.key is counter
+PASS event.target.result.value.id is counter
+PASS event.target.result.value.number is 104
+event.target.result.continue()
+keyPathCheckCursor()
+PASS counter is 5
+trans.objectStore('keyPathStore').index('numberIndex').openKeyCursor(keyRange)
+keyCursor()
+PASS event.target.result.key is counter + 100
+PASS event.target.result.primaryKey is counter
+Expecting exception from event.target.result.update({id: counter, number: counter + 200})
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The cursor is a key cursor.
+event.target.result.continue();
+keyCursor()
+PASS event.target.result.key is counter + 100
+PASS event.target.result.primaryKey is counter
+Expecting exception from event.target.result.update({id: counter, number: counter + 200})
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The cursor is a key cursor.
+event.target.result.continue();
+keyCursor()
+PASS event.target.result.key is counter + 100
+PASS event.target.result.primaryKey is counter
+Expecting exception from event.target.result.update({id: counter, number: counter + 200})
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The cursor is a key cursor.
+event.target.result.continue();
+keyCursor()
+PASS event.target.result.key is counter + 100
+PASS event.target.result.primaryKey is counter
+Expecting exception from event.target.result.update({id: counter, number: counter + 200})
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The cursor is a key cursor.
+event.target.result.continue();
+keyCursor()
+PASS counter is 5
+openBasicCursor()
+trans = db.transaction('basicStore')
+trans.objectStore('basicStore')
+objectStore.openCursor(keyRange)
+attemptUpdate()
+Expecting exception from cursor.update('myUpdatedValue')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The record may not be updated inside a read-only transaction.
+cursor.continue()
+attemptUpdate()
+Expecting exception from cursor.update('myUpdatedValue')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The record may not be updated inside a read-only transaction.
+cursor.continue()
+attemptUpdate()
+Expecting exception from cursor.update('myUpdatedValue')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The record may not be updated inside a read-only transaction.
+cursor.continue()
+attemptUpdate()
+Expecting exception from cursor.update('myUpdatedValue')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The record may not be updated inside a read-only transaction.
+cursor.continue()
+attemptUpdate()
+transactionComplete()
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-update-private.html b/LayoutTests/storage/indexeddb/cursor-update-private.html
new file mode 100644 (file)
index 0000000..43e2389
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-update.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-update-value-argument-required-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-update-value-argument-required-private-expected.txt
new file mode 100644 (file)
index 0000000..352bb61
--- /dev/null
@@ -0,0 +1,30 @@
+Test IndexedDB cursor.update required arguments
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore('autoIncrement', { autoIncrement: true });
+request = objectStore.openCursor();
+keys = [1, -1, 0, 10, 2000, 'q', 'z', 'two', 'b', 'a'];
+keyIndex = 0;
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.add('foo', keys[i]);
+request = objectStore.openCursor();
+cursor = event.target.result;
+PASS cursor.update(); threw exception TypeError: Not enough arguments.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-update-value-argument-required-private.html b/LayoutTests/storage/indexeddb/cursor-update-value-argument-required-private.html
new file mode 100644 (file)
index 0000000..798ba40
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-update-value-argument-required.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/cursor-value-private-expected.txt b/LayoutTests/storage/indexeddb/cursor-value-private-expected.txt
new file mode 100644 (file)
index 0000000..a419623
--- /dev/null
@@ -0,0 +1,126 @@
+Test IndexedDB's cursor value property.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore('store')
+
+testCursor():
+transaction = db.transaction('store', 'readwrite')
+store = transaction.objectStore('store')
+store.put({a: 1, b: 10}, 'key1')
+store.put({a: 2, b: 20}, 'key2')
+store.put({a: 3, b: 30}, 'key3')
+store.put({a: 4, b: 40}, 'key4')
+store.put({a: 5, b: 50}, 'key5')
+request = store.openCursor()
+
+----------
+Value at index: 0
+cursor = request.result
+PASS cursor.key is expectedKey
+
+Check expected values:
+PASS cursor.value.a is expectedA
+PASS cursor.value.b is expectedB
+PASS cursor.value.foo is undefined
+
+Modify values:
+cursor.value.a = 3
+delete cursor.value.b
+cursor.value.foo = 'bar'
+
+Ensure modifications are retained:
+PASS cursor.value.a is 3
+PASS cursor.value.b is undefined
+PASS cursor.value.foo is 'bar'
+
+Check object value survives gc
+gc()
+PASS cursor.value.a is 3
+PASS cursor.value.b is undefined
+PASS cursor.value.foo is 'bar'
+
+Check object identity
+localValueRef = cursor.value
+PASS localValueRef is cursor.value
+
+----------
+Value at index: 1
+cursor = request.result
+PASS cursor.key is expectedKey
+
+Check expected values:
+PASS cursor.value.a is expectedA
+PASS cursor.value.b is expectedB
+PASS cursor.value.foo is undefined
+
+Modify values:
+cursor.value.a = 3
+delete cursor.value.b
+cursor.value.foo = 'bar'
+
+Ensure modifications are retained:
+PASS cursor.value.a is 3
+PASS cursor.value.b is undefined
+PASS cursor.value.foo is 'bar'
+
+Check object value survives gc
+gc()
+PASS cursor.value.a is 3
+PASS cursor.value.b is undefined
+PASS cursor.value.foo is 'bar'
+
+Check object identity
+localValueRef = cursor.value
+PASS localValueRef is cursor.value
+
+----------
+Value at index: 3
+cursor = request.result
+PASS cursor.key is expectedKey
+
+Check expected values:
+PASS cursor.value.a is expectedA
+PASS cursor.value.b is expectedB
+PASS cursor.value.foo is undefined
+
+Modify values:
+cursor.value.a = 3
+delete cursor.value.b
+cursor.value.foo = 'bar'
+
+Ensure modifications are retained:
+PASS cursor.value.a is 3
+PASS cursor.value.b is undefined
+PASS cursor.value.foo is 'bar'
+
+Check object value survives gc
+gc()
+PASS cursor.value.a is 3
+PASS cursor.value.b is undefined
+PASS cursor.value.foo is 'bar'
+
+Check object identity
+localValueRef = cursor.value
+PASS localValueRef is cursor.value
+
+ensureModificationsNotPersisted():
+transaction = db.transaction('store', 'readonly')
+store = transaction.objectStore('store')
+request = store.openCursor()
+cursor = request.result
+PASS cursor.key is 'key1'
+
+Check expected values:
+PASS cursor.value.a is 1
+PASS cursor.value.b is 10
+PASS cursor.value.foo is undefined
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/cursor-value-private.html b/LayoutTests/storage/indexeddb/cursor-value-private.html
new file mode 100644 (file)
index 0000000..1470f92
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/cursor-value.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/database-basics-private-expected.txt b/LayoutTests/storage/indexeddb/database-basics-private-expected.txt
new file mode 100644 (file)
index 0000000..19f05f5
--- /dev/null
@@ -0,0 +1,61 @@
+Test the basics of IndexedDB's IDBDatabase.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+Test that you can't open a transaction while in a versionchange transaction
+Expecting exception from db.transaction("doesntExist")
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'transaction' on 'IDBDatabase': A version change transaction is running.
+PASS db.version is 1
+PASS db.name is "database-basics-private.html"
+PASS db.objectStoreNames is []
+PASS db.objectStoreNames.length is 0
+PASS db.objectStoreNames.contains('') is false
+PASS db.objectStoreNames[0] is undefined.
+PASS db.objectStoreNames.item(0) is null
+db.createObjectStore("test123")
+PASS db.objectStoreNames is ['test123']
+PASS db.objectStoreNames.length is 1
+PASS db.objectStoreNames.contains('') is false
+PASS db.objectStoreNames.contains('test456') is false
+PASS db.objectStoreNames.contains('test123') is true
+db.close()
+request = indexedDB.open(dbname, 2)
+db = event.target.result
+PASS db.version is 2
+PASS db.name is "database-basics-private.html"
+PASS db.objectStoreNames is ['test123']
+PASS db.objectStoreNames.length is 1
+PASS db.objectStoreNames.contains('') is false
+PASS db.objectStoreNames.contains('test456') is false
+PASS db.objectStoreNames.contains('test123') is true
+db.createObjectStore("test456")
+setVersionTrans = event.target.transaction
+PASS setVersionTrans is non-null.
+setVersionTrans.abort()
+PASS db.version is 1
+PASS db.objectStoreNames is ['test123']
+PASS db.objectStoreNames.length is 1
+PASS db.objectStoreNames.contains('') is false
+PASS db.objectStoreNames.contains('test456') is false
+PASS db.objectStoreNames.contains('test123') is true
+db.close()
+Now that the connection is closed, transaction creation should fail
+Expecting exception from db.transaction('test123')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
+Call twice, make sure it's harmless
+db.close()
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/database-basics-private.html b/LayoutTests/storage/indexeddb/database-basics-private.html
new file mode 100644 (file)
index 0000000..32e7a8f
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/database-basics.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/database-close-private-expected.txt b/LayoutTests/storage/indexeddb/database-close-private-expected.txt
new file mode 100644 (file)
index 0000000..e8c1c2d
--- /dev/null
@@ -0,0 +1,53 @@
+Test IndexedDB 'steps for closing a database connection'
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = connection.createObjectStore('store')
+store.put('value1', 'key1')
+store.put('value2', 'key2')
+
+testClose():
+Create transactions using connection:
+trans1 = connection.transaction('store')
+trans2 = connection.transaction('store')
+
+Close the connection:
+connection.close()
+Step 1: Set the internal closePending flag of connection to true. [Verified via side effects, below.]
+
+Step 2: Wait for all transactions created using connection to complete. Once they are complete, connection is closed.
+awaiting_transaction_count = 2
+trans1.objectStore('store').get('key1')
+trans2.objectStore('store').get('key2')
+
+NOTE: Once the closePending flag has been set to true no new transactions can be created using connection. All functions that create transactions first check the closePending flag first and throw an exception if it is true.
+
+Expecting exception from trans3 = connection.transaction('store')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
+
+NOTE: Once the connection is closed, this can unblock the steps for deleting a database, which waits for connections to a given database to be closed before continuing.
+
+indexedDB.deleteDatabase(dbname)
+
+transaction #1 request successful
+PASS event.target.result is "value1"
+
+transaction #2 request successful
+PASS event.target.result is "value2"
+
+All transactions completed - database deletes should now be unblocked.
+
+delete database unblocked
+PASS awaiting_transaction_count is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/database-close-private.html b/LayoutTests/storage/indexeddb/database-close-private.html
new file mode 100644 (file)
index 0000000..05a9ca7
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/database-close.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/database-closepending-flag-private-expected.txt b/LayoutTests/storage/indexeddb/database-closepending-flag-private-expected.txt
new file mode 100644 (file)
index 0000000..7427536
--- /dev/null
@@ -0,0 +1,77 @@
+Test IndexedDB IDBDatabase internal closePending flag
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = connection.createObjectStore('store')
+
+First, verify that the database connection is not closed:
+PASS transaction = connection.transaction('store') did not throw exception.
+
+Database closing steps
+"1. Set the internal closePending flag of connection to true."
+connection.close()
+Expecting exception from connection.transaction('store')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
+"2. Wait for all transactions created using connection to complete. Once they are complete, connection is closed."
+transaction.oncomplete = testIDBDatabaseName
+
+IDBDatabase.name:
+"The function must return this name even if the closePending flag is set on the connection."
+PASS connection.name is dbname
+
+IDBDatabase.objectStoreNames:
+"Once the closePending flag is set on the connection, this function must return a snapshot of the list of names of the object stores taken at the time when the close method was called."
+request = indexedDB.open(dbname, 2)
+version_change_connection = request.result
+version_change_connection.createObjectStore('new_store')
+PASS version_change_connection.objectStoreNames.contains('new_store') is true
+PASS connection.objectStoreNames.contains('new_store') is false
+version_change_connection.close()
+
+IDBDatabase.transaction():
+"...if this method is called on a IDBDatabase instance where the closePending flag is set, a InvalidStateError exception must be thrown."
+Expecting exception from connection.transaction('store')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
+
+"versionchange" transaction steps:
+"Fire a versionchange event at each object in openDatabases that is open. The event must not be fired on objects which has the closePending flag set."
+request = indexedDB.open(dbname)
+connection = request.result
+versionChangeWasFired = false
+connection.onversionchange = function () { versionChangeWasFired = true; }
+transaction = connection.transaction('store')
+connection.close()
+closePending is set, but active transaction will keep connection from closing
+request = indexedDB.open(dbname, 3)
+'blocked' event fired, letting transaction complete and connection close
+version_change_connection = request.result
+PASS versionChangeWasFired is false
+version_change_connection.close()
+
+Database deletion steps:
+"Fire a versionchange event at each object in openDatabases that is open. The event must not be fired on objects which has the closePending flag set."
+request = indexedDB.open(dbname)
+connection = request.result
+versionChangeWasFired = false
+connection.onversionchange = function () { versionChangeWasFired = true; }
+transaction = connection.transaction('store')
+connection.close()
+closePending is set, but active transaction will keep connection from closing
+request = indexedDB.deleteDatabase(dbname)
+'blocked' event fired, letting transaction complete and connection close
+PASS versionChangeWasFired is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/database-closepending-flag-private.html b/LayoutTests/storage/indexeddb/database-closepending-flag-private.html
new file mode 100644 (file)
index 0000000..0f0e22f
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/database-closepending-flag.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/database-deletepending-flag-private-expected.txt b/LayoutTests/storage/indexeddb/database-deletepending-flag-private-expected.txt
new file mode 100644 (file)
index 0000000..0c3ead7
--- /dev/null
@@ -0,0 +1,42 @@
+Test IndexedDB IDBDatabase internal delete pending flag
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname, 5)
+connection.createObjectStore('store')
+PASS connection.objectStoreNames.length is 1
+
+Issue a delete request against the database - should be blocked by the open connection:
+deleteRequest = indexedDB.deleteDatabase(dbname)
+state = 0
+
+Open a second connection - should be delayed:
+openRequest = indexedDB.open(dbname)
+
+connection received versionchange event - ignoring.
+PASS ++state is 1
+
+deleteRequest received blocked event.
+PASS ++state is 2
+connection.close()
+deleteRequest should now be unblocked.
+
+deleteRequest received success event.
+PASS ++state is 3
+openRequest should now be unblocked.
+
+PASS openRequest received success event.
+PASS ++state is 4
+connection2 = openRequest.result
+connection2 should reference a different database:
+PASS connection2.version == connection.version is false
+PASS connection2.objectStoreNames.length is 0
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/database-deletepending-flag-private.html b/LayoutTests/storage/indexeddb/database-deletepending-flag-private.html
new file mode 100644 (file)
index 0000000..341ef90
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/database-deletepending-flag.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/database-name-undefined-private-expected.txt b/LayoutTests/storage/indexeddb/database-name-undefined-private-expected.txt
new file mode 100644 (file)
index 0000000..eff5b64
--- /dev/null
@@ -0,0 +1,12 @@
+Test IndexedDB undefined as record value
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+PASS indexedDB.open(); threw exception TypeError: Not enough arguments.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/database-name-undefined-private.html b/LayoutTests/storage/indexeddb/database-name-undefined-private.html
new file mode 100644 (file)
index 0000000..1478240
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/database-name-undefined.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/database-odd-names-private-expected.txt b/LayoutTests/storage/indexeddb/database-odd-names-private-expected.txt
new file mode 100644 (file)
index 0000000..a9a8679
--- /dev/null
@@ -0,0 +1,23 @@
+Test IndexedDB odd value datatypes
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+opening a database named null
+indexedDB.open(testData[nextToOpen].name)
+opening a database named faihu
+indexedDB.open(testData[nextToOpen].name)
+opening a database named unpaired surrogate
+indexedDB.open(testData[nextToOpen].name)
+opening a database named fffe
+indexedDB.open(testData[nextToOpen].name)
+opening a database named ffff
+indexedDB.open(testData[nextToOpen].name)
+opening a database named line separator
+indexedDB.open(testData[nextToOpen].name)
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/database-odd-names-private.html b/LayoutTests/storage/indexeddb/database-odd-names-private.html
new file mode 100644 (file)
index 0000000..8138d27
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/database-odd-names.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/database-quota-private-expected.txt b/LayoutTests/storage/indexeddb/database-quota-private-expected.txt
new file mode 100644 (file)
index 0000000..da0112a
--- /dev/null
@@ -0,0 +1,36 @@
+Tests IndexedDB's quota enforcing mechanism.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.open('database-quota')
+db = event.target.result
+db.setVersion('new version')
+setVersionSuccess():
+trans = event.target.result
+PASS trans !== null is true
+Deleted all object stores.
+PASS db.version is "new version"
+PASS db.name is "database-quota"
+PASS db.objectStoreNames is []
+PASS db.objectStoreNames.length is 0
+PASS db.objectStoreNames.contains('') is false
+db.createObjectStore("test123")
+PASS db.objectStoreNames is ['test123']
+PASS db.objectStoreNames.length is 1
+PASS db.objectStoreNames.contains('') is false
+PASS db.objectStoreNames.contains('test456') is false
+PASS db.objectStoreNames.contains('test123') is true
+trans = db.transaction(['test123'], 'readwrite')
+Creating 'data' which contains 64K of data
+PASS data.length is 65536
+store = trans.objectStore('test123')
+Error function called: (13) The transaction was aborted, so the request cannot be fulfilled.
+event.preventDefault()
+PASS Adding data failed due to quota error. Data added was about 5 MB
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/database-quota-private.html b/LayoutTests/storage/indexeddb/database-quota-private.html
new file mode 100644 (file)
index 0000000..91dfe8e
--- /dev/null
@@ -0,0 +1,10 @@
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/database-quota.js"></script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/database-wrapper-private-expected.txt b/LayoutTests/storage/indexeddb/database-wrapper-private-expected.txt
new file mode 100644 (file)
index 0000000..e1dface
--- /dev/null
@@ -0,0 +1,34 @@
+Ensure IDBDatabase wrapper isn't prematurely collected.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB.deleteDatabase(dbname)
+
+openDB():
+indexedDB.open(dbname, 1)
+
+onUpgradeNeeded():
+db = event.target.result
+db.createObjectStore('store').createIndex('index', 'keyPath')
+db = null
+
+openSuccess():
+sawVersionChangeEvent = false
+
+collectGarbage():
+self.gc()
+
+openAgain():
+indexedDB.open(dbname, 2)
+
+onVersionChange():
+event.target.close()
+sawVersionChangeEvent = true
+
+openAgainSuccess():
+PASS sawVersionChangeEvent is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/database-wrapper-private.html b/LayoutTests/storage/indexeddb/database-wrapper-private.html
new file mode 100644 (file)
index 0000000..6990659
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/database-wrapper.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/delete-closed-database-object-private-expected.txt b/LayoutTests/storage/indexeddb/delete-closed-database-object-private-expected.txt
new file mode 100644 (file)
index 0000000..0e0c54e
--- /dev/null
@@ -0,0 +1,19 @@
+Ensure that IDBDatabase objects are deleted when there are no retaining paths left
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.close()
+indexedDB.open(dbname)
+Dropping references to new connection.
+gc()
+Open request should not receive a blocked event:
+indexedDB.open(dbname, 2)
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/delete-closed-database-object-private.html b/LayoutTests/storage/indexeddb/delete-closed-database-object-private.html
new file mode 100644 (file)
index 0000000..75a5613
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/delete-closed-database-object.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-private-expected.txt b/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-private-expected.txt
new file mode 100644 (file)
index 0000000..f78d755
--- /dev/null
@@ -0,0 +1,43 @@
+Test that a deleteDatabase called while handling an upgradeneeded event is queued and fires its events at the right time. The close() call to unblock the delete occurs in the open request's 'success' event handler.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+
+initiallyDeleted():
+request = indexedDB.open(dbname, 1)
+
+upgradeNeededCallback():
+PASS sawUpgradeNeeded is false
+sawUpgradeNeeded = true
+PASS event.oldVersion is 0
+PASS event.newVersion is 1
+db = event.target.result
+deleteRequest = indexedDB.deleteDatabase(dbname)
+request2.onsuccess = deleteSuccessCallback
+
+versionChangeCallback():
+PASS event.oldVersion is 1
+PASS event.newVersion is null
+sawVersionChange = true
+
+deleteBlockedCallback():
+PASS sawVersionChange is true
+sawDeleteBlocked = true
+
+openSuccess():
+PASS sawUpgradeNeeded is true
+db = event.target.result
+PASS db.version is 1
+db.close()
+
+deleteSuccessCallback():
+PASS sawVersionChange is true
+PASS sawDeleteBlocked is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-private.html b/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-private.html
new file mode 100644 (file)
index 0000000..057d875
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/delete-in-upgradeneeded-close-in-open-success.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-private-expected.txt b/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-private-expected.txt
new file mode 100644 (file)
index 0000000..61f005d
--- /dev/null
@@ -0,0 +1,36 @@
+Test that a deleteDatabase called while handling an upgradeneeded event is queued and fires its events at the right time. The close() call to unblock the delete occurs in the connection's 'versionchange' event handler.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+
+initiallyDeleted():
+request = indexedDB.open(dbname, 1)
+
+upgradeNeededCallback():
+PASS sawUpgradeNeeded is false
+sawUpgradeNeeded = true
+PASS event.oldVersion is 0
+PASS event.newVersion is 1
+db = event.target.result
+deleteRequest = indexedDB.deleteDatabase(dbname)
+request2.onsuccess = deleteSuccessCallback
+
+versionChangeCallback():
+PASS event.oldVersion is 1
+PASS event.newVersion is null
+sawVersionChange = true
+Closing the connection before the IDBOpenDBRequest's success fires will cause the open to fail.
+db.close()
+
+deleteSuccessCallback():
+PASS sawVersionChange is true
+PASS sawDeleteBlocked is false
+PASS sawUpgradeNeeded is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-private.html b/LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-private.html
new file mode 100644 (file)
index 0000000..0727c8d
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/delete-in-upgradeneeded-close-in-versionchange.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/delete-range-private-expected.txt b/LayoutTests/storage/indexeddb/delete-range-private-expected.txt
new file mode 100644 (file)
index 0000000..8a61f60
--- /dev/null
@@ -0,0 +1,86 @@
+Test IndexedDB's IDBObjectStore.delete(IDBKeyRange) method.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore('store')
+
+trans = db.transaction('store', 'readwrite')
+store = trans.objectStore('store')
+store.put(1,1)
+store.put(2,2)
+store.put(3,3)
+store.put(4,4)
+store.put(5,5)
+store.put(6,6)
+store.put(7,7)
+store.put(8,8)
+store.put(9,9)
+store.put(10,10)
+store.delete(IDBKeyRange.bound(3, 8, false, false))
+getting keys from store...
+expect: [1,2,9,10]
+actual: [1,2,9,10]
+PASS Match!
+
+trans = db.transaction('store', 'readwrite')
+store = trans.objectStore('store')
+store.put(1,1)
+store.put(2,2)
+store.put(3,3)
+store.put(4,4)
+store.put(5,5)
+store.put(6,6)
+store.put(7,7)
+store.put(8,8)
+store.put(9,9)
+store.put(10,10)
+store.delete(IDBKeyRange.bound(3, 8, true, false))
+getting keys from store...
+expect: [1,2,3,9,10]
+actual: [1,2,3,9,10]
+PASS Match!
+
+trans = db.transaction('store', 'readwrite')
+store = trans.objectStore('store')
+store.put(1,1)
+store.put(2,2)
+store.put(3,3)
+store.put(4,4)
+store.put(5,5)
+store.put(6,6)
+store.put(7,7)
+store.put(8,8)
+store.put(9,9)
+store.put(10,10)
+store.delete(IDBKeyRange.bound(3, 8, false, true))
+getting keys from store...
+expect: [1,2,8,9,10]
+actual: [1,2,8,9,10]
+PASS Match!
+
+trans = db.transaction('store', 'readwrite')
+store = trans.objectStore('store')
+store.put(1,1)
+store.put(2,2)
+store.put(3,3)
+store.put(4,4)
+store.put(5,5)
+store.put(6,6)
+store.put(7,7)
+store.put(8,8)
+store.put(9,9)
+store.put(10,10)
+store.delete(IDBKeyRange.bound(3, 8, true, true))
+getting keys from store...
+expect: [1,2,3,8,9,10]
+actual: [1,2,3,8,9,10]
+PASS Match!
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/delete-range-private.html b/LayoutTests/storage/indexeddb/delete-range-private.html
new file mode 100644 (file)
index 0000000..44ebfff
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/delete-range.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/deleteIndex-private-expected.txt b/LayoutTests/storage/indexeddb/deleteIndex-private-expected.txt
new file mode 100644 (file)
index 0000000..b4d0c3c
--- /dev/null
@@ -0,0 +1,39 @@
+Test IndexedDB deleteIndex method
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+objectStore = db.createObjectStore('foo');
+Expecting exception from objectStore.deleteIndex('first')
+PASS Exception was thrown.
+PASS code is DOMException.NOT_FOUND_ERR
+PASS ename is 'NotFoundError'
+Exception message: Failed to execute 'deleteIndex' on 'IDBObjectStore': The specified index was not found.
+PASS objectStore.deleteIndex() threw exception TypeError: Not enough arguments.
+index = objectStore.createIndex('first', 'first');
+Expecting exception from objectStore.deleteIndex('FIRST')
+PASS Exception was thrown.
+PASS code is DOMException.NOT_FOUND_ERR
+PASS ename is 'NotFoundError'
+Exception message: Failed to execute 'deleteIndex' on 'IDBObjectStore': The specified index was not found.
+index = objectStore.createIndex('second', 'second');
+returnValue = objectStore.deleteIndex('first');
+PASS returnValue is undefined
+Expecting exception from db.createObjectStore('bar');
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
+Expecting exception from objectStore.deleteIndex('second')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'deleteIndex' on 'IDBObjectStore': The transaction is inactive or finished.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/deleteIndex-private.html b/LayoutTests/storage/indexeddb/deleteIndex-private.html
new file mode 100644 (file)
index 0000000..cc76cf2
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/deleteIndex.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/deleteObjectStore-name-argument-required-private-expected.txt b/LayoutTests/storage/indexeddb/deleteObjectStore-name-argument-required-private-expected.txt
new file mode 100644 (file)
index 0000000..9497f3a
--- /dev/null
@@ -0,0 +1,14 @@
+Test IndexedDB deleteObjectStore required argument
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+PASS db.deleteObjectStore(); threw exception TypeError: Not enough arguments.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/deleteObjectStore-name-argument-required-private.html b/LayoutTests/storage/indexeddb/deleteObjectStore-name-argument-required-private.html
new file mode 100644 (file)
index 0000000..c2aba89
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/deleteObjectStore-name-argument-required.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/deleteObjectStore-null-name-private-expected.txt b/LayoutTests/storage/indexeddb/deleteObjectStore-null-name-private-expected.txt
new file mode 100644 (file)
index 0000000..d0a3d37
--- /dev/null
@@ -0,0 +1,15 @@
+Test IndexedDB deleteObjectStore required argument
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore('null');
+db.deleteObjectStore(null);
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/deleteObjectStore-null-name-private.html b/LayoutTests/storage/indexeddb/deleteObjectStore-null-name-private.html
new file mode 100644 (file)
index 0000000..e7226e4
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/deleteObjectStore-null-name.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/deleted-objects-private-expected.txt b/LayoutTests/storage/indexeddb/deleted-objects-private-expected.txt
new file mode 100644 (file)
index 0000000..0ed500a
--- /dev/null
@@ -0,0 +1,378 @@
+Test that IndexedDB objects that have been deleted throw exceptions
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+
+testStore():
+deletedStore = connection.createObjectStore('deletedStore')
+connection.deleteObjectStore('deletedStore')
+
+Expecting exception from deletedStore.put(0, 0)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to store record in an IDBObjectStore: The object store has been deleted.
+Expecting exception from deletedStore.add(0, 0)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to store record in an IDBObjectStore: The object store has been deleted.
+Expecting exception from deletedStore.delete(0)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'delete' on 'IDBObjectStore': The object store has been deleted.
+Expecting exception from deletedStore.delete(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'delete' on 'IDBObjectStore': The object store has been deleted.
+Expecting exception from deletedStore.get(0)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'get' on 'IDBObjectStore': The object store has been deleted.
+Expecting exception from deletedStore.get(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'get' on 'IDBObjectStore': The object store has been deleted.
+Expecting exception from deletedStore.clear()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'clear' on 'IDBObjectStore': The object store has been deleted.
+Expecting exception from deletedStore.openCursor()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The object store has been deleted.
+Expecting exception from deletedStore.openCursor(0)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The object store has been deleted.
+Expecting exception from deletedStore.openCursor(0, 'next')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The object store has been deleted.
+Expecting exception from deletedStore.openCursor(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The object store has been deleted.
+Expecting exception from deletedStore.openCursor(IDBKeyRange.only(0), 'next')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The object store has been deleted.
+Expecting exception from deletedStore.createIndex('name', 'path')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'createIndex' on 'IDBObjectStore': The object store has been deleted.
+Expecting exception from deletedStore.index('name')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'index' on 'IDBObjectStore': The object store has been deleted.
+Expecting exception from deletedStore.deleteIndex('name')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'deleteIndex' on 'IDBObjectStore': The object store has been deleted.
+Expecting exception from deletedStore.count()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'count' on 'IDBObjectStore': The object store has been deleted.
+Expecting exception from deletedStore.count(0)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'count' on 'IDBObjectStore': The object store has been deleted.
+Expecting exception from deletedStore.count(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'count' on 'IDBObjectStore': The object store has been deleted.
+
+testIndex():
+store = connection.createObjectStore('store')
+deletedIndex = store.createIndex('deletedIndex', 'path')
+store.deleteIndex('deletedIndex')
+
+Expecting exception from deletedIndex.openCursor()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from deletedIndex.openCursor(0)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from deletedIndex.openCursor(0, 'next')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from deletedIndex.openCursor(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from deletedIndex.openCursor(IDBKeyRange.only(0), 'next')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from deletedIndex.openKeyCursor()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from deletedIndex.openKeyCursor(0)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from deletedIndex.openKeyCursor(0, 'next')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from deletedIndex.openKeyCursor(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from deletedIndex.openKeyCursor(IDBKeyRange.only(0), 'next')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from deletedIndex.get(0)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'get' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from deletedIndex.get(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'get' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from deletedIndex.getKey(0)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'getKey' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from deletedIndex.getKey(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'getKey' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from deletedIndex.count()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'count' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from deletedIndex.count(0)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'count' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from deletedIndex.count(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'count' on 'IDBIndex': The index or its object store has been deleted.
+
+testTransitiveDeletion():
+deletedStore = connection.createObjectStore('deletedStore')
+indexOfDeletedStore = deletedStore.createIndex('index', 'path')
+connection.deleteObjectStore('deletedStore')
+
+Expecting exception from indexOfDeletedStore.openCursor()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from indexOfDeletedStore.openCursor(0)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from indexOfDeletedStore.openCursor(0, 'next')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from indexOfDeletedStore.openCursor(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from indexOfDeletedStore.openCursor(IDBKeyRange.only(0), 'next')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from indexOfDeletedStore.openKeyCursor()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from indexOfDeletedStore.openKeyCursor(0)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from indexOfDeletedStore.openKeyCursor(0, 'next')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from indexOfDeletedStore.openKeyCursor(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from indexOfDeletedStore.openKeyCursor(IDBKeyRange.only(0), 'next')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from indexOfDeletedStore.get(0)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'get' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from indexOfDeletedStore.get(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'get' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from indexOfDeletedStore.getKey(0)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'getKey' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from indexOfDeletedStore.getKey(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'getKey' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from indexOfDeletedStore.count()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'count' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from indexOfDeletedStore.count(0)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'count' on 'IDBIndex': The index or its object store has been deleted.
+Expecting exception from indexOfDeletedStore.count(IDBKeyRange.only(0))
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'count' on 'IDBIndex': The index or its object store has been deleted.
+
+testObjectStoreCursor():
+deletedStore = connection.createObjectStore('deletedStore')
+deletedStore.put(0, 0)
+deletedStore.openCursor()
+cursor = request.result
+PASS cursor.key is 0
+PASS cursor.value is 0
+connection.deleteObjectStore('deletedStore')
+Expecting exception from cursor.delete()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'delete' on 'IDBCursor': The cursor's source or effective object store has been deleted.
+Expecting exception from cursor.update(1)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The cursor's source or effective object store has been deleted.
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor's source or effective object store has been deleted.
+Expecting exception from cursor.advance(1)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'advance' on 'IDBCursor': The cursor's source or effective object store has been deleted.
+
+testIndexCursor():
+store.put({id: 123}, 0)
+deletedIndex = store.createIndex('deletedIndex', 'id')
+deletedIndex.openCursor()
+cursor = request.result
+PASS cursor.key is 123
+PASS cursor.primaryKey is 0
+store.deleteIndex('deletedIndex')
+Expecting exception from cursor.delete()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'delete' on 'IDBCursor': The cursor's source or effective object store has been deleted.
+Expecting exception from cursor.update(1)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The cursor's source or effective object store has been deleted.
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor's source or effective object store has been deleted.
+Expecting exception from cursor.advance(1)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'advance' on 'IDBCursor': The cursor's source or effective object store has been deleted.
+
+testIndexOfDeletedStoreCursor():
+deletedStore = connection.createObjectStore('deletedStore')
+deletedStore.put({id: 123}, 0)
+index = deletedStore.createIndex('index', 'id')
+index.openCursor()
+cursor = request.result
+PASS cursor.key is 123
+PASS cursor.primaryKey is 0
+connection.deleteObjectStore('deletedStore')
+Expecting exception from cursor.delete()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'delete' on 'IDBCursor': The cursor's source or effective object store has been deleted.
+Expecting exception from cursor.update(1)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The cursor's source or effective object store has been deleted.
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor's source or effective object store has been deleted.
+Expecting exception from cursor.advance(1)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'advance' on 'IDBCursor': The cursor's source or effective object store has been deleted.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/deleted-objects-private.html b/LayoutTests/storage/indexeddb/deleted-objects-private.html
new file mode 100644 (file)
index 0000000..9d47718
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/deleted-objects.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/deletedatabase-blocked-private-expected.txt b/LayoutTests/storage/indexeddb/deletedatabase-blocked-private-expected.txt
new file mode 100644 (file)
index 0000000..8184125
--- /dev/null
@@ -0,0 +1,29 @@
+Test that deleteDatabase is blocked on open connections
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+blockedEventFired = false
+indexedDB.open(dbname)
+
+openOnSuccess():
+h = event.target.result
+indexedDB.deleteDatabase(dbname)
+
+onVersionChange():
+PASS event.target.version is 1
+PASS event.oldVersion is 1
+PASS event.newVersion is null
+
+deleteDatabaseOnBlocked():
+blockedEventFired = true
+h.close()
+
+deleteDatabaseOnSuccess():
+PASS blockedEventFired is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/deletedatabase-blocked-private.html b/LayoutTests/storage/indexeddb/deletedatabase-blocked-private.html
new file mode 100644 (file)
index 0000000..15ad8b0
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/deletedatabase-blocked.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-private-expected.txt b/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-private-expected.txt
new file mode 100644 (file)
index 0000000..cfa08dc
--- /dev/null
@@ -0,0 +1,35 @@
+Test that deleteDatabase is delayed if a VERSION_CHANGE transaction is running
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+
+prepareDatabase():
+versionChangeComplete = false
+h = event.target.result
+indexedDB.deleteDatabase(dbname)
+
+onVersionChange():
+PASS event.target.version is 1
+PASS event.oldVersion is 1
+PASS event.newVersion is null
+
+deleteDatabaseOnBlocked():
+
+transactionOnComplete():
+versionChangeComplete = true
+
+onOpenSuccess():
+h = event.target.result
+h.close()
+
+deleteDatabaseOnSuccess():
+PASS versionChangeComplete is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-private.html b/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-private.html
new file mode 100644 (file)
index 0000000..ae4f32e
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/deletedatabase-delayed-by-open-and-versionchange.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-versionchange-private-expected.txt b/LayoutTests/storage/indexeddb/deletedatabase-delayed-by-versionchange-private-expected.txt
new file mode 100644 (file)
index 0000000..8b64c3c
--- /dev/null
@@ -0,0 +1,69 @@
+Test the order when there are pending setVersion, delete and open calls.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+
+h1OpenSuccess():
+setVersionBlockedEventFired = false
+versionChangeComplete = false
+deleteDatabaseBlockedEventFired = false
+deleteDatabaseComplete = false
+h1 = event.target.result
+Open h2:
+indexedDB.open(dbname)
+
+h2OpenSuccess():
+Try to open h3:
+indexedDB.open(dbname, 2)
+indexedDB.deleteDatabase(dbname)
+
+h1OnVersionChange():
+PASS event.target.version is 1
+PASS event.oldVersion is 1
+PASS event.newVersion is 2
+
+h2OnVersionChange():
+PASS event.target.version is 1
+PASS event.oldVersion is 1
+PASS event.newVersion is 2
+
+h3Blocked():
+setVersionBlockedEventFired = true
+Try to open h4:
+indexedDB.open(dbname)
+h2.close()
+
+h1SecondOnVersionChange():
+PASS event.target.version is 1
+PASS event.oldVersion is 1
+PASS event.newVersion is null
+
+deleteDatabaseOnBlocked():
+deleteDatabaseBlockedEventFired = true
+h1.close()
+
+h3OnUpgradeneeded():
+
+transactionOnComplete():
+versionChangeComplete = true
+
+h3OpenSuccess():
+h3.close()
+
+deleteDatabaseOnSuccess():
+deleteDatabaseComplete = true
+
+h4OpenSuccess():
+PASS setVersionBlockedEventFired is true
+PASS versionChangeComplete is true
+PASS deleteDatabaseBlockedEventFired is true
+PASS deleteDatabaseComplete is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/deletedatabase-not-blocked-private-expected.txt b/LayoutTests/storage/indexeddb/deletedatabase-not-blocked-private-expected.txt
new file mode 100644 (file)
index 0000000..8f227ec
--- /dev/null
@@ -0,0 +1,26 @@
+Test that deleteDatabase is not blocked when connections close in on versionchange callback
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+blockedEventFired = false
+indexedDB.open(dbname)
+
+openOnSuccess():
+h = event.target.result
+indexedDB.deleteDatabase(dbname)
+
+onVersionChange():
+PASS event.target.version is 1
+PASS event.oldVersion is 1
+PASS event.newVersion is null
+h.close()
+
+deleteDatabaseOnSuccess():
+PASS blockedEventFired is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/deletedatabase-not-blocked-private.html b/LayoutTests/storage/indexeddb/deletedatabase-not-blocked-private.html
new file mode 100644 (file)
index 0000000..f80dd5d
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/deletedatabase-not-blocked.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/dont-wedge-private-expected.txt b/LayoutTests/storage/indexeddb/dont-wedge-private-expected.txt
new file mode 100644 (file)
index 0000000..b566488
--- /dev/null
@@ -0,0 +1,31 @@
+Check that a page reloaded during an in-flight upgradeneeded event doesn't hang.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+dbname1 = dbname + '1'
+dbname2 = dbname + '2'
+
+deleteDatabase1():
+indexedDB.deleteDatabase(dbname1)
+In a multi process implementation this deleteDatabase may be blocked temporarily, so we don't check for either the presence or absence of a blocked event.
+
+deleteDatabase2():
+indexedDB.deleteDatabase(dbname2)
+
+openDatabase1():
+indexedDB.open(dbname1, 1)
+
+openOnUpgradeNeeded1():
+db1 = event.target.result
+store1 = db1.createObjectStore('store')
+store1.put(0, 0)
+
+openOnSuccess1():
+PASS isAfterReload() is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/dont-wedge-private.html b/LayoutTests/storage/indexeddb/dont-wedge-private.html
new file mode 100644 (file)
index 0000000..89cc00f
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/dont-wedge.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/duplicates-private-expected.txt b/LayoutTests/storage/indexeddb/duplicates-private-expected.txt
new file mode 100644 (file)
index 0000000..ec644d8
--- /dev/null
@@ -0,0 +1,87 @@
+Verify that you can put the same data in 2 different databases without uniqueness constraints firing.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore('storeName', null)
+store.createIndex('indexName', 'x')
+store.add({x: 'value', y: 'zzz'}, 'key')
+event.target.source.add({x: 'value2', y: 'zzz2'}, 'key2')
+indexObject.getKey('value')
+PASS event.target.result is "key"
+indexObject.get('value')
+PASS event.target.result.x is "value"
+PASS event.target.result.y is "zzz"
+indexObject.getKey('does not exist')
+PASS event.target.result is undefined
+indexObject.get('does not exist')
+PASS event.target.result is undefined
+indexObject.openKeyCursor()
+PASS event.target.result is non-null.
+PASS event.target.result.key is "value"
+PASS event.target.result.primaryKey is "key"
+event.target.result.continue()
+PASS event.target.result is non-null.
+PASS event.target.result.key is "value2"
+PASS event.target.result.primaryKey is "key2"
+event.target.result.continue()
+PASS event.target.result is null
+indexObject.openCursor()
+PASS event.target.result is non-null.
+PASS event.target.result.key is "value"
+PASS event.target.result.value.x is "value"
+PASS event.target.result.value.y is "zzz"
+event.target.result.continue()
+PASS event.target.result is non-null.
+PASS event.target.result.key is "value2"
+PASS event.target.result.value.x is "value2"
+PASS event.target.result.value.y is "zzz2"
+event.target.result.continue()
+PASS event.target.result is null
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+db.createObjectStore('storeName', null)
+store.createIndex('indexName', 'x')
+store.add({x: 'value', y: 'zzz'}, 'key')
+event.target.source.add({x: 'value2', y: 'zzz2'}, 'key2')
+indexObject.getKey('value')
+PASS event.target.result is "key"
+indexObject.get('value')
+PASS event.target.result.x is "value"
+PASS event.target.result.y is "zzz"
+indexObject.getKey('does not exist')
+PASS event.target.result is undefined
+indexObject.get('does not exist')
+PASS event.target.result is undefined
+indexObject.openKeyCursor()
+PASS event.target.result is non-null.
+PASS event.target.result.key is "value"
+PASS event.target.result.primaryKey is "key"
+event.target.result.continue()
+PASS event.target.result is non-null.
+PASS event.target.result.key is "value2"
+PASS event.target.result.primaryKey is "key2"
+event.target.result.continue()
+PASS event.target.result is null
+indexObject.openCursor()
+PASS event.target.result is non-null.
+PASS event.target.result.key is "value"
+PASS event.target.result.value.x is "value"
+PASS event.target.result.value.y is "zzz"
+event.target.result.continue()
+PASS event.target.result is non-null.
+PASS event.target.result.key is "value2"
+PASS event.target.result.value.x is "value2"
+PASS event.target.result.value.y is "zzz2"
+event.target.result.continue()
+PASS event.target.result is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/duplicates-private.html b/LayoutTests/storage/indexeddb/duplicates-private.html
new file mode 100644 (file)
index 0000000..3f5ab28
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/duplicates.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/error-causes-abort-by-default-private-expected.txt b/LayoutTests/storage/indexeddb/error-causes-abort-by-default-private-expected.txt
new file mode 100644 (file)
index 0000000..93e3aa3
--- /dev/null
@@ -0,0 +1,43 @@
+Verify that a transaction with an error aborts unless preventDefault() is called.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+setVersionSuccess():
+trans = event.target.transaction
+PASS trans is non-null.
+db.createObjectStore('storeName', null)
+trans = db.transaction(['storeName'], 'readwrite')
+trans.onabort = unexpectedAbortCallback
+trans.oncomplete = transactionCompleted
+store = trans.objectStore('storeName')
+store.add({x: 'value', y: 'zzz'}, 'key')
+event.target.source.add({x: 'value', y: 'zzz'}, 'key')
+event.preventDefault()
+PASS Transaction completed
+
+
+trans = db.transaction(['storeName'], 'readwrite')
+trans.onabort = transactionAborted1
+trans.oncomplete = unexpectedCompleteCallback
+store = trans.objectStore('storeName')
+store.add({x: 'value', y: 'zzz'}, 'key')
+Doing nothing to prevent the default action...
+PASS Transaction aborted
+
+
+trans = db.transaction(['storeName'], 'readwrite')
+trans.onabort = transactionAborted2
+trans.oncomplete = unexpectedCompleteCallback
+store = trans.objectStore('storeName')
+store.add({x: 'value', y: 'zzz'}, 'key')
+Omitting an onerror handler
+PASS Transaction aborted
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/error-causes-abort-by-default-private.html b/LayoutTests/storage/indexeddb/error-causes-abort-by-default-private.html
new file mode 100644 (file)
index 0000000..d230e58
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/error-causes-abort-by-default.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/events-private-expected.txt b/LayoutTests/storage/indexeddb/events-private-expected.txt
new file mode 100644 (file)
index 0000000..7a8ba3a
--- /dev/null
@@ -0,0 +1,14 @@
+Test IndexedDB's event interfaces.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+PASS 'IDBVersionChangeEvent' in self is true
+PASS 'oldVersion' in document.createEvent('IDBVersionChangeEvent') is true
+PASS 'newVersion' in document.createEvent('IDBVersionChangeEvent') is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/events-private.html b/LayoutTests/storage/indexeddb/events-private.html
new file mode 100644 (file)
index 0000000..010030b
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/events.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/exception-in-event-aborts-private-expected.txt b/LayoutTests/storage/indexeddb/exception-in-event-aborts-private-expected.txt
new file mode 100644 (file)
index 0000000..30cd74d
--- /dev/null
@@ -0,0 +1,57 @@
+Test exceptions in IDBRequest handlers cause aborts.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = db.createObjectStore('storeName', null)
+store.add({x: 'value', y: 'zzz'}, 'key')
+
+trans = db.transaction(['storeName'], 'readwrite')
+trans.onabort = transactionAborted1
+trans.oncomplete = unexpectedCompleteCallback
+store = trans.objectStore('storeName')
+store.add({x: 'value2', y: 'zzz2'}, 'key2')
+
+event.preventDefault()
+Throwing
+
+PASS Got expected error: 'this exception is expected'
+PASS The transaction was aborted.
+trans = db.transaction(['storeName'], 'readwrite')
+trans.onabort = transactionAborted2
+trans.oncomplete = unexpectedCompleteCallback
+store = trans.objectStore('storeName')
+store.add({x: 'value', y: 'zzz'}, 'key')
+
+event.preventDefault()
+Throwing
+
+PASS Got expected error: 'this exception is expected'
+PASS The transaction was aborted.
+trans = db.transaction(['storeName'], 'readwrite')
+trans.onabort = unexpectedAbortCallback
+trans.oncomplete = transactionCompleted1
+store = trans.objectStore('storeName')
+store.add({x: 'value3', y: 'zzz3'}, 'key3')
+
+event.preventDefault()
+Throwing within a try block
+
+PASS The transaction completed.
+trans = db.transaction(['storeName'], 'readwrite')
+trans.onabort = unexpectedAbortCallback
+trans.oncomplete = transactionCompleted2
+store = trans.objectStore('storeName')
+store.add({x: 'value4', y: 'zzz4'}, 'key4')
+PASS key4 added
+
+PASS The transaction completed.
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/exception-in-event-aborts-private.html b/LayoutTests/storage/indexeddb/exception-in-event-aborts-private.html
new file mode 100644 (file)
index 0000000..79df11e
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/exception-in-event-aborts.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/exceptions-private-expected.txt b/LayoutTests/storage/indexeddb/exceptions-private-expected.txt
new file mode 100644 (file)
index 0000000..b688918
--- /dev/null
@@ -0,0 +1,552 @@
+Test that expected exceptions are thrown per IndexedDB spec.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
+store = db.createObjectStore('store')
+index = store.createIndex('index', 'id')
+store.put({id: 'a'}, 1)
+store.put({id: 'b'}, 2)
+store.put({id: 'c'}, 3)
+store.put({id: 'd'}, 4)
+store.put({id: 'e'}, 5)
+store.put({id: 'f'}, 6)
+store.put({id: 'g'}, 7)
+store.put({id: 'h'}, 8)
+store.put({id: 'i'}, 9)
+store.put({id: 'j'}, 10)
+otherStore = db.createObjectStore('otherStore')
+inlineKeyStore = db.createObjectStore('inlineKeyStore', {keyPath: 'id'})
+request = inlineKeyStore.put({id: 0})
+PASS request.readyState is "pending"
+
+3.2.1 The IDBRequest Interface
+
+IDBRequest.error
+When the done flag is false, getting this property must throw a DOMException of type InvalidStateError.
+Expecting exception from request.error
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to read the 'error' property from 'IDBRequest': The request has not finished.
+
+IDBRequest.result
+When the done flag is false, getting this property must throw a DOMException of type InvalidStateError.
+Expecting exception from request.result
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to read the 'result' property from 'IDBRequest': The request has not finished.
+
+3.2.3 Opening a database
+
+IDBFactory.cmp()
+One of the supplied keys was not a valid key.
+Expecting exception from indexedDB.cmp(null, 0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+db.close()
+
+3.2.4 Database
+indexedDB.open(dbname, 2)
+
+IDBDatabase.createObjectStore()
+If an objectStore with the same name already exists, the implementation must throw a DOMException of type ConstraintError.
+Expecting exception from db.createObjectStore('store')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ConstraintError'
+Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': An object store with the specified name already exists.
+If keyPath is not a valid key path then a DOMException of type SyntaxError must be thrown.
+Expecting exception from db.createObjectStore('fail', {keyPath: '-invalid-'})
+PASS Exception was thrown.
+PASS code is DOMException.SYNTAX_ERR
+PASS ename is 'SyntaxError'
+Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The keyPath option is not a valid key path.
+If the optionalParameters parameter is specified, and autoIncrement is set to true, and the keyPath parameter is specified to the empty string, or specified to an Array, this function must throw a InvalidAccessError exception.
+Expecting exception from db.createObjectStore('fail', {autoIncrement: true, keyPath: ''})
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_ACCESS_ERR
+PASS ename is 'InvalidAccessError'
+Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
+Expecting exception from db.createObjectStore('fail', {autoIncrement: true, keyPath: ['a']})
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_ACCESS_ERR
+PASS ename is 'InvalidAccessError'
+Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
+
+IDBDatabase.deleteObjectStore()
+There is no object store with the given name, compared in a case-sensitive manner, in the connected database.
+Expecting exception from db.deleteObjectStore('no-such-store')
+PASS Exception was thrown.
+PASS code is DOMException.NOT_FOUND_ERR
+PASS ename is 'NotFoundError'
+Exception message: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The specified object store was not found.
+
+IDBDatabase.transaction()
+If this method is called on IDBDatabase object for which a "versionchange" transaction is still running, a InvalidStateError exception must be thrown.
+Expecting exception from db.transaction('store')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'transaction' on 'IDBDatabase': A version change transaction is running.
+One of the names provided in the storeNames argument doesn't exist in this database.
+Expecting exception from db.transaction('no-such-store')
+PASS Exception was thrown.
+PASS code is DOMException.NOT_FOUND_ERR
+PASS ename is 'NotFoundError'
+Exception message: Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.
+The value for the mode parameter is invalid.
+Expecting TypeError exception from db.transaction('store', 'invalid-mode')
+PASS Exception was thrown.
+PASS db.transaction('store', 'invalid-mode') threw TypeError: Failed to execute 'transaction' on 'IDBDatabase': The mode provided ('invalid-mode') is not one of 'readonly' or 'readwrite'.
+The function was called with an empty list of store names
+Expecting exception from db.transaction([])
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_ACCESS_ERR
+PASS ename is 'InvalidAccessError'
+Exception message: Failed to execute 'transaction' on 'IDBDatabase': The storeNames parameter was empty.
+
+One more IDBDatabase.createObjectStore() test:
+If this function is called from outside a "versionchange" transaction callback ... the implementation must throw a DOMException of type InvalidStateError.
+Expecting exception from db.createObjectStore('fail')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
+
+One more IDBDatabase.deleteObjectStore() test:
+If this function is called from outside a "versionchange" transaction callback ... the implementation must throw a DOMException of type InvalidStateError.
+Expecting exception from db.deleteObjectStore('fail')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
+
+Prepare an object store and index from an inactive transaction for later use.
+finishedTransaction = inactiveTransaction = db.transaction('store')
+storeFromInactiveTransaction = inactiveTransaction.objectStore('store')
+indexFromInactiveTransaction = storeFromInactiveTransaction.index('index')
+request = storeFromInactiveTransaction.openCursor()
+cursorFromInactiveTransaction = request.result
+
+3.2.5 Object Store
+ro_transaction = db.transaction('store', 'readonly')
+storeFromReadOnlyTransaction = ro_transaction.objectStore('store')
+rw_transaction = db.transaction('store', 'readwrite')
+store = rw_transaction.objectStore('store')
+
+IDBObjectStore.add()
+This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly".
+Expecting exception from storeFromReadOnlyTransaction.add(0, 0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: Failed to store record in an IDBObjectStore: The transaction is read-only.
+The transaction this IDBObjectStore belongs to is not active.
+Expecting exception from storeFromInactiveTransaction.add(0, 0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to store record in an IDBObjectStore: The transaction is inactive or finished.
+The data being stored could not be cloned by the internal structured cloning algorithm.
+Expecting exception from store.add(self, 0)
+PASS Exception was thrown.
+PASS code is DOMException.DATA_CLONE_ERR
+Exception message: Failed to store record in an IDBObjectStore: An object could not be cloned.
+
+IDBObjectStore.clear()
+This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly".
+Expecting exception from storeFromReadOnlyTransaction.clear()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: Failed to execute 'clear' on 'IDBObjectStore': The transaction is read-only.
+The transaction this IDBObjectStore belongs to is not active.
+Expecting exception from storeFromInactiveTransaction.clear()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'clear' on 'IDBObjectStore': The transaction is inactive or finished.
+
+IDBObjectStore.count()
+If the optional key parameter is not a valid key or a key range, this method throws a DOMException of type DataError.
+Expecting exception from store.count({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'count' on 'IDBObjectStore': The parameter is not a valid key.
+The transaction this IDBObjectStore belongs to is not active.
+Expecting exception from storeFromInactiveTransaction.count()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'count' on 'IDBObjectStore': The transaction is inactive or finished.
+
+IDBObjectStore.delete()
+This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly".
+Expecting exception from storeFromReadOnlyTransaction.delete(0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: Failed to execute 'delete' on 'IDBObjectStore': The transaction is read-only.
+If the key parameter is not a valid key or a key range this method throws a DOMException of type DataError.
+Expecting exception from store.delete({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key.
+The transaction this IDBObjectStore belongs to is not active.
+Expecting exception from storeFromInactiveTransaction.add(0, 0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to store record in an IDBObjectStore: The transaction is inactive or finished.
+
+IDBObjectStore.get()
+If the key parameter is not a valid key or a key range, this method throws a DOMException of type DataError.
+Expecting exception from store.get({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'get' on 'IDBObjectStore': The parameter is not a valid key.
+The transaction this IDBObjectStore belongs to is not active.
+Expecting exception from storeFromInactiveTransaction.get(0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction is inactive or finished.
+
+IDBObjectStore.index()
+There is no index with the given name, compared in a case-sensitive manner, in the connected database.
+Expecting exception from store.index('no-such-index')
+PASS Exception was thrown.
+PASS code is DOMException.NOT_FOUND_ERR
+PASS ename is 'NotFoundError'
+Exception message: Failed to execute 'index' on 'IDBObjectStore': The specified index was not found.
+Occurs if a request is made on a source object that has been deleted or removed, or if the transaction the object store belongs to has finished.
+Expecting exception from storeFromInactiveTransaction.index('index')
+PASS Exception was thrown.
+PASS code is 11
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'index' on 'IDBObjectStore': The transaction is finished.
+
+IDBObjectStore.openCursor()
+If the range parameter is specified but is not a valid key or a key range, this method throws a DOMException of type DataError.
+Expecting exception from store.openCursor({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The parameter is not a valid key.
+The transaction this IDBObjectStore belongs to is not active.
+Expecting exception from storeFromInactiveTransaction.openCursor()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The transaction is inactive or finished.
+The value for the direction parameter is invalid.
+Expecting TypeError exception from store.openCursor(0, 'invalid-direction')
+PASS Exception was thrown.
+PASS store.openCursor(0, 'invalid-direction') threw TypeError: Type error
+
+IDBObjectStore.put()
+This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly".
+Expecting exception from storeFromReadOnlyTransaction.put(0, 0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: Failed to store record in an IDBObjectStore: The transaction is read-only.
+The transaction this IDBObjectStore belongs to is not active.
+Expecting exception from storeFromInactiveTransaction.put(0, 0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to store record in an IDBObjectStore: The transaction is inactive or finished.
+The data being stored could not be cloned by the internal structured cloning algorithm.
+Expecting exception from store.put(self, 0)
+PASS Exception was thrown.
+PASS code is DOMException.DATA_CLONE_ERR
+Exception message: Failed to store record in an IDBObjectStore: An object could not be cloned.
+db.close()
+ro_transaction.oncomplete = transactionComplete
+rw_transaction.oncomplete = transactionComplete
+
+transactionComplete():
+First transaction completed
+
+transactionComplete():
+request = indexedDB.open(dbname, 3)
+request.onupgradeneeded = onUpgradeNeeded3
+
+IDBObjectStore.createIndex()
+If an index with the same name already exists, the implementation must throw a DOMException of type ConstraintError. 
+Expecting exception from store.createIndex('index', 'keyPath')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ConstraintError'
+Exception message: Failed to execute 'createIndex' on 'IDBObjectStore': An index with the specified name already exists.
+If keyPath is not a valid key path then a DOMException of type SyntaxError must be thrown.
+Expecting exception from store.createIndex('fail', '-invalid-')
+PASS Exception was thrown.
+PASS code is DOMException.SYNTAX_ERR
+PASS ename is 'SyntaxError'
+Exception message: Failed to execute 'createIndex' on 'IDBObjectStore': The keyPath argument contains an invalid key path.
+If keyPath is an Array and the multiEntry property in the optionalParameters is true, then a DOMException of type InvalidAccessError must be thrown.
+Expecting exception from store.createIndex('fail', ['a'], {multiEntry: true})
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_ACCESS_ERR
+PASS ename is 'InvalidAccessError'
+Exception message: Failed to execute 'createIndex' on 'IDBObjectStore': The keyPath argument was an array and the multiEntry option is true.
+
+IDBObjectStore.deleteIndex()
+There is no index with the given name, compared in a case-sensitive manner, in the connected database.
+Expecting exception from store.deleteIndex('no-such-index')
+PASS Exception was thrown.
+PASS code is DOMException.NOT_FOUND_ERR
+PASS ename is 'NotFoundError'
+Exception message: Failed to execute 'deleteIndex' on 'IDBObjectStore': The specified index was not found.
+
+One more IDBObjectStore.createIndex() test:
+If this function is called from outside a "versionchange" transaction callback ... the implementation must throw a DOMException of type InvalidStateError.
+Expecting exception from db.transaction('store').objectStore('store').createIndex('fail', 'keyPath')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'createIndex' on 'IDBObjectStore': The database is not running a version change transaction.
+
+One more IDBObjectStore.deleteIndex() test:
+If this function is called from outside a "versionchange" transaction callback ... the implementation must throw a DOMException of type InvalidStateError.
+Expecting exception from db.transaction('store').objectStore('store').deleteIndex('fail', 'keyPath')
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'deleteIndex' on 'IDBObjectStore': The database is not running a version change transaction.
+
+3.2.6 Index
+indexFromReadOnlyTransaction = db.transaction('store', 'readonly').objectStore('store').index('index')
+index = db.transaction('store', 'readwrite').objectStore('store').index('index')
+
+IDBIndex.count()
+If the optional key parameter is not a valid key or a key range, this method throws a DOMException of type DataError.
+Expecting exception from index.count({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'count' on 'IDBIndex': The parameter is not a valid key.
+The transaction this IDBIndex belongs to is not active.
+Expecting exception from indexFromInactiveTransaction.count()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'count' on 'IDBIndex': The transaction is inactive or finished.
+
+IDBIndex.get()
+If the key parameter is not a valid key or a key range, this method throws a DOMException of type DataError.
+Expecting exception from index.get({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'get' on 'IDBIndex': The parameter is not a valid key.
+The transaction this IDBIndex belongs to is not active.
+Expecting exception from indexFromInactiveTransaction.get(0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'get' on 'IDBIndex': The transaction is inactive or finished.
+
+IDBIndex.getKey()
+If the key parameter is not a valid key or a key range, this method throws a DOMException of type DataError.
+Expecting exception from index.getKey({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'getKey' on 'IDBIndex': The parameter is not a valid key.
+The transaction this IDBIndex belongs to is not active.
+Expecting exception from indexFromInactiveTransaction.getKey(0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'getKey' on 'IDBIndex': The transaction is inactive or finished.
+
+IDBIndex.openCursor()
+If the range parameter is specified but is not a valid key or a key range, this method throws a DOMException of type DataError.
+Expecting exception from index.openCursor({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'openCursor' on 'IDBIndex': The parameter is not a valid key.
+The transaction this IDBIndex belongs to is not active.
+Expecting exception from indexFromInactiveTransaction.openCursor()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'openCursor' on 'IDBIndex': The transaction is inactive or finished.
+The value for the direction parameter is invalid.
+Expecting TypeError exception from index.openCursor(0, 'invalid-direction')
+PASS Exception was thrown.
+PASS index.openCursor(0, 'invalid-direction') threw TypeError: Failed to execute 'openCursor' on 'IDBIndex': The direction provided ('invalid-direction') is not one of 'next', 'nextunique', 'prev', or 'prevunique'.
+
+IDBIndex.openKeyCursor()
+If the range parameter is specified but is not a valid key or a key range, this method throws a DOMException of type DataError.
+Expecting exception from index.openKeyCursor({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The parameter is not a valid key.
+The transaction this IDBIndex belongs to is not active.
+Expecting exception from indexFromInactiveTransaction.openKeyCursor()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The transaction is inactive or finished.
+The value for the direction parameter is invalid.
+Expecting TypeError exception from index.openKeyCursor(0, 'invalid-direction')
+PASS Exception was thrown.
+PASS index.openKeyCursor(0, 'invalid-direction') threw TypeError: Failed to execute 'openKeyCursor' on 'IDBIndex': The direction provided ('invalid-direction') is not one of 'next', 'nextunique', 'prev', or 'prevunique'.
+
+3.2.7 Cursor
+transaction = db.transaction(['store', 'inlineKeyStore'], 'readwrite')
+request = transaction.objectStore('store').openCursor()
+cursor = request.result
+request = transaction.objectStore('store').index('index').openKeyCursor()
+keyCursor = request.result
+request = transaction.objectStore('store').openCursor(IDBKeyRange.lowerBound(-Infinity), 'prev')
+reverseCursor = request.result
+request = transaction.objectStore('inlineKeyStore').openCursor()
+inlineCursor = request.result
+
+IDBCursor.advance()
+Calling this method more than once before new cursor data has been loaded is not allowed and results in a DOMException of type InvalidStateError being thrown.
+If the value for count is 0 (zero) or a negative number, this method must throw a JavaScript TypeError exception.
+Expecting TypeError exception from cursor.advance(0)
+PASS Exception was thrown.
+PASS cursor.advance(0) threw TypeError: Failed to execute 'advance' on 'IDBCursor': A count argument with value 0 (zero) was supplied, must be greater than 0.
+cursor.advance(1)
+Expecting exception from cursor.advance(1)
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'advance' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+The transaction this IDBCursor belongs to is not active.
+Expecting exception from cursorFromInactiveTransaction.advance(1)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'advance' on 'IDBCursor': The transaction is inactive or finished.
+
+IDBCursor.continue()
+The parameter is not a valid key.
+Expecting exception from cursor.continue({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'continue' on 'IDBCursor': The parameter is not a valid key.
+The parameter is less than or equal to this cursor's position and this cursor's direction is "next" or "nextunique".
+Expecting exception from cursor.continue(-Infinity)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'continue' on 'IDBCursor': The parameter is less than or equal to this cursor's position.
+The parameter is greater than or equal to this cursor's position and this cursor's direction is "prev" or "prevunique".
+Expecting exception from reverseCursor.continue(100)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'continue' on 'IDBCursor': The parameter is greater than or equal to this cursor's position.
+Calling this method more than once before new cursor data has been loaded is not allowed and results in a DOMException of type InvalidStateError being thrown.
+cursor.continue()
+Expecting exception from cursor.continue()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'continue' on 'IDBCursor': The cursor is being iterated or has iterated past its end.
+The transaction this IDBCursor belongs to is not active.
+Expecting exception from cursorFromInactiveTransaction.continue()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'continue' on 'IDBCursor': The transaction is inactive or finished.
+
+IDBCursor.delete()
+If this cursor's got value flag is false, or if this cursor was created using openKeyCursor a DOMException of type InvalidStateError is thrown.
+Expecting exception from keyCursor.delete()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'delete' on 'IDBCursor': The cursor is a key cursor.
+The transaction this IDBCursor belongs to is not active.
+Expecting exception from cursorFromInactiveTransaction.delete()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'delete' on 'IDBCursor': The transaction is inactive or finished.
+
+IDBCursor.update()
+If this cursor's got value flag is false or if this cursor was created using openKeyCursor. This method throws a DOMException of type InvalidStateError.
+Expecting exception from keyCursor.update({})
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The cursor is a key cursor.
+If the effective object store of this cursor uses in-line keys and evaluating the key path of the value parameter results in a different value than the cursor's effective key, this method throws a DOMException of type DataError.
+Expecting exception from inlineCursor.update({id: 1})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The effective object store of this cursor uses in-line keys and evaluating the key path of the value parameter results in a different value than the cursor's effective key.
+If the structured clone algorithm throws an exception, that exception is rethrown.
+Expecting exception from cursor.update(self)
+PASS Exception was thrown.
+PASS code is DOMException.DATA_CLONE_ERR
+Exception message: Failed to store record in an IDBObjectStore: An object could not be cloned.
+The transaction this IDBCursor belongs to is not active.
+Expecting exception from cursorFromInactiveTransaction.update({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'TransactionInactiveError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The transaction is inactive or finished.
+readOnlyTransaction = db.transaction('store', 'readonly')
+request = readOnlyTransaction.objectStore('store').openCursor()
+cursorFromReadOnlyTransaction = request.result
+
+One more IDBCursor.delete() test:
+This method throws a DOMException of type ReadOnlyError if the transaction which this IDBCursor belongs to has its mode set to "readonly".
+Expecting exception from cursorFromReadOnlyTransaction.delete()
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: Failed to execute 'delete' on 'IDBCursor': The record may not be deleted inside a read-only transaction.
+
+One more IDBCursor.update() test:
+This method throws a DOMException of type ReadOnlyError if the transaction which this IDBCursor belongs to has its mode set to "readonly".
+Expecting exception from cursorFromReadOnlyTransaction.update({})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'ReadOnlyError'
+Exception message: Failed to execute 'update' on 'IDBCursor': The record may not be updated inside a read-only transaction.
+
+3.2.8 Transaction
+
+IDBTransaction.abort()
+If this transaction is finished, throw a DOMException of type InvalidStateError. 
+Expecting exception from finishedTransaction.abort()
+PASS Exception was thrown.
+PASS code is DOMException.INVALID_STATE_ERR
+PASS ename is 'InvalidStateError'
+Exception message: Failed to execute 'abort' on 'IDBTransaction': The transaction is inactive or finished.
+If the requested object store is not in this transaction's scope.
+Expecting exception from db.transaction('store').objectStore('otherStore')
+PASS Exception was thrown.
+PASS code is DOMException.NOT_FOUND_ERR
+PASS ename is 'NotFoundError'
+Exception message: Failed to execute 'objectStore' on 'IDBTransaction': The specified object store was not found.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/exceptions-private.html b/LayoutTests/storage/indexeddb/exceptions-private.html
new file mode 100644 (file)
index 0000000..301ea31
--- /dev/null
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/exceptions.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/factory-cmp-private-expected.txt b/LayoutTests/storage/indexeddb/factory-cmp-private-expected.txt
new file mode 100644 (file)
index 0000000..ada0b7a
--- /dev/null
@@ -0,0 +1,1025 @@
+Test IndexedDB key comparison using IDBFactory.cmp().
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+PASS typeof indexedDB.cmp is "function"
+
+compare valid keys
+PASS indexedDB.cmp(-Infinity,-Number.MAX_VALUE) is -1
+PASS indexedDB.cmp(-Number.MAX_VALUE,-Infinity) is 1
+PASS indexedDB.cmp(-Infinity,-Infinity) is 0
+PASS indexedDB.cmp(-Number.MAX_VALUE,-Number.MAX_VALUE) is 0
+PASS indexedDB.cmp(-Number.MAX_VALUE,-1) is -1
+PASS indexedDB.cmp(-1,-Number.MAX_VALUE) is 1
+PASS indexedDB.cmp(-Number.MAX_VALUE,-Number.MAX_VALUE) is 0
+PASS indexedDB.cmp(-1,-1) is 0
+PASS indexedDB.cmp(-1,-Number.MIN_VALUE) is -1
+PASS indexedDB.cmp(-Number.MIN_VALUE,-1) is 1
+PASS indexedDB.cmp(-1,-1) is 0
+PASS indexedDB.cmp(-Number.MIN_VALUE,-Number.MIN_VALUE) is 0
+PASS indexedDB.cmp(-Number.MIN_VALUE,0) is -1
+PASS indexedDB.cmp(0,-Number.MIN_VALUE) is 1
+PASS indexedDB.cmp(-Number.MIN_VALUE,-Number.MIN_VALUE) is 0
+PASS indexedDB.cmp(0,0) is 0
+PASS indexedDB.cmp(0,Number.MIN_VALUE) is -1
+PASS indexedDB.cmp(Number.MIN_VALUE,0) is 1
+PASS indexedDB.cmp(0,0) is 0
+PASS indexedDB.cmp(Number.MIN_VALUE,Number.MIN_VALUE) is 0
+PASS indexedDB.cmp(Number.MIN_VALUE,1) is -1
+PASS indexedDB.cmp(1,Number.MIN_VALUE) is 1
+PASS indexedDB.cmp(Number.MIN_VALUE,Number.MIN_VALUE) is 0
+PASS indexedDB.cmp(1,1) is 0
+PASS indexedDB.cmp(1,Number.MAX_VALUE) is -1
+PASS indexedDB.cmp(Number.MAX_VALUE,1) is 1
+PASS indexedDB.cmp(1,1) is 0
+PASS indexedDB.cmp(Number.MAX_VALUE,Number.MAX_VALUE) is 0
+PASS indexedDB.cmp(Number.MAX_VALUE,Infinity) is -1
+PASS indexedDB.cmp(Infinity,Number.MAX_VALUE) is 1
+PASS indexedDB.cmp(Number.MAX_VALUE,Number.MAX_VALUE) is 0
+PASS indexedDB.cmp(Infinity,Infinity) is 0
+PASS indexedDB.cmp(Infinity,new Date(0)) is -1
+PASS indexedDB.cmp(new Date(0),Infinity) is 1
+PASS indexedDB.cmp(Infinity,Infinity) is 0
+PASS indexedDB.cmp(new Date(0),new Date(0)) is 0
+PASS indexedDB.cmp(new Date(0),new Date(1000)) is -1
+PASS indexedDB.cmp(new Date(1000),new Date(0)) is 1
+PASS indexedDB.cmp(new Date(0),new Date(0)) is 0
+PASS indexedDB.cmp(new Date(1000),new Date(1000)) is 0
+PASS indexedDB.cmp(new Date(1000),new Date(1317399931023)) is -1
+PASS indexedDB.cmp(new Date(1317399931023),new Date(1000)) is 1
+PASS indexedDB.cmp(new Date(1000),new Date(1000)) is 0
+PASS indexedDB.cmp(new Date(1317399931023),new Date(1317399931023)) is 0
+PASS indexedDB.cmp(new Date(1317399931023),'') is -1
+PASS indexedDB.cmp('',new Date(1317399931023)) is 1
+PASS indexedDB.cmp(new Date(1317399931023),new Date(1317399931023)) is 0
+PASS indexedDB.cmp('','') is 0
+PASS indexedDB.cmp('','\0') is -1
+PASS indexedDB.cmp('\0','') is 1
+PASS indexedDB.cmp('','') is 0
+PASS indexedDB.cmp('\0','\0') is 0
+PASS indexedDB.cmp('\0','a') is -1
+PASS indexedDB.cmp('a','\0') is 1
+PASS indexedDB.cmp('\0','\0') is 0
+PASS indexedDB.cmp('a','a') is 0
+PASS indexedDB.cmp('a','aa') is -1
+PASS indexedDB.cmp('aa','a') is 1
+PASS indexedDB.cmp('a','a') is 0
+PASS indexedDB.cmp('aa','aa') is 0
+PASS indexedDB.cmp('aa','b') is -1
+PASS indexedDB.cmp('b','aa') is 1
+PASS indexedDB.cmp('aa','aa') is 0
+PASS indexedDB.cmp('b','b') is 0
+PASS indexedDB.cmp('b','ba') is -1
+PASS indexedDB.cmp('ba','b') is 1
+PASS indexedDB.cmp('b','b') is 0
+PASS indexedDB.cmp('ba','ba') is 0
+PASS indexedDB.cmp('ba','¢') is -1
+PASS indexedDB.cmp('¢','ba') is 1
+PASS indexedDB.cmp('ba','ba') is 0
+PASS indexedDB.cmp('¢','¢') is 0
+PASS indexedDB.cmp('¢','水') is -1
+PASS indexedDB.cmp('水','¢') is 1
+PASS indexedDB.cmp('¢','¢') is 0
+PASS indexedDB.cmp('水','水') is 0
+PASS indexedDB.cmp('水','𝄞') is -1
+PASS indexedDB.cmp('𝄞','水') is 1
+PASS indexedDB.cmp('水','水') is 0
+PASS indexedDB.cmp('𝄞','𝄞') is 0
+PASS indexedDB.cmp('𝄞','�') is -1
+PASS indexedDB.cmp('�','𝄞') is 1
+PASS indexedDB.cmp('𝄞','𝄞') is 0
+PASS indexedDB.cmp('�','�') is 0
+PASS indexedDB.cmp('�',[]) is -1
+PASS indexedDB.cmp([],'�') is 1
+PASS indexedDB.cmp('�','�') is 0
+PASS indexedDB.cmp([],[]) is 0
+PASS indexedDB.cmp([],[-Infinity]) is -1
+PASS indexedDB.cmp([-Infinity],[]) is 1
+PASS indexedDB.cmp([],[]) is 0
+PASS indexedDB.cmp([-Infinity],[-Infinity]) is 0
+PASS indexedDB.cmp([-Infinity],[-Number.MAX_VALUE]) is -1
+PASS indexedDB.cmp([-Number.MAX_VALUE],[-Infinity]) is 1
+PASS indexedDB.cmp([-Infinity],[-Infinity]) is 0
+PASS indexedDB.cmp([-Number.MAX_VALUE],[-Number.MAX_VALUE]) is 0
+PASS indexedDB.cmp([-Number.MAX_VALUE],[-1]) is -1
+PASS indexedDB.cmp([-1],[-Number.MAX_VALUE]) is 1
+PASS indexedDB.cmp([-Number.MAX_VALUE],[-Number.MAX_VALUE]) is 0
+PASS indexedDB.cmp([-1],[-1]) is 0
+PASS indexedDB.cmp([-1],[-Number.MIN_VALUE]) is -1
+PASS indexedDB.cmp([-Number.MIN_VALUE],[-1]) is 1
+PASS indexedDB.cmp([-1],[-1]) is 0
+PASS indexedDB.cmp([-Number.MIN_VALUE],[-Number.MIN_VALUE]) is 0
+PASS indexedDB.cmp([-Number.MIN_VALUE],[0]) is -1
+PASS indexedDB.cmp([0],[-Number.MIN_VALUE]) is 1
+PASS indexedDB.cmp([-Number.MIN_VALUE],[-Number.MIN_VALUE]) is 0
+PASS indexedDB.cmp([0],[0]) is 0
+PASS indexedDB.cmp([0],[Number.MIN_VALUE]) is -1
+PASS indexedDB.cmp([Number.MIN_VALUE],[0]) is 1
+PASS indexedDB.cmp([0],[0]) is 0
+PASS indexedDB.cmp([Number.MIN_VALUE],[Number.MIN_VALUE]) is 0
+PASS indexedDB.cmp([Number.MIN_VALUE],[1]) is -1
+PASS indexedDB.cmp([1],[Number.MIN_VALUE]) is 1
+PASS indexedDB.cmp([Number.MIN_VALUE],[Number.MIN_VALUE]) is 0
+PASS indexedDB.cmp([1],[1]) is 0
+PASS indexedDB.cmp([1],[Number.MAX_VALUE]) is -1
+PASS indexedDB.cmp([Number.MAX_VALUE],[1]) is 1
+PASS indexedDB.cmp([1],[1]) is 0
+PASS indexedDB.cmp([Number.MAX_VALUE],[Number.MAX_VALUE]) is 0
+PASS indexedDB.cmp([Number.MAX_VALUE],[Infinity]) is -1
+PASS indexedDB.cmp([Infinity],[Number.MAX_VALUE]) is 1
+PASS indexedDB.cmp([Number.MAX_VALUE],[Number.MAX_VALUE]) is 0
+PASS indexedDB.cmp([Infinity],[Infinity]) is 0
+PASS indexedDB.cmp([Infinity],[new Date(0)]) is -1
+PASS indexedDB.cmp([new Date(0)],[Infinity]) is 1
+PASS indexedDB.cmp([Infinity],[Infinity]) is 0
+PASS indexedDB.cmp([new Date(0)],[new Date(0)]) is 0
+PASS indexedDB.cmp([new Date(0)],[new Date(1000)]) is -1
+PASS indexedDB.cmp([new Date(1000)],[new Date(0)]) is 1
+PASS indexedDB.cmp([new Date(0)],[new Date(0)]) is 0
+PASS indexedDB.cmp([new Date(1000)],[new Date(1000)]) is 0
+PASS indexedDB.cmp([new Date(1000)],[new Date(1317399931023)]) is -1
+PASS indexedDB.cmp([new Date(1317399931023)],[new Date(1000)]) is 1
+PASS indexedDB.cmp([new Date(1000)],[new Date(1000)]) is 0
+PASS indexedDB.cmp([new Date(1317399931023)],[new Date(1317399931023)]) is 0
+PASS indexedDB.cmp([new Date(1317399931023)],['']) is -1
+PASS indexedDB.cmp([''],[new Date(1317399931023)]) is 1
+PASS indexedDB.cmp([new Date(1317399931023)],[new Date(1317399931023)]) is 0
+PASS indexedDB.cmp([''],['']) is 0
+PASS indexedDB.cmp([''],['\0']) is -1
+PASS indexedDB.cmp(['\0'],['']) is 1
+PASS indexedDB.cmp([''],['']) is 0
+PASS indexedDB.cmp(['\0'],['\0']) is 0
+PASS indexedDB.cmp(['\0'],['a']) is -1
+PASS indexedDB.cmp(['a'],['\0']) is 1
+PASS indexedDB.cmp(['\0'],['\0']) is 0
+PASS indexedDB.cmp(['a'],['a']) is 0
+PASS indexedDB.cmp(['a'],['aa']) is -1
+PASS indexedDB.cmp(['aa'],['a']) is 1
+PASS indexedDB.cmp(['a'],['a']) is 0
+PASS indexedDB.cmp(['aa'],['aa']) is 0
+PASS indexedDB.cmp(['aa'],['b']) is -1
+PASS indexedDB.cmp(['b'],['aa']) is 1
+PASS indexedDB.cmp(['aa'],['aa']) is 0
+PASS indexedDB.cmp(['b'],['b']) is 0
+PASS indexedDB.cmp(['b'],['ba']) is -1
+PASS indexedDB.cmp(['ba'],['b']) is 1
+PASS indexedDB.cmp(['b'],['b']) is 0
+PASS indexedDB.cmp(['ba'],['ba']) is 0
+PASS indexedDB.cmp(['ba'],['¢']) is -1
+PASS indexedDB.cmp(['¢'],['ba']) is 1
+PASS indexedDB.cmp(['ba'],['ba']) is 0
+PASS indexedDB.cmp(['¢'],['¢']) is 0
+PASS indexedDB.cmp(['¢'],['水']) is -1
+PASS indexedDB.cmp(['水'],['¢']) is 1
+PASS indexedDB.cmp(['¢'],['¢']) is 0
+PASS indexedDB.cmp(['水'],['水']) is 0
+PASS indexedDB.cmp(['水'],['𝄞']) is -1
+PASS indexedDB.cmp(['𝄞'],['水']) is 1
+PASS indexedDB.cmp(['水'],['水']) is 0
+PASS indexedDB.cmp(['𝄞'],['𝄞']) is 0
+PASS indexedDB.cmp(['𝄞'],['�']) is -1
+PASS indexedDB.cmp(['�'],['𝄞']) is 1
+PASS indexedDB.cmp(['𝄞'],['𝄞']) is 0
+PASS indexedDB.cmp(['�'],['�']) is 0
+PASS indexedDB.cmp(['�'],[[]]) is -1
+PASS indexedDB.cmp([[]],['�']) is 1
+PASS indexedDB.cmp(['�'],['�']) is 0
+PASS indexedDB.cmp([[]],[[]]) is 0
+PASS indexedDB.cmp([[]],[[], []]) is -1
+PASS indexedDB.cmp([[], []],[[]]) is 1
+PASS indexedDB.cmp([[]],[[]]) is 0
+PASS indexedDB.cmp([[], []],[[], []]) is 0
+PASS indexedDB.cmp([[], []],[[], [], []]) is -1
+PASS indexedDB.cmp([[], [], []],[[], []]) is 1
+PASS indexedDB.cmp([[], []],[[], []]) is 0
+PASS indexedDB.cmp([[], [], []],[[], [], []]) is 0
+PASS indexedDB.cmp([[], [], []],[[[]]]) is -1
+PASS indexedDB.cmp([[[]]],[[], [], []]) is 1
+PASS indexedDB.cmp([[], [], []],[[], [], []]) is 0
+PASS indexedDB.cmp([[[]]],[[[]]]) is 0
+PASS indexedDB.cmp([[[]]],[[[[]]]]) is -1
+PASS indexedDB.cmp([[[[]]]],[[[]]]) is 1
+PASS indexedDB.cmp([[[]]],[[[]]]) is 0
+PASS indexedDB.cmp([[[[]]]],[[[[]]]]) is 0
+
+compare invalid keys
+Expecting exception from indexedDB.cmp(void 0, true)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(true, void 0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(void 0, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', void 0)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(true, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', true)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(true, false)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(false, true)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(true, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', true)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(false, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', false)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(false, NaN)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(NaN, false)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(false, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', false)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(NaN, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', NaN)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(NaN, new Date(NaN))
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(new Date(NaN), NaN)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(NaN, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', NaN)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(new Date(NaN), 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', new Date(NaN))
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(new Date(NaN), null)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(null, new Date(NaN))
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(new Date(NaN), 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', new Date(NaN))
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(null, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', null)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(null, {})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp({}, null)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(null, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', null)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp({}, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', {})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp({}, function () {})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(function () {}, {})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp({}, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', {})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(function () {}, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', function () {})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(function () {}, /regex/)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(/regex/, function () {})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(function () {}, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', function () {})
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(/regex/, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', /regex/)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(/regex/, self)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(self, /regex/)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(/regex/, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', /regex/)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(self, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', self)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(self, self.document)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(self.document, self)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(self, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', self)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(self.document, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', self.document)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(self.document, self.document.body)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(self.document.body, self.document)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(self.document, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', self.document)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(self.document.body, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', self.document.body)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(self.document.body, new Uint8Array())
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(new Uint8Array(), self.document.body)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(self.document.body, 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', self.document.body)
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(new Uint8Array(), 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', new Uint8Array())
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(new Uint8Array(), new Uint8Array([0]))
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(new Uint8Array([0]), new Uint8Array())
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(new Uint8Array(), 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', new Uint8Array())
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(new Uint8Array([0]), 'valid')
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp('valid', new Uint8Array([0]))
+PASS Exception was thrown.
+PASS code is 0
+PASS ename is 'DataError'
+Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
+Expecting exception from indexedDB.cmp(new Uint8Array([0]), new Uint8Array([0, 0]))
+PASS Exception was thrown.