IndexedDB layout tests: factor out prefix-handling-code
authordgrogan@chromium.org <dgrogan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Mar 2012 21:20:56 +0000 (21:20 +0000)
committerdgrogan@chromium.org <dgrogan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Mar 2012 21:20:56 +0000 (21:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=80664

This makes our tests vendor neutral so that we can load them in any
browser to check what that browser does.

Also changed some instances of 'window' to 'self' so that they are more
worker friendly.

Reviewed by Tony Chang.

* storage/indexeddb/basics-expected.txt:
* storage/indexeddb/basics-shared-workers-expected.txt:
* storage/indexeddb/basics-workers-expected.txt:
* storage/indexeddb/constants-expected.txt:
* storage/indexeddb/constants.html:
* storage/indexeddb/create-and-remove-object-store-expected.txt:
* storage/indexeddb/create-and-remove-object-store.html:
* storage/indexeddb/create-object-store-options-expected.txt:
* storage/indexeddb/create-object-store-options.html:
* storage/indexeddb/createObjectStore-name-argument-required-expected.txt:
* storage/indexeddb/createObjectStore-name-argument-required.html:
* storage/indexeddb/createObjectStore-null-name-expected.txt:
* storage/indexeddb/createObjectStore-null-name.html:
* storage/indexeddb/cursor-continue-expected.txt:
* storage/indexeddb/cursor-continue.html:
* storage/indexeddb/cursor-delete-expected.txt:
* storage/indexeddb/cursor-delete.html:
* storage/indexeddb/cursor-inconsistency-expected.txt:
* storage/indexeddb/cursor-inconsistency.html:
* storage/indexeddb/cursor-index-delete-expected.txt:
* storage/indexeddb/cursor-index-delete.html:
* storage/indexeddb/cursor-key-order-expected.txt:
* storage/indexeddb/cursor-key-order.html:
* storage/indexeddb/cursor-primary-key-order-expected.txt:
* storage/indexeddb/cursor-primary-key-order.html:
* storage/indexeddb/cursor-reverse-bug-expected.txt:
* storage/indexeddb/cursor-reverse-bug.html:
* storage/indexeddb/cursor-skip-deleted-expected.txt:
* storage/indexeddb/cursor-skip-deleted.html:
* storage/indexeddb/cursor-update-expected.txt:
* storage/indexeddb/cursor-update-value-argument-required-expected.txt:
* storage/indexeddb/cursor-update-value-argument-required.html:
* storage/indexeddb/cursor-update.html:
* storage/indexeddb/data-corruption-expected.txt:
* storage/indexeddb/data-corruption.html:
* storage/indexeddb/database-basics-expected.txt:
* storage/indexeddb/database-basics.html:
* storage/indexeddb/database-name-undefined-expected.txt:
* storage/indexeddb/database-name-undefined.html:
* storage/indexeddb/database-odd-names-expected.txt:
* storage/indexeddb/database-odd-names.html:
* storage/indexeddb/database-quota-expected.txt:
* storage/indexeddb/database-quota.html:
* storage/indexeddb/delete-closed-database-object-expected.txt:
* storage/indexeddb/delete-closed-database-object.html:
* storage/indexeddb/delete-range-expected.txt:
* storage/indexeddb/delete-range.html:
* storage/indexeddb/deleteIndex-expected.txt:
* storage/indexeddb/deleteIndex.html:
* storage/indexeddb/deleteObjectStore-name-argument-required-expected.txt:
* storage/indexeddb/deleteObjectStore-name-argument-required.html:
* storage/indexeddb/deleteObjectStore-null-name-expected.txt:
* storage/indexeddb/deleteObjectStore-null-name.html:
* storage/indexeddb/duplicates-expected.txt:
* storage/indexeddb/duplicates.html:
* storage/indexeddb/error-causes-abort-by-default-expected.txt:
* storage/indexeddb/error-causes-abort-by-default.html:
* storage/indexeddb/exception-in-event-aborts-expected.txt:
* storage/indexeddb/exception-in-event-aborts.html:
* storage/indexeddb/factory-basics-expected.txt:
* storage/indexeddb/factory-basics.html:
* storage/indexeddb/factory-cmp-expected.txt:
* storage/indexeddb/factory-cmp.html:
* storage/indexeddb/factory-deletedatabase-expected.txt:
* storage/indexeddb/factory-deletedatabase-interactions-expected.txt:
* storage/indexeddb/factory-deletedatabase-interactions.html:
* storage/indexeddb/factory-deletedatabase.html:
* storage/indexeddb/index-basics-expected.txt:
* storage/indexeddb/index-basics-workers-expected.txt:
* storage/indexeddb/index-count-expected.txt:
* storage/indexeddb/index-count.html:
* storage/indexeddb/index-cursor-expected.txt:
* storage/indexeddb/index-cursor.html:
* storage/indexeddb/index-get-key-argument-required-expected.txt:
* storage/indexeddb/index-get-key-argument-required.html:
* storage/indexeddb/index-multientry-expected.txt:
* storage/indexeddb/index-multientry.html:
* storage/indexeddb/index-population-expected.txt:
* storage/indexeddb/index-population.html:
* storage/indexeddb/index-unique-expected.txt:
* storage/indexeddb/index-unique.html:
* storage/indexeddb/invalid-keys-expected.txt:
* storage/indexeddb/invalid-keys.html:
* storage/indexeddb/key-generator-expected.txt:
* storage/indexeddb/key-generator.html:
* storage/indexeddb/key-sort-order-across-types-expected.txt:
* storage/indexeddb/key-sort-order-across-types.html:
* storage/indexeddb/key-sort-order-date-expected.txt:
* storage/indexeddb/key-sort-order-date.html:
* storage/indexeddb/key-type-array-expected.txt:
* storage/indexeddb/key-type-array.html:
* storage/indexeddb/key-type-infinity-expected.txt:
* storage/indexeddb/key-type-infinity.html:
* storage/indexeddb/keypath-basics-expected.txt:
* storage/indexeddb/keypath-basics.html:
* storage/indexeddb/keypath-edges-expected.txt:
* storage/indexeddb/keypath-edges.html:
* storage/indexeddb/keypath-fetch-key-expected.txt:
* storage/indexeddb/keypath-fetch-key.html:
* storage/indexeddb/keyrange-expected.txt:
* storage/indexeddb/keyrange-required-arguments-expected.txt:
* storage/indexeddb/keyrange-required-arguments.html:
* storage/indexeddb/keyrange.html:
* storage/indexeddb/list-ordering-expected.txt:
* storage/indexeddb/list-ordering.html:
* storage/indexeddb/mozilla/add-twice-failure-expected.txt:
* storage/indexeddb/mozilla/add-twice-failure.html:
* storage/indexeddb/mozilla/autoincrement-indexes-expected.txt:
* storage/indexeddb/mozilla/autoincrement-indexes.html:
* storage/indexeddb/mozilla/bad-keypath-expected.txt:
* storage/indexeddb/mozilla/bad-keypath.html:
* storage/indexeddb/mozilla/clear-expected.txt:
* storage/indexeddb/mozilla/clear.html:
* storage/indexeddb/mozilla/create-index-unique-expected.txt:
* storage/indexeddb/mozilla/create-index-unique.html:
* storage/indexeddb/mozilla/create-index-with-integer-keys-expected.txt:
* storage/indexeddb/mozilla/create-index-with-integer-keys.html:
* storage/indexeddb/mozilla/create-objectstore-basics-expected.txt:
* storage/indexeddb/mozilla/create-objectstore-basics.html:
* storage/indexeddb/mozilla/create-objectstore-null-name-expected.txt:
* storage/indexeddb/mozilla/create-objectstore-null-name.html:
* storage/indexeddb/mozilla/cursor-mutation-expected.txt:
* storage/indexeddb/mozilla/cursor-mutation-objectstore-only-expected.txt:
* storage/indexeddb/mozilla/cursor-mutation-objectstore-only.html:
* storage/indexeddb/mozilla/cursor-mutation.html:
* storage/indexeddb/mozilla/cursor-update-updates-indexes-expected.txt:
* storage/indexeddb/mozilla/cursor-update-updates-indexes.html:
* storage/indexeddb/mozilla/cursors-expected.txt:
* storage/indexeddb/mozilla/cursors.html:
* storage/indexeddb/mozilla/delete-result-expected.txt:
* storage/indexeddb/mozilla/delete-result.html:
* storage/indexeddb/mozilla/event-source-expected.txt:
* storage/indexeddb/mozilla/event-source.html:
* storage/indexeddb/mozilla/global-data-expected.txt:
* storage/indexeddb/mozilla/global-data.html:
* storage/indexeddb/mozilla/indexes-expected.txt:
* storage/indexeddb/mozilla/indexes.html:
* storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt:
* storage/indexeddb/mozilla/key-requirements-delete-null-key.html:
* storage/indexeddb/mozilla/key-requirements-expected.txt:
* storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt:
* storage/indexeddb/mozilla/key-requirements-inline-and-passed.html:
* storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt:
* storage/indexeddb/mozilla/key-requirements-put-no-key.html:
* storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt:
* storage/indexeddb/mozilla/key-requirements-put-null-key.html:
* storage/indexeddb/mozilla/key-requirements.html:
* storage/indexeddb/mozilla/object-cursors-expected.txt:
* storage/indexeddb/mozilla/object-cursors.html:
* storage/indexeddb/mozilla/object-identity-expected.txt:
* storage/indexeddb/mozilla/object-identity.html:
* storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put-expected.txt:
* storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put.html:
* storage/indexeddb/mozilla/object-store-remove-values-expected.txt:
* storage/indexeddb/mozilla/object-store-remove-values.html:
* storage/indexeddb/mozilla/objectstorenames-expected.txt:
* storage/indexeddb/mozilla/objectstorenames.html:
* storage/indexeddb/mozilla/odd-result-order-expected.txt:
* storage/indexeddb/mozilla/odd-result-order.html:
* storage/indexeddb/mozilla/open-database-null-name-expected.txt:
* storage/indexeddb/mozilla/open-database-null-name.html:
* storage/indexeddb/mozilla/put-get-values-expected.txt:
* storage/indexeddb/mozilla/put-get-values.html:
* storage/indexeddb/mozilla/readonly-transactions-expected.txt:
* storage/indexeddb/mozilla/readonly-transactions.html:
* storage/indexeddb/mozilla/readwrite-transactions-expected.txt:
* storage/indexeddb/mozilla/readwrite-transactions.html:
* storage/indexeddb/mozilla/readyState-expected.txt:
* storage/indexeddb/mozilla/readyState.html:
* storage/indexeddb/mozilla/remove-index-expected.txt:
* storage/indexeddb/mozilla/remove-index.html:
* storage/indexeddb/mozilla/remove-objectstore-expected.txt:
* storage/indexeddb/mozilla/remove-objectstore.html:
* storage/indexeddb/mozilla/versionchange-abort-expected.txt:
* storage/indexeddb/mozilla/versionchange-abort.html:
* storage/indexeddb/mozilla/versionchange-expected.txt:
* storage/indexeddb/mozilla/versionchange.html:
* storage/indexeddb/mutating-cursor-expected.txt:
* storage/indexeddb/mutating-cursor.html:
* storage/indexeddb/objectStore-required-arguments-expected.txt:
* storage/indexeddb/objectStore-required-arguments.html:
* storage/indexeddb/objectstore-autoincrement-expected.txt:
* storage/indexeddb/objectstore-autoincrement.html:
* storage/indexeddb/objectstore-basics-expected.txt:
* storage/indexeddb/objectstore-basics-workers-expected.txt:
* storage/indexeddb/objectstore-clear-expected.txt:
* storage/indexeddb/objectstore-clear.html:
* storage/indexeddb/objectstore-count-expected.txt:
* storage/indexeddb/objectstore-count.html:
* storage/indexeddb/objectstore-cursor-expected.txt:
* storage/indexeddb/objectstore-cursor.html:
* storage/indexeddb/objectstore-removeobjectstore-expected.txt:
* storage/indexeddb/objectstore-removeobjectstore.html:
* storage/indexeddb/odd-strings-expected.txt:
* storage/indexeddb/odd-strings.html:
* storage/indexeddb/open-close-version-expected.txt:
* storage/indexeddb/open-close-version.html:
* storage/indexeddb/open-cursor-expected.txt:
* storage/indexeddb/open-cursor.html:
* storage/indexeddb/open-during-transaction-expected.txt:
* storage/indexeddb/open-during-transaction.html:
* storage/indexeddb/prefetch-bugfix-108071-expected.txt:
* storage/indexeddb/prefetch-bugfix-108071.html:
* storage/indexeddb/queued-commands-expected.txt:
* storage/indexeddb/queued-commands.html:
* storage/indexeddb/readonly-expected.txt:
* storage/indexeddb/readonly-properties-expected.txt:
* storage/indexeddb/readonly-properties.html:
* storage/indexeddb/readonly.html:
* storage/indexeddb/request-event-propagation-expected.txt:
* storage/indexeddb/request-event-propagation.html:
* storage/indexeddb/resources/basics.js:
(test):
(openCallback):
* storage/indexeddb/resources/index-basics.js:
(test):
* storage/indexeddb/resources/objectstore-basics.js:
(test):
(setVersionSuccess):
(createIndex):
(addData):
(addAgainFailure):
(removeSuccessButNotThere):
(testPreConditions.request.onsuccess):
(testPreConditions):
* storage/indexeddb/resources/shared.js:
(removeVendorPrefixes):
* storage/indexeddb/resources/transaction-abort-workers.js:
(transactionAborted):
(transactionCompleted):
(timeoutTest.transaction.onabort):
(timeoutTest):
(errorTransactionAborted):
* storage/indexeddb/setVersion-null-expected.txt:
* storage/indexeddb/setVersion-null.html:
* storage/indexeddb/setVersion-undefined-expected.txt:
* storage/indexeddb/setVersion-undefined.html:
* storage/indexeddb/set_version_blocked-expected.txt:
* storage/indexeddb/set_version_blocked.html:
* storage/indexeddb/set_version_queue-expected.txt:
* storage/indexeddb/set_version_queue.html:
* storage/indexeddb/structured-clone-expected.txt:
* storage/indexeddb/structured-clone.html:
* storage/indexeddb/transaction-abort-expected.txt:
* storage/indexeddb/transaction-abort-with-js-recursion-cross-frame-expected.txt:
* storage/indexeddb/transaction-abort-with-js-recursion-cross-frame.html:
* storage/indexeddb/transaction-abort-with-js-recursion-expected.txt:
* storage/indexeddb/transaction-abort-with-js-recursion.html:
* storage/indexeddb/transaction-abort-workers-expected.txt:
* storage/indexeddb/transaction-abort.html:
* storage/indexeddb/transaction-after-close-expected.txt:
* storage/indexeddb/transaction-after-close.html:
* storage/indexeddb/transaction-and-objectstore-calls-expected.txt:
* storage/indexeddb/transaction-and-objectstore-calls.html:
* storage/indexeddb/transaction-basics-expected.txt:
* storage/indexeddb/transaction-basics.html:
* storage/indexeddb/transaction-crash-on-abort-expected.txt:
* storage/indexeddb/transaction-crash-on-abort.html:
* storage/indexeddb/transaction-event-propagation-expected.txt:
* storage/indexeddb/transaction-event-propagation.html:
* storage/indexeddb/transaction-read-only-expected.txt:
* storage/indexeddb/transaction-read-only.html:
* storage/indexeddb/transaction-rollback-expected.txt:
* storage/indexeddb/transaction-rollback.html:
* storage/indexeddb/transaction-storeNames-required-expected.txt:
* storage/indexeddb/transaction-storeNames-required.html:
* storage/indexeddb/two-version-changes-expected.txt:
* storage/indexeddb/two-version-changes.html:
* storage/indexeddb/value-undefined-expected.txt:
* storage/indexeddb/value-undefined.html:
* storage/indexeddb/values-odd-types-expected.txt:
* storage/indexeddb/values-odd-types.html:
* storage/indexeddb/version-change-abort-expected.txt:
* storage/indexeddb/version-change-abort.html:
* storage/indexeddb/version-change-exclusive-expected.txt:
* storage/indexeddb/version-change-exclusive.html:
* storage/indexeddb/versionchangerequest-activedomobject-expected.txt:
* storage/indexeddb/versionchangerequest-activedomobject.html:

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

262 files changed:
LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/basics-expected.txt
LayoutTests/storage/indexeddb/basics-shared-workers-expected.txt
LayoutTests/storage/indexeddb/basics-workers-expected.txt
LayoutTests/storage/indexeddb/constants-expected.txt
LayoutTests/storage/indexeddb/constants.html
LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt
LayoutTests/storage/indexeddb/create-and-remove-object-store.html
LayoutTests/storage/indexeddb/create-object-store-options-expected.txt
LayoutTests/storage/indexeddb/create-object-store-options.html
LayoutTests/storage/indexeddb/createObjectStore-name-argument-required-expected.txt
LayoutTests/storage/indexeddb/createObjectStore-name-argument-required.html
LayoutTests/storage/indexeddb/createObjectStore-null-name-expected.txt
LayoutTests/storage/indexeddb/createObjectStore-null-name.html
LayoutTests/storage/indexeddb/cursor-continue-expected.txt
LayoutTests/storage/indexeddb/cursor-continue.html
LayoutTests/storage/indexeddb/cursor-delete-expected.txt
LayoutTests/storage/indexeddb/cursor-delete.html
LayoutTests/storage/indexeddb/cursor-inconsistency-expected.txt
LayoutTests/storage/indexeddb/cursor-inconsistency.html
LayoutTests/storage/indexeddb/cursor-index-delete-expected.txt
LayoutTests/storage/indexeddb/cursor-index-delete.html
LayoutTests/storage/indexeddb/cursor-key-order-expected.txt
LayoutTests/storage/indexeddb/cursor-key-order.html
LayoutTests/storage/indexeddb/cursor-primary-key-order-expected.txt
LayoutTests/storage/indexeddb/cursor-primary-key-order.html
LayoutTests/storage/indexeddb/cursor-reverse-bug-expected.txt
LayoutTests/storage/indexeddb/cursor-reverse-bug.html
LayoutTests/storage/indexeddb/cursor-skip-deleted-expected.txt
LayoutTests/storage/indexeddb/cursor-skip-deleted.html
LayoutTests/storage/indexeddb/cursor-update-expected.txt
LayoutTests/storage/indexeddb/cursor-update-value-argument-required-expected.txt
LayoutTests/storage/indexeddb/cursor-update-value-argument-required.html
LayoutTests/storage/indexeddb/cursor-update.html
LayoutTests/storage/indexeddb/data-corruption-expected.txt
LayoutTests/storage/indexeddb/data-corruption.html
LayoutTests/storage/indexeddb/database-basics-expected.txt
LayoutTests/storage/indexeddb/database-basics.html
LayoutTests/storage/indexeddb/database-name-undefined-expected.txt
LayoutTests/storage/indexeddb/database-name-undefined.html
LayoutTests/storage/indexeddb/database-odd-names-expected.txt
LayoutTests/storage/indexeddb/database-odd-names.html
LayoutTests/storage/indexeddb/database-quota-expected.txt
LayoutTests/storage/indexeddb/database-quota.html
LayoutTests/storage/indexeddb/delete-closed-database-object-expected.txt
LayoutTests/storage/indexeddb/delete-closed-database-object.html
LayoutTests/storage/indexeddb/delete-range-expected.txt
LayoutTests/storage/indexeddb/delete-range.html
LayoutTests/storage/indexeddb/deleteIndex-expected.txt
LayoutTests/storage/indexeddb/deleteIndex.html
LayoutTests/storage/indexeddb/deleteObjectStore-name-argument-required-expected.txt
LayoutTests/storage/indexeddb/deleteObjectStore-name-argument-required.html
LayoutTests/storage/indexeddb/deleteObjectStore-null-name-expected.txt
LayoutTests/storage/indexeddb/deleteObjectStore-null-name.html
LayoutTests/storage/indexeddb/duplicates-expected.txt
LayoutTests/storage/indexeddb/duplicates.html
LayoutTests/storage/indexeddb/error-causes-abort-by-default-expected.txt
LayoutTests/storage/indexeddb/error-causes-abort-by-default.html
LayoutTests/storage/indexeddb/exception-in-event-aborts-expected.txt
LayoutTests/storage/indexeddb/exception-in-event-aborts.html
LayoutTests/storage/indexeddb/factory-basics-expected.txt
LayoutTests/storage/indexeddb/factory-basics.html
LayoutTests/storage/indexeddb/factory-cmp-expected.txt
LayoutTests/storage/indexeddb/factory-cmp.html
LayoutTests/storage/indexeddb/factory-deletedatabase-expected.txt
LayoutTests/storage/indexeddb/factory-deletedatabase-interactions-expected.txt
LayoutTests/storage/indexeddb/factory-deletedatabase-interactions.html
LayoutTests/storage/indexeddb/factory-deletedatabase.html
LayoutTests/storage/indexeddb/index-basics-expected.txt
LayoutTests/storage/indexeddb/index-basics-workers-expected.txt
LayoutTests/storage/indexeddb/index-count-expected.txt
LayoutTests/storage/indexeddb/index-count.html
LayoutTests/storage/indexeddb/index-cursor-expected.txt
LayoutTests/storage/indexeddb/index-cursor.html
LayoutTests/storage/indexeddb/index-get-key-argument-required-expected.txt
LayoutTests/storage/indexeddb/index-get-key-argument-required.html
LayoutTests/storage/indexeddb/index-multientry-expected.txt
LayoutTests/storage/indexeddb/index-multientry.html
LayoutTests/storage/indexeddb/index-population-expected.txt
LayoutTests/storage/indexeddb/index-population.html
LayoutTests/storage/indexeddb/index-unique-expected.txt
LayoutTests/storage/indexeddb/index-unique.html
LayoutTests/storage/indexeddb/invalid-keys-expected.txt
LayoutTests/storage/indexeddb/invalid-keys.html
LayoutTests/storage/indexeddb/key-generator-expected.txt
LayoutTests/storage/indexeddb/key-generator.html
LayoutTests/storage/indexeddb/key-sort-order-across-types-expected.txt
LayoutTests/storage/indexeddb/key-sort-order-across-types.html
LayoutTests/storage/indexeddb/key-sort-order-date-expected.txt
LayoutTests/storage/indexeddb/key-sort-order-date.html
LayoutTests/storage/indexeddb/key-type-array-expected.txt
LayoutTests/storage/indexeddb/key-type-array.html
LayoutTests/storage/indexeddb/key-type-infinity-expected.txt
LayoutTests/storage/indexeddb/key-type-infinity.html
LayoutTests/storage/indexeddb/keypath-basics-expected.txt
LayoutTests/storage/indexeddb/keypath-basics.html
LayoutTests/storage/indexeddb/keypath-edges-expected.txt
LayoutTests/storage/indexeddb/keypath-edges.html
LayoutTests/storage/indexeddb/keypath-fetch-key-expected.txt
LayoutTests/storage/indexeddb/keypath-fetch-key.html
LayoutTests/storage/indexeddb/keyrange-expected.txt
LayoutTests/storage/indexeddb/keyrange-required-arguments-expected.txt
LayoutTests/storage/indexeddb/keyrange-required-arguments.html
LayoutTests/storage/indexeddb/keyrange.html
LayoutTests/storage/indexeddb/list-ordering-expected.txt
LayoutTests/storage/indexeddb/list-ordering.html
LayoutTests/storage/indexeddb/mozilla/add-twice-failure-expected.txt
LayoutTests/storage/indexeddb/mozilla/add-twice-failure.html
LayoutTests/storage/indexeddb/mozilla/autoincrement-indexes-expected.txt
LayoutTests/storage/indexeddb/mozilla/autoincrement-indexes.html
LayoutTests/storage/indexeddb/mozilla/bad-keypath-expected.txt
LayoutTests/storage/indexeddb/mozilla/bad-keypath.html
LayoutTests/storage/indexeddb/mozilla/clear-expected.txt
LayoutTests/storage/indexeddb/mozilla/clear.html
LayoutTests/storage/indexeddb/mozilla/create-index-unique-expected.txt
LayoutTests/storage/indexeddb/mozilla/create-index-unique.html
LayoutTests/storage/indexeddb/mozilla/create-index-with-integer-keys-expected.txt
LayoutTests/storage/indexeddb/mozilla/create-index-with-integer-keys.html
LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt
LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics.html
LayoutTests/storage/indexeddb/mozilla/create-objectstore-null-name-expected.txt
LayoutTests/storage/indexeddb/mozilla/create-objectstore-null-name.html
LayoutTests/storage/indexeddb/mozilla/cursor-mutation-expected.txt
LayoutTests/storage/indexeddb/mozilla/cursor-mutation-objectstore-only-expected.txt
LayoutTests/storage/indexeddb/mozilla/cursor-mutation-objectstore-only.html
LayoutTests/storage/indexeddb/mozilla/cursor-mutation.html
LayoutTests/storage/indexeddb/mozilla/cursor-update-updates-indexes-expected.txt
LayoutTests/storage/indexeddb/mozilla/cursor-update-updates-indexes.html
LayoutTests/storage/indexeddb/mozilla/cursors-expected.txt
LayoutTests/storage/indexeddb/mozilla/cursors.html
LayoutTests/storage/indexeddb/mozilla/delete-result-expected.txt
LayoutTests/storage/indexeddb/mozilla/delete-result.html
LayoutTests/storage/indexeddb/mozilla/event-source-expected.txt
LayoutTests/storage/indexeddb/mozilla/event-source.html
LayoutTests/storage/indexeddb/mozilla/global-data-expected.txt
LayoutTests/storage/indexeddb/mozilla/global-data.html
LayoutTests/storage/indexeddb/mozilla/indexes-expected.txt
LayoutTests/storage/indexeddb/mozilla/indexes.html
LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt
LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key.html
LayoutTests/storage/indexeddb/mozilla/key-requirements-expected.txt
LayoutTests/storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt
LayoutTests/storage/indexeddb/mozilla/key-requirements-inline-and-passed.html
LayoutTests/storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt
LayoutTests/storage/indexeddb/mozilla/key-requirements-put-no-key.html
LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt
LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-key.html
LayoutTests/storage/indexeddb/mozilla/key-requirements.html
LayoutTests/storage/indexeddb/mozilla/object-cursors-expected.txt
LayoutTests/storage/indexeddb/mozilla/object-cursors.html
LayoutTests/storage/indexeddb/mozilla/object-identity-expected.txt
LayoutTests/storage/indexeddb/mozilla/object-identity.html
LayoutTests/storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put-expected.txt
LayoutTests/storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put.html
LayoutTests/storage/indexeddb/mozilla/object-store-remove-values-expected.txt
LayoutTests/storage/indexeddb/mozilla/object-store-remove-values.html
LayoutTests/storage/indexeddb/mozilla/objectstorenames-expected.txt
LayoutTests/storage/indexeddb/mozilla/objectstorenames.html
LayoutTests/storage/indexeddb/mozilla/odd-result-order-expected.txt
LayoutTests/storage/indexeddb/mozilla/odd-result-order.html
LayoutTests/storage/indexeddb/mozilla/open-database-null-name-expected.txt
LayoutTests/storage/indexeddb/mozilla/open-database-null-name.html
LayoutTests/storage/indexeddb/mozilla/put-get-values-expected.txt
LayoutTests/storage/indexeddb/mozilla/put-get-values.html
LayoutTests/storage/indexeddb/mozilla/readonly-transactions-expected.txt
LayoutTests/storage/indexeddb/mozilla/readonly-transactions.html
LayoutTests/storage/indexeddb/mozilla/readwrite-transactions-expected.txt
LayoutTests/storage/indexeddb/mozilla/readwrite-transactions.html
LayoutTests/storage/indexeddb/mozilla/readyState-expected.txt
LayoutTests/storage/indexeddb/mozilla/readyState.html
LayoutTests/storage/indexeddb/mozilla/remove-index-expected.txt
LayoutTests/storage/indexeddb/mozilla/remove-index.html
LayoutTests/storage/indexeddb/mozilla/remove-objectstore-expected.txt
LayoutTests/storage/indexeddb/mozilla/remove-objectstore.html
LayoutTests/storage/indexeddb/mozilla/versionchange-abort-expected.txt
LayoutTests/storage/indexeddb/mozilla/versionchange-abort.html
LayoutTests/storage/indexeddb/mozilla/versionchange-expected.txt
LayoutTests/storage/indexeddb/mozilla/versionchange.html
LayoutTests/storage/indexeddb/mutating-cursor-expected.txt
LayoutTests/storage/indexeddb/mutating-cursor.html
LayoutTests/storage/indexeddb/objectStore-required-arguments-expected.txt
LayoutTests/storage/indexeddb/objectStore-required-arguments.html
LayoutTests/storage/indexeddb/objectstore-autoincrement-expected.txt
LayoutTests/storage/indexeddb/objectstore-autoincrement.html
LayoutTests/storage/indexeddb/objectstore-basics-expected.txt
LayoutTests/storage/indexeddb/objectstore-basics-workers-expected.txt
LayoutTests/storage/indexeddb/objectstore-clear-expected.txt
LayoutTests/storage/indexeddb/objectstore-clear.html
LayoutTests/storage/indexeddb/objectstore-count-expected.txt
LayoutTests/storage/indexeddb/objectstore-count.html
LayoutTests/storage/indexeddb/objectstore-cursor-expected.txt
LayoutTests/storage/indexeddb/objectstore-cursor.html
LayoutTests/storage/indexeddb/objectstore-removeobjectstore-expected.txt
LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html
LayoutTests/storage/indexeddb/odd-strings-expected.txt
LayoutTests/storage/indexeddb/odd-strings.html
LayoutTests/storage/indexeddb/open-close-version-expected.txt
LayoutTests/storage/indexeddb/open-close-version.html
LayoutTests/storage/indexeddb/open-cursor-expected.txt
LayoutTests/storage/indexeddb/open-cursor.html
LayoutTests/storage/indexeddb/open-during-transaction-expected.txt
LayoutTests/storage/indexeddb/open-during-transaction.html
LayoutTests/storage/indexeddb/prefetch-bugfix-108071-expected.txt
LayoutTests/storage/indexeddb/prefetch-bugfix-108071.html
LayoutTests/storage/indexeddb/queued-commands-expected.txt
LayoutTests/storage/indexeddb/queued-commands.html
LayoutTests/storage/indexeddb/readonly-expected.txt
LayoutTests/storage/indexeddb/readonly-properties-expected.txt
LayoutTests/storage/indexeddb/readonly-properties.html
LayoutTests/storage/indexeddb/readonly.html
LayoutTests/storage/indexeddb/request-event-propagation-expected.txt
LayoutTests/storage/indexeddb/request-event-propagation.html
LayoutTests/storage/indexeddb/resources/basics.js
LayoutTests/storage/indexeddb/resources/index-basics.js
LayoutTests/storage/indexeddb/resources/objectstore-basics.js
LayoutTests/storage/indexeddb/resources/shared.js
LayoutTests/storage/indexeddb/resources/transaction-abort-workers.js
LayoutTests/storage/indexeddb/setVersion-null-expected.txt
LayoutTests/storage/indexeddb/setVersion-null.html
LayoutTests/storage/indexeddb/setVersion-undefined-expected.txt
LayoutTests/storage/indexeddb/setVersion-undefined.html
LayoutTests/storage/indexeddb/set_version_blocked-expected.txt
LayoutTests/storage/indexeddb/set_version_blocked.html
LayoutTests/storage/indexeddb/set_version_queue-expected.txt
LayoutTests/storage/indexeddb/set_version_queue.html
LayoutTests/storage/indexeddb/structured-clone-expected.txt
LayoutTests/storage/indexeddb/structured-clone.html
LayoutTests/storage/indexeddb/transaction-abort-expected.txt
LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion-cross-frame-expected.txt
LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion-cross-frame.html
LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion-expected.txt
LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion.html
LayoutTests/storage/indexeddb/transaction-abort-workers-expected.txt
LayoutTests/storage/indexeddb/transaction-abort.html
LayoutTests/storage/indexeddb/transaction-after-close-expected.txt
LayoutTests/storage/indexeddb/transaction-after-close.html
LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt
LayoutTests/storage/indexeddb/transaction-and-objectstore-calls.html
LayoutTests/storage/indexeddb/transaction-basics-expected.txt
LayoutTests/storage/indexeddb/transaction-basics.html
LayoutTests/storage/indexeddb/transaction-crash-on-abort-expected.txt
LayoutTests/storage/indexeddb/transaction-crash-on-abort.html
LayoutTests/storage/indexeddb/transaction-event-propagation-expected.txt
LayoutTests/storage/indexeddb/transaction-event-propagation.html
LayoutTests/storage/indexeddb/transaction-read-only-expected.txt
LayoutTests/storage/indexeddb/transaction-read-only.html
LayoutTests/storage/indexeddb/transaction-rollback-expected.txt
LayoutTests/storage/indexeddb/transaction-rollback.html
LayoutTests/storage/indexeddb/transaction-storeNames-required-expected.txt
LayoutTests/storage/indexeddb/transaction-storeNames-required.html
LayoutTests/storage/indexeddb/two-version-changes-expected.txt
LayoutTests/storage/indexeddb/two-version-changes.html
LayoutTests/storage/indexeddb/value-undefined-expected.txt
LayoutTests/storage/indexeddb/value-undefined.html
LayoutTests/storage/indexeddb/values-odd-types-expected.txt
LayoutTests/storage/indexeddb/values-odd-types.html
LayoutTests/storage/indexeddb/version-change-abort-expected.txt
LayoutTests/storage/indexeddb/version-change-abort.html
LayoutTests/storage/indexeddb/version-change-exclusive-expected.txt
LayoutTests/storage/indexeddb/version-change-exclusive.html
LayoutTests/storage/indexeddb/versionchangerequest-activedomobject-expected.txt
LayoutTests/storage/indexeddb/versionchangerequest-activedomobject.html

index 3df1fd6..ed8f5c6 100644 (file)
@@ -1,3 +1,295 @@
+2012-03-14  David Grogan  <dgrogan@chromium.org>
+
+        IndexedDB layout tests: factor out prefix-handling-code
+        https://bugs.webkit.org/show_bug.cgi?id=80664
+
+        This makes our tests vendor neutral so that we can load them in any
+        browser to check what that browser does.
+
+        Also changed some instances of 'window' to 'self' so that they are more
+        worker friendly.
+
+        Reviewed by Tony Chang.
+
+        * storage/indexeddb/basics-expected.txt:
+        * storage/indexeddb/basics-shared-workers-expected.txt:
+        * storage/indexeddb/basics-workers-expected.txt:
+        * storage/indexeddb/constants-expected.txt:
+        * storage/indexeddb/constants.html:
+        * storage/indexeddb/create-and-remove-object-store-expected.txt:
+        * storage/indexeddb/create-and-remove-object-store.html:
+        * storage/indexeddb/create-object-store-options-expected.txt:
+        * storage/indexeddb/create-object-store-options.html:
+        * storage/indexeddb/createObjectStore-name-argument-required-expected.txt:
+        * storage/indexeddb/createObjectStore-name-argument-required.html:
+        * storage/indexeddb/createObjectStore-null-name-expected.txt:
+        * storage/indexeddb/createObjectStore-null-name.html:
+        * storage/indexeddb/cursor-continue-expected.txt:
+        * storage/indexeddb/cursor-continue.html:
+        * storage/indexeddb/cursor-delete-expected.txt:
+        * storage/indexeddb/cursor-delete.html:
+        * storage/indexeddb/cursor-inconsistency-expected.txt:
+        * storage/indexeddb/cursor-inconsistency.html:
+        * storage/indexeddb/cursor-index-delete-expected.txt:
+        * storage/indexeddb/cursor-index-delete.html:
+        * storage/indexeddb/cursor-key-order-expected.txt:
+        * storage/indexeddb/cursor-key-order.html:
+        * storage/indexeddb/cursor-primary-key-order-expected.txt:
+        * storage/indexeddb/cursor-primary-key-order.html:
+        * storage/indexeddb/cursor-reverse-bug-expected.txt:
+        * storage/indexeddb/cursor-reverse-bug.html:
+        * storage/indexeddb/cursor-skip-deleted-expected.txt:
+        * storage/indexeddb/cursor-skip-deleted.html:
+        * storage/indexeddb/cursor-update-expected.txt:
+        * storage/indexeddb/cursor-update-value-argument-required-expected.txt:
+        * storage/indexeddb/cursor-update-value-argument-required.html:
+        * storage/indexeddb/cursor-update.html:
+        * storage/indexeddb/data-corruption-expected.txt:
+        * storage/indexeddb/data-corruption.html:
+        * storage/indexeddb/database-basics-expected.txt:
+        * storage/indexeddb/database-basics.html:
+        * storage/indexeddb/database-name-undefined-expected.txt:
+        * storage/indexeddb/database-name-undefined.html:
+        * storage/indexeddb/database-odd-names-expected.txt:
+        * storage/indexeddb/database-odd-names.html:
+        * storage/indexeddb/database-quota-expected.txt:
+        * storage/indexeddb/database-quota.html:
+        * storage/indexeddb/delete-closed-database-object-expected.txt:
+        * storage/indexeddb/delete-closed-database-object.html:
+        * storage/indexeddb/delete-range-expected.txt:
+        * storage/indexeddb/delete-range.html:
+        * storage/indexeddb/deleteIndex-expected.txt:
+        * storage/indexeddb/deleteIndex.html:
+        * storage/indexeddb/deleteObjectStore-name-argument-required-expected.txt:
+        * storage/indexeddb/deleteObjectStore-name-argument-required.html:
+        * storage/indexeddb/deleteObjectStore-null-name-expected.txt:
+        * storage/indexeddb/deleteObjectStore-null-name.html:
+        * storage/indexeddb/duplicates-expected.txt:
+        * storage/indexeddb/duplicates.html:
+        * storage/indexeddb/error-causes-abort-by-default-expected.txt:
+        * storage/indexeddb/error-causes-abort-by-default.html:
+        * storage/indexeddb/exception-in-event-aborts-expected.txt:
+        * storage/indexeddb/exception-in-event-aborts.html:
+        * storage/indexeddb/factory-basics-expected.txt:
+        * storage/indexeddb/factory-basics.html:
+        * storage/indexeddb/factory-cmp-expected.txt:
+        * storage/indexeddb/factory-cmp.html:
+        * storage/indexeddb/factory-deletedatabase-expected.txt:
+        * storage/indexeddb/factory-deletedatabase-interactions-expected.txt:
+        * storage/indexeddb/factory-deletedatabase-interactions.html:
+        * storage/indexeddb/factory-deletedatabase.html:
+        * storage/indexeddb/index-basics-expected.txt:
+        * storage/indexeddb/index-basics-workers-expected.txt:
+        * storage/indexeddb/index-count-expected.txt:
+        * storage/indexeddb/index-count.html:
+        * storage/indexeddb/index-cursor-expected.txt:
+        * storage/indexeddb/index-cursor.html:
+        * storage/indexeddb/index-get-key-argument-required-expected.txt:
+        * storage/indexeddb/index-get-key-argument-required.html:
+        * storage/indexeddb/index-multientry-expected.txt:
+        * storage/indexeddb/index-multientry.html:
+        * storage/indexeddb/index-population-expected.txt:
+        * storage/indexeddb/index-population.html:
+        * storage/indexeddb/index-unique-expected.txt:
+        * storage/indexeddb/index-unique.html:
+        * storage/indexeddb/invalid-keys-expected.txt:
+        * storage/indexeddb/invalid-keys.html:
+        * storage/indexeddb/key-generator-expected.txt:
+        * storage/indexeddb/key-generator.html:
+        * storage/indexeddb/key-sort-order-across-types-expected.txt:
+        * storage/indexeddb/key-sort-order-across-types.html:
+        * storage/indexeddb/key-sort-order-date-expected.txt:
+        * storage/indexeddb/key-sort-order-date.html:
+        * storage/indexeddb/key-type-array-expected.txt:
+        * storage/indexeddb/key-type-array.html:
+        * storage/indexeddb/key-type-infinity-expected.txt:
+        * storage/indexeddb/key-type-infinity.html:
+        * storage/indexeddb/keypath-basics-expected.txt:
+        * storage/indexeddb/keypath-basics.html:
+        * storage/indexeddb/keypath-edges-expected.txt:
+        * storage/indexeddb/keypath-edges.html:
+        * storage/indexeddb/keypath-fetch-key-expected.txt:
+        * storage/indexeddb/keypath-fetch-key.html:
+        * storage/indexeddb/keyrange-expected.txt:
+        * storage/indexeddb/keyrange-required-arguments-expected.txt:
+        * storage/indexeddb/keyrange-required-arguments.html:
+        * storage/indexeddb/keyrange.html:
+        * storage/indexeddb/list-ordering-expected.txt:
+        * storage/indexeddb/list-ordering.html:
+        * storage/indexeddb/mozilla/add-twice-failure-expected.txt:
+        * storage/indexeddb/mozilla/add-twice-failure.html:
+        * storage/indexeddb/mozilla/autoincrement-indexes-expected.txt:
+        * storage/indexeddb/mozilla/autoincrement-indexes.html:
+        * storage/indexeddb/mozilla/bad-keypath-expected.txt:
+        * storage/indexeddb/mozilla/bad-keypath.html:
+        * storage/indexeddb/mozilla/clear-expected.txt:
+        * storage/indexeddb/mozilla/clear.html:
+        * storage/indexeddb/mozilla/create-index-unique-expected.txt:
+        * storage/indexeddb/mozilla/create-index-unique.html:
+        * storage/indexeddb/mozilla/create-index-with-integer-keys-expected.txt:
+        * storage/indexeddb/mozilla/create-index-with-integer-keys.html:
+        * storage/indexeddb/mozilla/create-objectstore-basics-expected.txt:
+        * storage/indexeddb/mozilla/create-objectstore-basics.html:
+        * storage/indexeddb/mozilla/create-objectstore-null-name-expected.txt:
+        * storage/indexeddb/mozilla/create-objectstore-null-name.html:
+        * storage/indexeddb/mozilla/cursor-mutation-expected.txt:
+        * storage/indexeddb/mozilla/cursor-mutation-objectstore-only-expected.txt:
+        * storage/indexeddb/mozilla/cursor-mutation-objectstore-only.html:
+        * storage/indexeddb/mozilla/cursor-mutation.html:
+        * storage/indexeddb/mozilla/cursor-update-updates-indexes-expected.txt:
+        * storage/indexeddb/mozilla/cursor-update-updates-indexes.html:
+        * storage/indexeddb/mozilla/cursors-expected.txt:
+        * storage/indexeddb/mozilla/cursors.html:
+        * storage/indexeddb/mozilla/delete-result-expected.txt:
+        * storage/indexeddb/mozilla/delete-result.html:
+        * storage/indexeddb/mozilla/event-source-expected.txt:
+        * storage/indexeddb/mozilla/event-source.html:
+        * storage/indexeddb/mozilla/global-data-expected.txt:
+        * storage/indexeddb/mozilla/global-data.html:
+        * storage/indexeddb/mozilla/indexes-expected.txt:
+        * storage/indexeddb/mozilla/indexes.html:
+        * storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt:
+        * storage/indexeddb/mozilla/key-requirements-delete-null-key.html:
+        * storage/indexeddb/mozilla/key-requirements-expected.txt:
+        * storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt:
+        * storage/indexeddb/mozilla/key-requirements-inline-and-passed.html:
+        * storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt:
+        * storage/indexeddb/mozilla/key-requirements-put-no-key.html:
+        * storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt:
+        * storage/indexeddb/mozilla/key-requirements-put-null-key.html:
+        * storage/indexeddb/mozilla/key-requirements.html:
+        * storage/indexeddb/mozilla/object-cursors-expected.txt:
+        * storage/indexeddb/mozilla/object-cursors.html:
+        * storage/indexeddb/mozilla/object-identity-expected.txt:
+        * storage/indexeddb/mozilla/object-identity.html:
+        * storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put-expected.txt:
+        * storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put.html:
+        * storage/indexeddb/mozilla/object-store-remove-values-expected.txt:
+        * storage/indexeddb/mozilla/object-store-remove-values.html:
+        * storage/indexeddb/mozilla/objectstorenames-expected.txt:
+        * storage/indexeddb/mozilla/objectstorenames.html:
+        * storage/indexeddb/mozilla/odd-result-order-expected.txt:
+        * storage/indexeddb/mozilla/odd-result-order.html:
+        * storage/indexeddb/mozilla/open-database-null-name-expected.txt:
+        * storage/indexeddb/mozilla/open-database-null-name.html:
+        * storage/indexeddb/mozilla/put-get-values-expected.txt:
+        * storage/indexeddb/mozilla/put-get-values.html:
+        * storage/indexeddb/mozilla/readonly-transactions-expected.txt:
+        * storage/indexeddb/mozilla/readonly-transactions.html:
+        * storage/indexeddb/mozilla/readwrite-transactions-expected.txt:
+        * storage/indexeddb/mozilla/readwrite-transactions.html:
+        * storage/indexeddb/mozilla/readyState-expected.txt:
+        * storage/indexeddb/mozilla/readyState.html:
+        * storage/indexeddb/mozilla/remove-index-expected.txt:
+        * storage/indexeddb/mozilla/remove-index.html:
+        * storage/indexeddb/mozilla/remove-objectstore-expected.txt:
+        * storage/indexeddb/mozilla/remove-objectstore.html:
+        * storage/indexeddb/mozilla/versionchange-abort-expected.txt:
+        * storage/indexeddb/mozilla/versionchange-abort.html:
+        * storage/indexeddb/mozilla/versionchange-expected.txt:
+        * storage/indexeddb/mozilla/versionchange.html:
+        * storage/indexeddb/mutating-cursor-expected.txt:
+        * storage/indexeddb/mutating-cursor.html:
+        * storage/indexeddb/objectStore-required-arguments-expected.txt:
+        * storage/indexeddb/objectStore-required-arguments.html:
+        * storage/indexeddb/objectstore-autoincrement-expected.txt:
+        * storage/indexeddb/objectstore-autoincrement.html:
+        * storage/indexeddb/objectstore-basics-expected.txt:
+        * storage/indexeddb/objectstore-basics-workers-expected.txt:
+        * storage/indexeddb/objectstore-clear-expected.txt:
+        * storage/indexeddb/objectstore-clear.html:
+        * storage/indexeddb/objectstore-count-expected.txt:
+        * storage/indexeddb/objectstore-count.html:
+        * storage/indexeddb/objectstore-cursor-expected.txt:
+        * storage/indexeddb/objectstore-cursor.html:
+        * storage/indexeddb/objectstore-removeobjectstore-expected.txt:
+        * storage/indexeddb/objectstore-removeobjectstore.html:
+        * storage/indexeddb/odd-strings-expected.txt:
+        * storage/indexeddb/odd-strings.html:
+        * storage/indexeddb/open-close-version-expected.txt:
+        * storage/indexeddb/open-close-version.html:
+        * storage/indexeddb/open-cursor-expected.txt:
+        * storage/indexeddb/open-cursor.html:
+        * storage/indexeddb/open-during-transaction-expected.txt:
+        * storage/indexeddb/open-during-transaction.html:
+        * storage/indexeddb/prefetch-bugfix-108071-expected.txt:
+        * storage/indexeddb/prefetch-bugfix-108071.html:
+        * storage/indexeddb/queued-commands-expected.txt:
+        * storage/indexeddb/queued-commands.html:
+        * storage/indexeddb/readonly-expected.txt:
+        * storage/indexeddb/readonly-properties-expected.txt:
+        * storage/indexeddb/readonly-properties.html:
+        * storage/indexeddb/readonly.html:
+        * storage/indexeddb/request-event-propagation-expected.txt:
+        * storage/indexeddb/request-event-propagation.html:
+        * storage/indexeddb/resources/basics.js:
+        (test):
+        (openCallback):
+        * storage/indexeddb/resources/index-basics.js:
+        (test):
+        * storage/indexeddb/resources/objectstore-basics.js:
+        (test):
+        (setVersionSuccess):
+        (createIndex):
+        (addData):
+        (addAgainFailure):
+        (removeSuccessButNotThere):
+        (testPreConditions.request.onsuccess):
+        (testPreConditions):
+        * storage/indexeddb/resources/shared.js:
+        (removeVendorPrefixes):
+        * storage/indexeddb/resources/transaction-abort-workers.js:
+        (transactionAborted):
+        (transactionCompleted):
+        (timeoutTest.transaction.onabort):
+        (timeoutTest):
+        (errorTransactionAborted):
+        * storage/indexeddb/setVersion-null-expected.txt:
+        * storage/indexeddb/setVersion-null.html:
+        * storage/indexeddb/setVersion-undefined-expected.txt:
+        * storage/indexeddb/setVersion-undefined.html:
+        * storage/indexeddb/set_version_blocked-expected.txt:
+        * storage/indexeddb/set_version_blocked.html:
+        * storage/indexeddb/set_version_queue-expected.txt:
+        * storage/indexeddb/set_version_queue.html:
+        * storage/indexeddb/structured-clone-expected.txt:
+        * storage/indexeddb/structured-clone.html:
+        * storage/indexeddb/transaction-abort-expected.txt:
+        * storage/indexeddb/transaction-abort-with-js-recursion-cross-frame-expected.txt:
+        * storage/indexeddb/transaction-abort-with-js-recursion-cross-frame.html:
+        * storage/indexeddb/transaction-abort-with-js-recursion-expected.txt:
+        * storage/indexeddb/transaction-abort-with-js-recursion.html:
+        * storage/indexeddb/transaction-abort-workers-expected.txt:
+        * storage/indexeddb/transaction-abort.html:
+        * storage/indexeddb/transaction-after-close-expected.txt:
+        * storage/indexeddb/transaction-after-close.html:
+        * storage/indexeddb/transaction-and-objectstore-calls-expected.txt:
+        * storage/indexeddb/transaction-and-objectstore-calls.html:
+        * storage/indexeddb/transaction-basics-expected.txt:
+        * storage/indexeddb/transaction-basics.html:
+        * storage/indexeddb/transaction-crash-on-abort-expected.txt:
+        * storage/indexeddb/transaction-crash-on-abort.html:
+        * storage/indexeddb/transaction-event-propagation-expected.txt:
+        * storage/indexeddb/transaction-event-propagation.html:
+        * storage/indexeddb/transaction-read-only-expected.txt:
+        * storage/indexeddb/transaction-read-only.html:
+        * storage/indexeddb/transaction-rollback-expected.txt:
+        * storage/indexeddb/transaction-rollback.html:
+        * storage/indexeddb/transaction-storeNames-required-expected.txt:
+        * storage/indexeddb/transaction-storeNames-required.html:
+        * storage/indexeddb/two-version-changes-expected.txt:
+        * storage/indexeddb/two-version-changes.html:
+        * storage/indexeddb/value-undefined-expected.txt:
+        * storage/indexeddb/value-undefined.html:
+        * storage/indexeddb/values-odd-types-expected.txt:
+        * storage/indexeddb/values-odd-types.html:
+        * storage/indexeddb/version-change-abort-expected.txt:
+        * storage/indexeddb/version-change-abort.html:
+        * storage/indexeddb/version-change-exclusive-expected.txt:
+        * storage/indexeddb/version-change-exclusive.html:
+        * storage/indexeddb/versionchangerequest-activedomobject-expected.txt:
+        * storage/indexeddb/versionchangerequest-activedomobject.html:
+
 2012-03-14  Tony Chang  <tony@chromium.org>
 
         multiline column flexbox with auto height wrap too much
index 8e3cd2a..4bf56d0 100644 (file)
@@ -3,29 +3,28 @@ Test IndexedDB's basics.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS 'webkitIndexedDB' in self is true
-PASS webkitIndexedDB == null is false
-PASS 'webkitIDBCursor' in self is true
-PASS webkitIDBCursor == null is false
-webkitIndexedDB.open('basics')
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open('basics')
 PASS 'result' in request is true
 Expecting exception from request.result
 PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
 PASS 'errorCode' in request is true
 Expecting exception from request.errorCode
 PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
 PASS 'webkitErrorMessage' in request is true
 Expecting exception from request.webkitErrorMessage
 PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
 PASS 'source' in request is true
-PASS request.source is webkitIndexedDB
+PASS request.source is indexedDB
 PASS 'transaction' in request is true
 PASS request.transaction is null
 PASS 'readyState' in request is true
-PASS request.readyState is webkitIDBRequest.LOADING
+PASS request.readyState is IDBRequest.LOADING
 PASS 'onsuccess' in request is true
 PASS request.onsuccess is null
 PASS 'onerror' in request is true
@@ -39,11 +38,11 @@ PASS event.target.errorCode is 0
 PASS 'webkitErrorMessage' in event.target is true
 PASS event.target.webkitErrorMessage is undefined.
 PASS 'source' in event.target is true
-PASS request.source is webkitIndexedDB
+PASS request.source is indexedDB
 PASS 'transaction' in event.target is true
 PASS event.target.transaction is null
 PASS 'readyState' in request is true
-PASS event.target.readyState is webkitIDBRequest.DONE
+PASS event.target.readyState is IDBRequest.DONE
 PASS 'onsuccess' in event.target is true
 PASS 'onerror' in event.target is true
 PASS event.target.LOADING is 1
index 43f1e8a..444270f 100644 (file)
@@ -4,29 +4,28 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 Starting worker: resources/basics.js
-PASS [Worker] 'webkitIndexedDB' in self is true
-PASS [Worker] webkitIndexedDB == null is false
-PASS [Worker] 'webkitIDBCursor' in self is true
-PASS [Worker] webkitIDBCursor == null is false
-[Worker] webkitIndexedDB.open('basics')
+[Worker] indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS [Worker] Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+[Worker] 
+[Worker] indexedDB.open('basics')
 PASS [Worker] 'result' in request is true
 [Worker] Expecting exception from request.result
 PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS [Worker] code is IDBDatabaseException.NOT_ALLOWED_ERR
 PASS [Worker] 'errorCode' in request is true
 [Worker] Expecting exception from request.errorCode
 PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS [Worker] code is IDBDatabaseException.NOT_ALLOWED_ERR
 PASS [Worker] 'webkitErrorMessage' in request is true
 [Worker] Expecting exception from request.webkitErrorMessage
 PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS [Worker] code is IDBDatabaseException.NOT_ALLOWED_ERR
 PASS [Worker] 'source' in request is true
-PASS [Worker] request.source is webkitIndexedDB
+PASS [Worker] request.source is indexedDB
 PASS [Worker] 'transaction' in request is true
 PASS [Worker] request.transaction is null
 PASS [Worker] 'readyState' in request is true
-PASS [Worker] request.readyState is webkitIDBRequest.LOADING
+PASS [Worker] request.readyState is IDBRequest.LOADING
 PASS [Worker] 'onsuccess' in request is true
 PASS [Worker] request.onsuccess is null
 PASS [Worker] 'onerror' in request is true
@@ -40,11 +39,11 @@ PASS [Worker] event.target.errorCode is 0
 PASS [Worker] 'webkitErrorMessage' in event.target is true
 PASS [Worker] event.target.webkitErrorMessage is undefined.
 PASS [Worker] 'source' in event.target is true
-PASS [Worker] request.source is webkitIndexedDB
+PASS [Worker] request.source is indexedDB
 PASS [Worker] 'transaction' in event.target is true
 PASS [Worker] event.target.transaction is null
 PASS [Worker] 'readyState' in request is true
-PASS [Worker] event.target.readyState is webkitIDBRequest.DONE
+PASS [Worker] event.target.readyState is IDBRequest.DONE
 PASS [Worker] 'onsuccess' in event.target is true
 PASS [Worker] 'onerror' in event.target is true
 PASS [Worker] event.target.LOADING is 1
index 43f1e8a..444270f 100644 (file)
@@ -4,29 +4,28 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 Starting worker: resources/basics.js
-PASS [Worker] 'webkitIndexedDB' in self is true
-PASS [Worker] webkitIndexedDB == null is false
-PASS [Worker] 'webkitIDBCursor' in self is true
-PASS [Worker] webkitIDBCursor == null is false
-[Worker] webkitIndexedDB.open('basics')
+[Worker] indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS [Worker] Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+[Worker] 
+[Worker] indexedDB.open('basics')
 PASS [Worker] 'result' in request is true
 [Worker] Expecting exception from request.result
 PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS [Worker] code is IDBDatabaseException.NOT_ALLOWED_ERR
 PASS [Worker] 'errorCode' in request is true
 [Worker] Expecting exception from request.errorCode
 PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS [Worker] code is IDBDatabaseException.NOT_ALLOWED_ERR
 PASS [Worker] 'webkitErrorMessage' in request is true
 [Worker] Expecting exception from request.webkitErrorMessage
 PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS [Worker] code is IDBDatabaseException.NOT_ALLOWED_ERR
 PASS [Worker] 'source' in request is true
-PASS [Worker] request.source is webkitIndexedDB
+PASS [Worker] request.source is indexedDB
 PASS [Worker] 'transaction' in request is true
 PASS [Worker] request.transaction is null
 PASS [Worker] 'readyState' in request is true
-PASS [Worker] request.readyState is webkitIDBRequest.LOADING
+PASS [Worker] request.readyState is IDBRequest.LOADING
 PASS [Worker] 'onsuccess' in request is true
 PASS [Worker] request.onsuccess is null
 PASS [Worker] 'onerror' in request is true
@@ -40,11 +39,11 @@ PASS [Worker] event.target.errorCode is 0
 PASS [Worker] 'webkitErrorMessage' in event.target is true
 PASS [Worker] event.target.webkitErrorMessage is undefined.
 PASS [Worker] 'source' in event.target is true
-PASS [Worker] request.source is webkitIndexedDB
+PASS [Worker] request.source is indexedDB
 PASS [Worker] 'transaction' in event.target is true
 PASS [Worker] event.target.transaction is null
 PASS [Worker] 'readyState' in request is true
-PASS [Worker] event.target.readyState is webkitIDBRequest.DONE
+PASS [Worker] event.target.readyState is IDBRequest.DONE
 PASS [Worker] 'onsuccess' in event.target is true
 PASS [Worker] 'onerror' in event.target is true
 PASS [Worker] event.target.LOADING is 1
index 2b86df9..10de03f 100644 (file)
@@ -3,27 +3,30 @@ Test IndexedDB's constants.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS webkitIDBDatabaseException.UNKNOWN_ERR is 1
-PASS webkitIDBDatabaseException.NON_TRANSIENT_ERR is 2
-PASS webkitIDBDatabaseException.NOT_FOUND_ERR is 3
-PASS webkitIDBDatabaseException.CONSTRAINT_ERR is 4
-PASS webkitIDBDatabaseException.DATA_ERR is 5
-PASS webkitIDBDatabaseException.NOT_ALLOWED_ERR is 6
-PASS webkitIDBDatabaseException.TRANSACTION_INACTIVE_ERR is 7
-PASS webkitIDBDatabaseException.ABORT_ERR is 8
-PASS webkitIDBDatabaseException.READ_ONLY_ERR is 9
-PASS webkitIDBDatabaseException.TIMEOUT_ERR is 10
-PASS webkitIDBDatabaseException.QUOTA_ERR is 11
-PASS webkitIDBDatabaseException.VER_ERR is 12
-PASS webkitIDBRequest.LOADING is 1
-PASS webkitIDBRequest.DONE is 2
-PASS webkitIDBCursor.NEXT is 0
-PASS webkitIDBCursor.NEXT_NO_DUPLICATE is 1
-PASS webkitIDBCursor.PREV is 2
-PASS webkitIDBCursor.PREV_NO_DUPLICATE is 3
-PASS webkitIDBTransaction.READ_ONLY is 0
-PASS webkitIDBTransaction.READ_WRITE is 1
-PASS webkitIDBTransaction.VERSION_CHANGE is 2
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+PASS IDBDatabaseException.UNKNOWN_ERR is 1
+PASS IDBDatabaseException.NON_TRANSIENT_ERR is 2
+PASS IDBDatabaseException.NOT_FOUND_ERR is 3
+PASS IDBDatabaseException.CONSTRAINT_ERR is 4
+PASS IDBDatabaseException.DATA_ERR is 5
+PASS IDBDatabaseException.NOT_ALLOWED_ERR is 6
+PASS IDBDatabaseException.TRANSACTION_INACTIVE_ERR is 7
+PASS IDBDatabaseException.ABORT_ERR is 8
+PASS IDBDatabaseException.READ_ONLY_ERR is 9
+PASS IDBDatabaseException.TIMEOUT_ERR is 10
+PASS IDBDatabaseException.QUOTA_ERR is 11
+PASS IDBDatabaseException.VER_ERR is 12
+PASS IDBRequest.LOADING is 1
+PASS IDBRequest.DONE is 2
+PASS IDBCursor.NEXT is 0
+PASS IDBCursor.NEXT_NO_DUPLICATE is 1
+PASS IDBCursor.PREV is 2
+PASS IDBCursor.PREV_NO_DUPLICATE is 3
+PASS IDBTransaction.READ_ONLY is 0
+PASS IDBTransaction.READ_WRITE is 1
+PASS IDBTransaction.VERSION_CHANGE is 2
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 3816134..325cba7 100644 (file)
@@ -12,30 +12,31 @@ description("Test IndexedDB's constants.");
 
 function test()
 {
-    shouldBe("webkitIDBDatabaseException.UNKNOWN_ERR", "1");
-    shouldBe("webkitIDBDatabaseException.NON_TRANSIENT_ERR", "2");
-    shouldBe("webkitIDBDatabaseException.NOT_FOUND_ERR", "3");
-    shouldBe("webkitIDBDatabaseException.CONSTRAINT_ERR", "4");
-    shouldBe("webkitIDBDatabaseException.DATA_ERR", "5");
-    shouldBe("webkitIDBDatabaseException.NOT_ALLOWED_ERR", "6");
-    shouldBe("webkitIDBDatabaseException.TRANSACTION_INACTIVE_ERR", "7");
-    shouldBe("webkitIDBDatabaseException.ABORT_ERR", "8");
-    shouldBe("webkitIDBDatabaseException.READ_ONLY_ERR", "9");
-    shouldBe("webkitIDBDatabaseException.TIMEOUT_ERR", "10");
-    shouldBe("webkitIDBDatabaseException.QUOTA_ERR", "11");
-    shouldBe("webkitIDBDatabaseException.VER_ERR", "12");
-
-    shouldBe("webkitIDBRequest.LOADING", "1");
-    shouldBe("webkitIDBRequest.DONE", "2");
-
-    shouldBe("webkitIDBCursor.NEXT", "0");
-    shouldBe("webkitIDBCursor.NEXT_NO_DUPLICATE", "1");
-    shouldBe("webkitIDBCursor.PREV", "2");
-    shouldBe("webkitIDBCursor.PREV_NO_DUPLICATE", "3");
-
-    shouldBe("webkitIDBTransaction.READ_ONLY", "0");
-    shouldBe("webkitIDBTransaction.READ_WRITE", "1");
-    shouldBe("webkitIDBTransaction.VERSION_CHANGE", "2");
+    removeVendorPrefixes();
+    shouldBe("IDBDatabaseException.UNKNOWN_ERR", "1");
+    shouldBe("IDBDatabaseException.NON_TRANSIENT_ERR", "2");
+    shouldBe("IDBDatabaseException.NOT_FOUND_ERR", "3");
+    shouldBe("IDBDatabaseException.CONSTRAINT_ERR", "4");
+    shouldBe("IDBDatabaseException.DATA_ERR", "5");
+    shouldBe("IDBDatabaseException.NOT_ALLOWED_ERR", "6");
+    shouldBe("IDBDatabaseException.TRANSACTION_INACTIVE_ERR", "7");
+    shouldBe("IDBDatabaseException.ABORT_ERR", "8");
+    shouldBe("IDBDatabaseException.READ_ONLY_ERR", "9");
+    shouldBe("IDBDatabaseException.TIMEOUT_ERR", "10");
+    shouldBe("IDBDatabaseException.QUOTA_ERR", "11");
+    shouldBe("IDBDatabaseException.VER_ERR", "12");
+
+    shouldBe("IDBRequest.LOADING", "1");
+    shouldBe("IDBRequest.DONE", "2");
+
+    shouldBe("IDBCursor.NEXT", "0");
+    shouldBe("IDBCursor.NEXT_NO_DUPLICATE", "1");
+    shouldBe("IDBCursor.PREV", "2");
+    shouldBe("IDBCursor.PREV_NO_DUPLICATE", "3");
+
+    shouldBe("IDBTransaction.READ_ONLY", "0");
+    shouldBe("IDBTransaction.READ_WRITE", "1");
+    shouldBe("IDBTransaction.VERSION_CHANGE", "2");
 }
 
 test();
index 935985a..5c366b4 100644 (file)
@@ -3,50 +3,53 @@ Test IndexedDB's create and removeObjectStore
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-webkitIndexedDB.open('create-and-remove-object-store')
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open('create-and-remove-object-store')
 openSuccess():
 db = event.target.result
 Trying create
 Expecting exception from db.createObjectStore("some os")
 PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
 Trying remove
 Expecting exception from db.deleteObjectStore("some os")
 PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
 result = db.setVersion('version 1')
 Trying create
 Expecting exception from db.createObjectStore("some os")
 PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
 Trying remove
 Expecting exception from db.deleteObjectStore("some os")
 PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
 Deleted all object stores.
 db.createObjectStore('tmp')
 Expecting exception from db.createObjectStore('tmp')
 PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.CONSTRAINT_ERR
+PASS code is IDBDatabaseException.CONSTRAINT_ERR
 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 webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
 Trying remove
 Expecting exception from db.deleteObjectStore("some os")
 PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
 Trying create with store that already exists
 Expecting exception from db.createObjectStore('tmp')
 PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
 Trying remove with store that already exists
 Expecting exception from db.deleteObjectStore('tmp')
 PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 1453754..554039e 100644 (file)
@@ -12,7 +12,8 @@ description("Test IndexedDB's create and removeObjectStore");
 
 function test()
 {
-    request = evalAndLog("webkitIndexedDB.open('create-and-remove-object-store')");
+    removeVendorPrefixes();
+    request = evalAndLog("indexedDB.open('create-and-remove-object-store')");
     request.onsuccess = openSuccess;
     request.onerror = unexpectedErrorCallback;
 }
@@ -31,9 +32,9 @@ function openSuccess()
 function testCreateAndRemove()
 {
     debug("Trying create");
-    evalAndExpectException('db.createObjectStore("some os")', "webkitIDBDatabaseException.NOT_ALLOWED_ERR");
+    evalAndExpectException('db.createObjectStore("some os")', "IDBDatabaseException.NOT_ALLOWED_ERR");
     debug("Trying remove");
-    evalAndExpectException('db.deleteObjectStore("some os")', "webkitIDBDatabaseException.NOT_ALLOWED_ERR");
+    evalAndExpectException('db.deleteObjectStore("some os")', "IDBDatabaseException.NOT_ALLOWED_ERR");
 }
 
 function cleanDatabase()
@@ -41,7 +42,7 @@ function cleanDatabase()
     deleteAllObjectStores(db);
 
     os = evalAndLog("db.createObjectStore('tmp')");
-    evalAndExpectException("db.createObjectStore('tmp')", "webkitIDBDatabaseException.CONSTRAINT_ERR");
+    evalAndExpectException("db.createObjectStore('tmp')", "IDBDatabaseException.CONSTRAINT_ERR");
 
     trans = evalAndLog("trans = db.transaction(['tmp'])");
     request = evalAndLog("trans.objectStore('tmp').get(0)");
@@ -56,9 +57,9 @@ function tryOnceMore()
     testCreateAndRemove();
 
     debug("Trying create with store that already exists");
-    evalAndExpectException("db.createObjectStore('tmp')", "webkitIDBDatabaseException.NOT_ALLOWED_ERR");
+    evalAndExpectException("db.createObjectStore('tmp')", "IDBDatabaseException.NOT_ALLOWED_ERR");
     debug("Trying remove with store that already exists");
-    evalAndExpectException("db.deleteObjectStore('tmp')", "webkitIDBDatabaseException.NOT_ALLOWED_ERR");
+    evalAndExpectException("db.deleteObjectStore('tmp')", "IDBDatabaseException.NOT_ALLOWED_ERR");
 
     finishJSTest();
 }
index eff5b5c..8c8ccc8 100644 (file)
@@ -3,17 +3,18 @@ Test IndexedDB's createObjectStore's various options
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS 'webkitIndexedDB' in window is true
-PASS webkitIndexedDB == null is false
-webkitIndexedDB.open('create-object-store-options', 'description')
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open('create-object-store-options', 'description')
 db = event.target.result
 request = db.setVersion('version 1')
 Deleted all object stores.
 db.createObjectStore('a', {keyPath: 'a'})
 db.createObjectStore('b')
 db.createObjectStore('c', {autoIncrement: true});
-trans = db.transaction(['a', 'b'], webkitIDBTransaction.READ_WRITE)
-PASS trans.mode is webkitIDBTransaction.READ_WRITE
+trans = db.transaction(['a', 'b'], IDBTransaction.READ_WRITE)
+PASS trans.mode is IDBTransaction.READ_WRITE
 trans.objectStore('a').put({'a': 0})
 Expecting TypeError exception from db.createObjectStore('d', 'bar');
 PASS Exception was thrown.
index 078e508..bf94d36 100644 (file)
@@ -12,10 +12,9 @@ description("Test IndexedDB's createObjectStore's various options");
 
 function test()
 {
-    shouldBeTrue("'webkitIndexedDB' in window");
-    shouldBeFalse("webkitIndexedDB == null");
+    removeVendorPrefixes();
 
-    request = evalAndLog("webkitIndexedDB.open('create-object-store-options', 'description')");
+    request = evalAndLog("indexedDB.open('create-object-store-options', 'description')");
     request.onsuccess = openSuccess;
     request.onerror = unexpectedErrorCallback;
 }
@@ -39,8 +38,8 @@ function cleanDatabase()
     debug("db.createObjectStore('c', {autoIncrement: true});");
     db.createObjectStore('c', {autoIncrement: true});
 
-    trans = evalAndLog("trans = db.transaction(['a', 'b'], webkitIDBTransaction.READ_WRITE)");
-    shouldBe("trans.mode", "webkitIDBTransaction.READ_WRITE");
+    trans = evalAndLog("trans = db.transaction(['a', 'b'], IDBTransaction.READ_WRITE)");
+    shouldBe("trans.mode", "IDBTransaction.READ_WRITE");
 
     req = evalAndLog("trans.objectStore('a').put({'a': 0})");
     req.onsuccess = putB;
index edf0d49..083231b 100644 (file)
@@ -3,14 +3,9 @@ Test IndexedDB createObjectStore name argument is required
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
-PASS IDBKeyRange == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index b63f398..c2c4f29 100644 (file)
@@ -13,14 +13,7 @@ description("Test IndexedDB createObjectStore name argument is required");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
-    shouldBeFalse("IDBKeyRange == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index 83e4a62..b460ed5 100644 (file)
@@ -3,14 +3,9 @@ Test IndexedDB createObjectStore null handling
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
-PASS IDBKeyRange == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index 76e9fb1..260544e 100644 (file)
@@ -13,14 +13,7 @@ description("Test IndexedDB createObjectStore null handling");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
-    shouldBeFalse("IDBKeyRange == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index b64ddd9..cd01c31 100644 (file)
@@ -3,12 +3,9 @@ Test IndexedDB's IDBCursor.continue() with a key parameter.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-window.indexedDB = window.indexedDB || window.webkitIndexedDB
-PASS indexedDB != null is true
-window.IDBCursor = window.IDBCursor || window.webkitIDBCursor
-PASS IDBCursor != null is true
-window.IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException
-PASS IDBDatabaseException != null is true
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open('cursor-continue')
 db = event.target.result
 db.setVersion('new version')
index 64fb0bb..cdafaf7 100644 (file)
@@ -36,12 +36,7 @@ window.testData = [
 
 function test()
 {
-    evalAndLog("window.indexedDB = window.indexedDB || window.webkitIndexedDB");
-    shouldBeTrue("indexedDB != null");
-    evalAndLog("window.IDBCursor = window.IDBCursor || window.webkitIDBCursor");
-    shouldBeTrue("IDBCursor != null");
-    evalAndLog("window.IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException");
-    shouldBeTrue("IDBDatabaseException != null");
+    removeVendorPrefixes();
     openDatabase();
 }
 
index edda620..9cc7977 100644 (file)
@@ -3,7 +3,10 @@ Test IndexedDB's openCursor.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-webkitIndexedDB.open('cursor-delete')
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open('cursor-delete')
 db = event.target.result
 db.setVersion('new version')
 setVersionSuccess():
@@ -16,7 +19,7 @@ objectStore.add('myValue2', 'myKey2')
 objectStore.add('myValue3', 'myKey3')
 objectStore.add('myValue4', 'myKey4')
 openCursor1
-trans = db.transaction(['test'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['test'], IDBTransaction.READ_WRITE)
 trans.objectStore('test').openCursor({range: keyRange})
 event.target.result.delete()
 PASS event.target.result.value is "myValue1"
@@ -33,7 +36,7 @@ event.target.result.continue()
 PASS counter is 5
 trans.objectStore('test').openCursor(keyRange)
 PASS event.target.result is null
-trans = db.transaction(['test'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['test'], IDBTransaction.READ_WRITE)
 objectStore = trans.objectStore('test')
 objectStore.add('myValue1', 'myKey1')
 openCursor2
index 9fe8ede..6a531a6 100644 (file)
@@ -14,7 +14,8 @@ test();
 
 function test()
 {
-    request = evalAndLog("webkitIndexedDB.open('cursor-delete')");
+    removeVendorPrefixes();
+    request = evalAndLog("indexedDB.open('cursor-delete')");
     request.onsuccess = openSuccess;
     request.onerror = unexpectedErrorCallback;
 }
@@ -48,8 +49,8 @@ function setVersionSuccess()
 function openCursor()
 {
     debug("openCursor1");
-    evalAndLog("trans = db.transaction(['test'], webkitIDBTransaction.READ_WRITE)");
-    keyRange = webkitIDBKeyRange.lowerBound("myKey1");
+    evalAndLog("trans = db.transaction(['test'], IDBTransaction.READ_WRITE)");
+    keyRange = IDBKeyRange.lowerBound("myKey1");
     request = evalAndLog("trans.objectStore('test').openCursor({range: keyRange})");
     request.onsuccess = cursorSuccess;
     request.onerror = unexpectedErrorCallback;
@@ -78,7 +79,7 @@ function cursorEmpty()
 
 function addObject()
 {
-    evalAndLog("trans = db.transaction(['test'], webkitIDBTransaction.READ_WRITE)");
+    evalAndLog("trans = db.transaction(['test'], IDBTransaction.READ_WRITE)");
     objectStore = evalAndLog("objectStore = trans.objectStore('test')");
     request = evalAndLog("objectStore.add('myValue1', 'myKey1')");
     request.onsuccess = openCursor2;
index fa34a00..43010a1 100644 (file)
@@ -3,7 +3,10 @@ Test consistency of IndexedDB's cursor objects.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-webkitIndexedDB.open('cursor-inconsistency')
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open('cursor-inconsistency')
 db = event.target.result
 db.setVersion('new version')
 setVersionSuccess():
@@ -16,7 +19,7 @@ objectStore.add('someValue2', 'someKey2').onerror = unexpectedErrorCallback
 objectStore.add('someValue3', 'someKey3').onerror = unexpectedErrorCallback
 objectStore.add('someValue4', 'someKey4').onerror = unexpectedErrorCallback
 openBasicCursor()
-trans = db.transaction(['basicStore'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['basicStore'], IDBTransaction.READ_WRITE)
 trans.objectStore('basicStore')
 objectStore.openCursor(keyRange)
 
index 194c2c6..6e07b1c 100644 (file)
@@ -14,7 +14,8 @@ test();
 
 function test()
 {
-    request = evalAndLog("webkitIndexedDB.open('cursor-inconsistency')");
+    removeVendorPrefixes();
+    request = evalAndLog("indexedDB.open('cursor-inconsistency')");
     request.onsuccess = openSuccess;
     request.onerror = unexpectedErrorCallback;
 }
@@ -49,11 +50,11 @@ function setVersionSuccess()
 function openBasicCursor()
 {
     debug("openBasicCursor()");
-    evalAndLog("trans = db.transaction(['basicStore'], webkitIDBTransaction.READ_WRITE)");
+    evalAndLog("trans = db.transaction(['basicStore'], IDBTransaction.READ_WRITE)");
     trans.onabort = unexpectedAbortCallback;
     trans.oncomplete = transactionComplete;
 
-    keyRange = webkitIDBKeyRange.lowerBound("someKey1");
+    keyRange = IDBKeyRange.lowerBound("someKey1");
     window.objectStore = evalAndLog("trans.objectStore('basicStore')");
     request = evalAndLog("objectStore.openCursor(keyRange)");
     request.onsuccess = checkCursor;
index 5780dff..58b4318 100644 (file)
@@ -3,7 +3,10 @@ Test IndexedDB's openCursor.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-webkitIndexedDB.open('cursor-index-delete')
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open('cursor-index-delete')
 db = event.target.result
 db.setVersion('new version')
 setVersionSuccess():
@@ -17,7 +20,7 @@ objectStore.add({x: 2}, 'myKey2')
 objectStore.add({x: 3}, 'myKey3')
 objectStore.add({x: 4}, 'myKey4')
 openCursor1
-trans = db.transaction(['test'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['test'], IDBTransaction.READ_WRITE)
 trans.objectStore('test').index('testIndex').openCursor(keyRange)
 event.target.result.delete()
 PASS event.target.result.key is counter++
@@ -34,7 +37,7 @@ 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'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['test'], IDBTransaction.READ_WRITE)
 objectStore = trans.objectStore('test')
 objectStore.add({x: 1}, 'myKey1')
 openCursor2
index e1a4b7b..a758c78 100644 (file)
@@ -14,7 +14,8 @@ test();
 
 function test()
 {
-    request = evalAndLog("webkitIndexedDB.open('cursor-index-delete')");
+    removeVendorPrefixes();
+    request = evalAndLog("indexedDB.open('cursor-index-delete')");
     request.onsuccess = openSuccess;
     request.onerror = unexpectedErrorCallback;
 }
@@ -50,8 +51,8 @@ function setVersionSuccess()
 function openCursor()
 {
     debug("openCursor1");
-    evalAndLog("trans = db.transaction(['test'], webkitIDBTransaction.READ_WRITE)");
-    keyRange = webkitIDBKeyRange.lowerBound(1);
+    evalAndLog("trans = db.transaction(['test'], IDBTransaction.READ_WRITE)");
+    keyRange = IDBKeyRange.lowerBound(1);
     request = evalAndLog("trans.objectStore('test').index('testIndex').openCursor(keyRange)");
     request.onsuccess = cursorSuccess;
     request.onerror = unexpectedErrorCallback;
@@ -81,7 +82,7 @@ function cursorEmpty()
 
 function addObject()
 {
-    evalAndLog("trans = db.transaction(['test'], webkitIDBTransaction.READ_WRITE)");
+    evalAndLog("trans = db.transaction(['test'], IDBTransaction.READ_WRITE)");
     objectStore = evalAndLog("objectStore = trans.objectStore('test')");
     request = evalAndLog("objectStore.add({x: 1}, 'myKey1')");
     request.onsuccess = openCursor2;
index 7ca2947..56f74ea 100644 (file)
@@ -3,12 +3,9 @@ Test IndexedDB keys ordering and readback from cursors.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction
-PASS IDBTransaction == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 
 openreq = indexedDB.open('cursor-key-order')
 db = openreq.result
index 5a34cde..e014dbb 100644 (file)
@@ -12,12 +12,7 @@ description("Test IndexedDB keys ordering and readback from cursors.");
 
 function test()
 {
-    evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction");
-    shouldBeFalse("IDBTransaction == null");
+    removeVendorPrefixes();
 
     prepareDatabase();
 }
index ce26e9f..262ce33 100644 (file)
@@ -3,12 +3,9 @@ Test IndexedDB primary key ordering and readback from cursors.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction
-PASS IDBTransaction == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 
 openRequest = indexedDB.open('cursor-primary-key-order')
 db = openRequest.result
index 84a117c..35da000 100644 (file)
@@ -13,12 +13,7 @@ description("Test IndexedDB primary key ordering and readback from cursors.");
 
 function test()
 {
-    evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction");
-    shouldBeFalse("IDBTransaction == null");
+    removeVendorPrefixes();
 
     prepareDatabase();
 }
index 3bb29a8..3b41c5d 100644 (file)
@@ -3,14 +3,9 @@ Test IndexedDB keys ordering and readback from cursors.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction
-PASS IDBTransaction == null is false
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange
-PASS IDBKeyRange == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 
 openreq = indexedDB.open('cursor-reverse-bug')
 db = openreq.result
index b5594df..5975bac 100644 (file)
@@ -12,14 +12,7 @@ description("Test IndexedDB keys ordering and readback from cursors.");
 
 function test()
 {
-    evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction");
-    shouldBeFalse("IDBTransaction == null");
-    evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange");
-    shouldBeFalse("IDBKeyRange == null");
+    removeVendorPrefixes();
 
     prepareDatabase();
 }
index e129ad9..f3c3c24 100644 (file)
@@ -3,7 +3,10 @@ Test IndexedDB's cursor skips deleted entries.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-webkitIndexedDB.open('cursor-skip-deleted')
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open('cursor-skip-deleted')
 db = event.target.result
 db.setVersion('new version')
 setVersionSuccess():
@@ -16,10 +19,10 @@ objectStore.createIndex('nameIndex', 'name')
 resetObjectStore():
 
 basicCursorTest()
-trans = db.transaction(['store'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['store'], IDBTransaction.READ_WRITE)
 
 testCursor():
-trans.objectStore('store').openCursor(webkitIDBKeyRange.lowerBound(0))
+trans.objectStore('store').openCursor(IDBKeyRange.lowerBound(0))
 0: Alpha
 1: Bravo
 request = trans.objectStore('store').delete(0)
@@ -58,7 +61,7 @@ resetObjectStore():
 reverseCursorTest():
 
 testCursor():
-trans.objectStore('store').openCursor(webkitIDBKeyRange.lowerBound(0), webkitIDBCursor.PREV)
+trans.objectStore('store').openCursor(IDBKeyRange.lowerBound(0), IDBCursor.PREV)
 25: Zulu
 24: Yankee
 request = trans.objectStore('store').delete(25)
@@ -97,7 +100,7 @@ resetObjectStore():
 indexCursorTest():
 
 testCursor():
-trans.objectStore('store').index('nameIndex').openCursor(webkitIDBKeyRange.lowerBound('Alpha'))
+trans.objectStore('store').index('nameIndex').openCursor(IDBKeyRange.lowerBound('Alpha'))
 0: Alpha
 1: Bravo
 request = trans.objectStore('store').delete(0)
index c26eaf4..eaedb2d 100644 (file)
@@ -19,7 +19,8 @@ test();
 
 function test()
 {
-    request = evalAndLog("webkitIndexedDB.open('cursor-skip-deleted')");
+    removeVendorPrefixes();
+    request = evalAndLog("indexedDB.open('cursor-skip-deleted')");
     request.onsuccess = openSuccess;
     request.onerror = unexpectedErrorCallback;
 }
@@ -142,7 +143,7 @@ function basicCursorTest()
 {
     debug("basicCursorTest()");
 
-    evalAndLog("trans = db.transaction(['store'], webkitIDBTransaction.READ_WRITE)");
+    evalAndLog("trans = db.transaction(['store'], IDBTransaction.READ_WRITE)");
     trans.onabort = unexpectedAbortCallback;
     trans.oncomplete = transactionComplete;
 
@@ -155,7 +156,7 @@ function basicCursorTest()
                    {id: 20, targets: [17,18]}
                    ];
 
-    testCursor(deletes, "trans.objectStore('store').openCursor(webkitIDBKeyRange.lowerBound(0))", function() { resetObjectStore(reverseCursorTest); });
+    testCursor(deletes, "trans.objectStore('store').openCursor(IDBKeyRange.lowerBound(0))", function() { resetObjectStore(reverseCursorTest); });
 }
 
 function reverseCursorTest()
@@ -172,7 +173,7 @@ function reverseCursorTest()
                    ];
 
 
-    testCursor(deletes, "trans.objectStore('store').openCursor(webkitIDBKeyRange.lowerBound(0), webkitIDBCursor.PREV)", function() { resetObjectStore(indexCursorTest); });
+    testCursor(deletes, "trans.objectStore('store').openCursor(IDBKeyRange.lowerBound(0), IDBCursor.PREV)", function() { resetObjectStore(indexCursorTest); });
 }
 
 function indexCursorTest()
@@ -188,7 +189,7 @@ function indexCursorTest()
                    {id: 20, targets: [17,18]}
                    ];
 
-    testCursor(deletes, "trans.objectStore('store').index('nameIndex').openCursor(webkitIDBKeyRange.lowerBound('Alpha'))", function() { });
+    testCursor(deletes, "trans.objectStore('store').index('nameIndex').openCursor(IDBKeyRange.lowerBound('Alpha'))", function() { });
 }
 
 function transactionComplete()
index 0e21f8c..4404f96 100644 (file)
@@ -3,7 +3,10 @@ Test IndexedDB's cursor update.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-webkitIndexedDB.open('cursor-update')
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open('cursor-update')
 db = event.target.result
 db.setVersion('new version')
 setVersionSuccess():
@@ -27,7 +30,7 @@ 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'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['basicStore', 'autoIncrementStore', 'keyPathStore'], IDBTransaction.READ_WRITE)
 trans.objectStore('basicStore')
 objectStore.openCursor(keyRange)
 basicUpdateCursor()
@@ -106,25 +109,25 @@ 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 webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
 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 webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
 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 webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
 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 webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
 event.target.result.update({id: counter, number: 100 + counter++})
 event.target.source.continue()
 keyPathUpdateCursor()
@@ -157,22 +160,22 @@ keyCursor()
 PASS event.target.result.key is counter + 100
 PASS event.target.result.primaryKey is counter
 event.target.result.update({id: counter, number: counter + 200})
-PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
 keyCursor()
 PASS event.target.result.key is counter + 100
 PASS event.target.result.primaryKey is counter
 event.target.result.update({id: counter, number: counter + 200})
-PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
 keyCursor()
 PASS event.target.result.key is counter + 100
 PASS event.target.result.primaryKey is counter
 event.target.result.update({id: counter, number: counter + 200})
-PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
 keyCursor()
 PASS event.target.result.key is counter + 100
 PASS event.target.result.primaryKey is counter
 event.target.result.update({id: counter, number: counter + 200})
-PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
 keyCursor()
 PASS counter is 5
 transactionComplete()
index b7db426..5d078b5 100644 (file)
@@ -3,14 +3,9 @@ Test IndexedDB cursor.update required arguments
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
-PASS IDBKeyRange == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index d846f04..72c67a2 100644 (file)
@@ -13,14 +13,7 @@ description("Test IndexedDB cursor.update required arguments");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
-    shouldBeFalse("IDBKeyRange == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index ae19c97..2cca28e 100644 (file)
@@ -14,7 +14,8 @@ test();
 
 function test()
 {
-    request = evalAndLog("webkitIndexedDB.open('cursor-update')");
+    removeVendorPrefixes();
+    request = evalAndLog("indexedDB.open('cursor-update')");
     request.onsuccess = openSuccess;
     request.onerror = unexpectedErrorCallback;
 }
@@ -61,11 +62,11 @@ function setVersionSuccess()
 function openBasicCursor()
 {
     debug("openBasicCursor()");
-    evalAndLog("trans = db.transaction(['basicStore', 'autoIncrementStore', 'keyPathStore'], webkitIDBTransaction.READ_WRITE)");
+    evalAndLog("trans = db.transaction(['basicStore', 'autoIncrementStore', 'keyPathStore'], IDBTransaction.READ_WRITE)");
     trans.onabort = unexpectedAbortCallback;
     trans.oncomplete = transactionComplete;
 
-    keyRange = webkitIDBKeyRange.lowerBound("myKey1");
+    keyRange = IDBKeyRange.lowerBound("myKey1");
     window.objectStore = evalAndLog("trans.objectStore('basicStore')");
     request = evalAndLog("objectStore.openCursor(keyRange)");
     request.onsuccess = basicUpdateCursor;
@@ -99,7 +100,7 @@ function basicCheckCursor()
         shouldBe("counter", "5");
         counter = 1;
 
-        keyRange = webkitIDBKeyRange.lowerBound(1);
+        keyRange = IDBKeyRange.lowerBound(1);
         request = evalAndLog("trans.objectStore('autoIncrementStore').openCursor(keyRange)");
         request.onsuccess = autoIncrementUpdateCursor;
         request.onerror = unexpectedErrorCallback;
@@ -136,7 +137,7 @@ function autoIncrementCheckCursor()
         shouldBe("counter", "5");
         counter = 1;
 
-        keyRange = webkitIDBKeyRange.lowerBound(1);
+        keyRange = IDBKeyRange.lowerBound(1);
         request = evalAndLog("trans.objectStore('keyPathStore').openCursor(keyRange)");
         request.onsuccess = keyPathUpdateCursor;
         request.onerror = unexpectedErrorCallback;
@@ -161,7 +162,7 @@ function keyPathUpdateCursor()
         return;
     }
 
-    evalAndExpectException("event.target.result.update({id: 100 + counter, number: 100 + counter})", "webkitIDBDatabaseException.DATA_ERR");
+    evalAndExpectException("event.target.result.update({id: 100 + counter, number: 100 + counter})", "IDBDatabaseException.DATA_ERR");
 
     request = evalAndLog("event.target.result.update({id: counter, number: 100 + counter++})");
     request.onsuccess = function() { evalAndLog("event.target.source.continue()") };
@@ -175,7 +176,7 @@ function keyPathCheckCursor()
         shouldBe("counter", "5");
         counter = 1;
 
-        keyRange = webkitIDBKeyRange.lowerBound(101);
+        keyRange = IDBKeyRange.lowerBound(101);
         request = evalAndLog("trans.objectStore('keyPathStore').index('numberIndex').openKeyCursor(keyRange)");
         request.onsuccess = keyCursor;
         request.onerror = unexpectedErrorCallback;
@@ -206,7 +207,7 @@ function keyCursor()
         testFailed("Expected exception.");
     } catch (e) {
         code = e.code;
-        shouldBe("code", "webkitIDBDatabaseException.NOT_ALLOWED_ERR");
+        shouldBe("code", "IDBDatabaseException.NOT_ALLOWED_ERR");
     }
 
     counter++;
index 31b14a8..a3478f5 100644 (file)
@@ -3,7 +3,10 @@ Test that data inserted into IndexedDB does not get corrupted on disk.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-webkitIndexedDB.open('data-corruption')
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open('data-corruption')
 openSuccess():
 db = event.target.result
 db.setVersion('new version')
@@ -13,10 +16,10 @@ PASS trans !== null is true
 Deleted all object stores.
 db.createObjectStore('storeName')
 addData():
-transaction = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+transaction = db.transaction(['storeName'], IDBTransaction.READ_WRITE)
 request = transaction.objectStore('storeName').add({x: testDate}, 'key')
 addData():
-transaction = db.transaction(['storeName'], webkitIDBTransaction.READ_ONLY)
+transaction = db.transaction(['storeName'], IDBTransaction.READ_ONLY)
 request = transaction.objectStore('storeName').get('key')
 PASS event.target.result.x.toString() == testDate.toString() is true
 PASS successfullyParsed is true
index 0bfb157..cd056a2 100644 (file)
@@ -12,7 +12,8 @@ description("Test that data inserted into IndexedDB does not get corrupted on di
 
 function test()
 {
-    request = evalAndLog("webkitIndexedDB.open('data-corruption')");
+    removeVendorPrefixes();
+    request = evalAndLog("indexedDB.open('data-corruption')");
     request.onsuccess = openSuccess;
     request.onerror = unexpectedErrorCallback;
 }
@@ -45,7 +46,7 @@ var testDate = new Date('February 24, 1955 12:00:08');
 function addData()
 {
     debug("addData():");
-    var transaction = evalAndLog("transaction = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)");
+    var transaction = evalAndLog("transaction = db.transaction(['storeName'], IDBTransaction.READ_WRITE)");
     var request = evalAndLog("request = transaction.objectStore('storeName').add({x: testDate}, 'key')");
     request.onerror = unexpectedErrorCallback;
     transaction.oncomplete = getData;
@@ -54,7 +55,7 @@ function addData()
 function getData()
 {
     debug("addData():");
-    var transaction = evalAndLog("transaction = db.transaction(['storeName'], webkitIDBTransaction.READ_ONLY)");
+    var transaction = evalAndLog("transaction = db.transaction(['storeName'], IDBTransaction.READ_ONLY)");
     var request = evalAndLog("request = transaction.objectStore('storeName').get('key')");
     request.onerror = unexpectedErrorCallback;
     request.onsuccess = doCheck;
index 49d1cac..75be59b 100644 (file)
@@ -3,10 +3,9 @@ Test the basics of IndexedDB's IDBDatabase.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB
-PASS indexedDB != null is true
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException
-PASS IDBDatabaseException != null is true
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open('database-basics')
 db = event.target.result
 db.setVersion('new version')
index 8afc1ba..d029148 100644 (file)
@@ -12,10 +12,7 @@ description("Test the basics of IndexedDB's IDBDatabase.");
 
 function test()
 {
-    evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB");
-    shouldBeTrue("indexedDB != null");
-    evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException");
-    shouldBeTrue("IDBDatabaseException != null");
+    removeVendorPrefixes();
 
     request = evalAndLog("indexedDB.open('database-basics')");
     request.onsuccess = openSuccess;
index 3f3a8ab..86ef1f9 100644 (file)
@@ -3,14 +3,9 @@ Test IndexedDB undefined as record value
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
-PASS IDBKeyRange == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 PASS indexedDB.open(); threw exception TypeError: Not enough arguments.
 PASS successfullyParsed is true
 
index d6fc954..3f67a17 100644 (file)
@@ -13,15 +13,7 @@ description("Test IndexedDB undefined as record value");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
-    shouldBeFalse("IDBKeyRange == null");
-
+    removeVendorPrefixes();
     shouldThrow("indexedDB.open();");
     finishJSTest();
 }
index 091ce5b..e752ab2 100644 (file)
@@ -3,14 +3,9 @@ Test IndexedDB odd value datatypes
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
-PASS IDBKeyRange == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 opening a database named null
 indexedDB.open(testData[nextToOpen].name, testData[nextToOpen].description)
 opening a database named faihu
index 83d8e97..d18fbf8 100644 (file)
@@ -13,14 +13,7 @@ description("Test IndexedDB odd value datatypes");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
-    shouldBeFalse("IDBKeyRange == null");
+    removeVendorPrefixes();
 
     testData = [{ description: 'null',               name: '\u0000' },
                 { description: 'faihu',              name: '\ud800\udf46' },
index ef1cfbd..1fcdbc6 100644 (file)
@@ -3,7 +3,10 @@ Tests IndexedDB's quota enforcing mechanism.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-webkitIndexedDB.open('database-quota')
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open('database-quota')
 db = event.target.result
 db.setVersion('new version')
 setVersionSuccess():
@@ -21,7 +24,7 @@ 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([], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['test123'], IDBTransaction.READ_WRITE)
 Creating 'data' which contains 64K of data
 PASS data.length is 65536
 store = trans.objectStore('test123')
index 1617a7b..f1eae1a 100644 (file)
@@ -12,7 +12,8 @@ description("Tests IndexedDB's quota enforcing mechanism.");
 
 function test()
 {
-    request = evalAndLog("webkitIndexedDB.open('database-quota')");
+    removeVendorPrefixes();
+    request = evalAndLog("indexedDB.open('database-quota')");
     request.onsuccess = openSuccess;
     request.onerror = unexpectedErrorCallback;
 }
@@ -57,7 +58,7 @@ function checkObjectStore()
 
 function checkQuotaEnforcing()
 {
-    var trans = evalAndLog("trans = db.transaction(['test123'], webkitIDBTransaction.READ_WRITE)");
+    var trans = evalAndLog("trans = db.transaction(['test123'], IDBTransaction.READ_WRITE)");
     trans.onabort = testComplete;
     trans.oncomplete = unexpectedCompleteCallback;
     debug("Creating 'data' which contains 64K of data");
index f0a4b28..371472f 100644 (file)
@@ -3,8 +3,9 @@ Ensure that IDBDatabase objects are deleted when there are no retaining paths le
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 window.state = 'starting'
 indexedDB.open('delete-closed-database-object')
 db = event.target.result
index ab0f5cf..8fe858f 100644 (file)
@@ -12,8 +12,7 @@ description("Ensure that IDBDatabase objects are deleted when there are no retai
 
 
 function test() {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
+    removeVendorPrefixes();
     openDBConnection();
 }
 
index 84cb76c..5492560 100644 (file)
@@ -3,12 +3,9 @@ Test IndexedDB's IDBObjectStore.delete(IDBKeyRange) method.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB
-PASS indexedDB != null is true
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction
-PASS IDBTransaction != null is true
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange
-PASS IDBKeyRange != null is true
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 request = indexedDB.deleteDatabase('delete-range')
 request = indexedDB.open('delete-range')
 db = request.result
index 5cab905..6dab1ba 100644 (file)
@@ -12,12 +12,7 @@ description("Test IndexedDB's IDBObjectStore.delete(IDBKeyRange) method.");
 
 function test()
 {
-    evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB");
-    shouldBeTrue("indexedDB != null");
-    evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction");
-    shouldBeTrue("IDBTransaction != null");
-    evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange");
-    shouldBeTrue("IDBKeyRange != null");
+    removeVendorPrefixes();
 
     evalAndLog("request = indexedDB.deleteDatabase('delete-range')");
     request.onerror = unexpectedErrorCallback;
index 106b2ff..e0d76fd 100644 (file)
@@ -3,10 +3,9 @@ Test IndexedDB deleteIndex method
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open('deleteIndex')
 db = event.target.result
 request = db.setVersion('1')
index d847b5b..13ce1f3 100644 (file)
@@ -13,11 +13,7 @@ description("Test IndexedDB deleteIndex method");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-
+    removeVendorPrefixes();
     request = evalAndLog("indexedDB.open('deleteIndex')");
     request.onsuccess = openSuccess;
     request.onerror = unexpectedErrorCallback;
index a974fa4..ab6463c 100644 (file)
@@ -3,14 +3,9 @@ Test IndexedDB deleteObjectStore required argument
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
-PASS IDBKeyRange == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index 6b9d1ad..f6c5c6a 100644 (file)
@@ -13,14 +13,7 @@ description("Test IndexedDB deleteObjectStore required argument");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
-    shouldBeFalse("IDBKeyRange == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index a4e11e8..fdec05f 100644 (file)
@@ -3,14 +3,9 @@ Test IndexedDB deleteObjectStore required argument
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
-PASS IDBKeyRange == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index 56a621d..4651cf1 100644 (file)
@@ -13,14 +13,7 @@ description("Test IndexedDB deleteObjectStore required argument");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
-    shouldBeFalse("IDBKeyRange == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index c539769..00c7744 100644 (file)
@@ -3,7 +3,10 @@ Verify that you can put the same data in 2 different databases without uniquenes
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-webkitIndexedDB.open('duplicates-1')
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open('duplicates-1')
 db = event.target.result
 db.setVersion('new version')
 setVersionSuccess():
@@ -45,7 +48,7 @@ PASS event.target.result.value.x is "value2"
 PASS event.target.result.value.y is "zzz2"
 event.target.result.continue()
 PASS event.target.result === null is true
-webkitIndexedDB.open('duplicates-2')
+indexedDB.open('duplicates-2')
 db = event.target.result
 db.setVersion('new version')
 setVersionSuccess():
index 423607b..328f8f2 100644 (file)
@@ -14,9 +14,9 @@ testCount = 0;
 function test()
 {
     if (testCount++ == 0)
-        request = evalAndLog("webkitIndexedDB.open('duplicates-1')");
+        request = evalAndLog("indexedDB.open('duplicates-1')");
     else
-        request = evalAndLog("webkitIndexedDB.open('duplicates-2')");
+        request = evalAndLog("indexedDB.open('duplicates-2')");
     request.onsuccess = setVersion;
     request.onerror = unexpectedErrorCallback;
 }
@@ -167,6 +167,7 @@ function last()
         finishJSTest();
 }
 
+removeVendorPrefixes();
 test();
 
 
index 8a55d9f..5e8c279 100644 (file)
@@ -3,7 +3,10 @@ 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".
 
 
-webkitIndexedDB.open('error-causes-abort-by-default')
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open('error-causes-abort-by-default')
 db = event.target.result
 db.setVersion('new version')
 setVersionSuccess():
@@ -12,7 +15,7 @@ PASS trans !== null is true
 trans.oncomplete = addData
 Deleted all object stores.
 db.createObjectStore('storeName', null)
-trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)
 trans.onabort = unexpectedAbortCallback
 trans.oncomplete = transactionCompleted
 store = trans.objectStore('storeName')
@@ -22,7 +25,7 @@ event.preventDefault()
 PASS Transaction completed
 
 
-trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)
 trans.onabort = transactionAborted1
 trans.oncomplete = unexpectedCompleteCallback
 store = trans.objectStore('storeName')
@@ -31,7 +34,7 @@ Doing nothing to prevent the default action...
 PASS Transaction aborted
 
 
-trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)
 trans.onabort = transactionAborted2
 trans.oncomplete = unexpectedCompleteCallback
 store = trans.objectStore('storeName')
index 7c1025d..c6bc627 100644 (file)
@@ -12,7 +12,8 @@ description("Verify that a transaction with an error aborts unless preventDefaul
 
 function test()
 {
-    request = evalAndLog("webkitIndexedDB.open('error-causes-abort-by-default')");
+    removeVendorPrefixes();
+    request = evalAndLog("indexedDB.open('error-causes-abort-by-default')");
     request.onsuccess = setVersion;
     request.onerror = unexpectedErrorCallback;
 }
@@ -41,7 +42,7 @@ function deleteExisting()
 
 function addData()
 {
-    trans = evalAndLog("trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)");
+    trans = evalAndLog("trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)");
     evalAndLog("trans.onabort = unexpectedAbortCallback");
     evalAndLog("trans.oncomplete = transactionCompleted");
     store = evalAndLog("store = trans.objectStore('storeName')");
@@ -68,7 +69,7 @@ function transactionCompleted()
     testPassed("Transaction completed");
     debug("");
     debug("");
-    trans = evalAndLog("trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)");
+    trans = evalAndLog("trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)");
     evalAndLog("trans.onabort = transactionAborted1");
     evalAndLog("trans.oncomplete = unexpectedCompleteCallback");
     store = evalAndLog("store = trans.objectStore('storeName')");
@@ -87,7 +88,7 @@ function transactionAborted1()
     testPassed("Transaction aborted");
     debug("");
     debug("");
-    trans = evalAndLog("trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)");
+    trans = evalAndLog("trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)");
     evalAndLog("trans.onabort = transactionAborted2");
     evalAndLog("trans.oncomplete = unexpectedCompleteCallback");
     store = evalAndLog("store = trans.objectStore('storeName')");
index 04becde..e7277db 100644 (file)
@@ -1,11 +1,14 @@
-CONSOLE MESSAGE: line 61: Uncaught this exception is expected
-CONSOLE MESSAGE: line 61: Uncaught this exception is expected
+CONSOLE MESSAGE: line 62: Uncaught this exception is expected
+CONSOLE MESSAGE: line 62: Uncaught this exception is expected
 Test exceptions in IDBRequest handlers cause aborts.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-webkitIndexedDB.open('exception-in-event-aborts')
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open('exception-in-event-aborts')
 db = event.target.result
 db.setVersion('new version')
 setVersionSuccess():
@@ -16,7 +19,7 @@ Deleted all object stores.
 store = db.createObjectStore('storeName', null)
 store.add({x: 'value', y: 'zzz'}, 'key')
 
-trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)
 trans.onabort = transactionAborted1
 trans.oncomplete = unexpectedCompleteCallback
 store = trans.objectStore('storeName')
@@ -27,7 +30,7 @@ Throwing
 
 PASS Got expected error: 'this exception is expected'
 PASS The transaction was aborted.
-trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)
 trans.onabort = transactionAborted2
 trans.oncomplete = unexpectedCompleteCallback
 store = trans.objectStore('storeName')
@@ -38,7 +41,7 @@ Throwing
 
 PASS Got expected error: 'this exception is expected'
 PASS The transaction was aborted.
-trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)
 trans.onabort = unexpectedAbortCallback
 trans.oncomplete = transactionCompleted1
 store = trans.objectStore('storeName')
@@ -48,7 +51,7 @@ event.preventDefault()
 Throwing within a try block
 
 PASS The transaction completed.
-trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)
 trans.onabort = unexpectedAbortCallback
 trans.oncomplete = transactionCompleted2
 store = trans.objectStore('storeName')
index a2dc2c2..8a217a3 100644 (file)
@@ -12,7 +12,8 @@ description("Test exceptions in IDBRequest handlers cause aborts.");
 
 function test()
 {
-    request = evalAndLog("webkitIndexedDB.open('exception-in-event-aborts')");
+    removeVendorPrefixes();
+    request = evalAndLog("indexedDB.open('exception-in-event-aborts')");
     request.onsuccess = setVersion;
     request.onerror = unexpectedErrorCallback;
 }
@@ -44,7 +45,7 @@ function deleteExisting()
 function startTest()
 {
     debug("");
-    trans = evalAndLog("trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)");
+    trans = evalAndLog("trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)");
     evalAndLog("trans.onabort = transactionAborted1");
     evalAndLog("trans.oncomplete = unexpectedCompleteCallback");
     store = evalAndLog("store = trans.objectStore('storeName')");
@@ -66,7 +67,7 @@ function transactionAborted1()
     debug("");
     shouldHaveHadError("this exception is expected");
     testPassed("The transaction was aborted.");
-    trans = evalAndLog("trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)");
+    trans = evalAndLog("trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)");
     evalAndLog("trans.onabort = transactionAborted2");
     evalAndLog("trans.oncomplete = unexpectedCompleteCallback");
     store = evalAndLog("store = trans.objectStore('storeName')");
@@ -80,7 +81,7 @@ function transactionAborted2()
     debug("");
     shouldHaveHadError("this exception is expected");
     testPassed("The transaction was aborted.");
-    trans = evalAndLog("trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)");
+    trans = evalAndLog("trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)");
     evalAndLog("trans.onabort = unexpectedAbortCallback");
     evalAndLog("trans.oncomplete = transactionCompleted1");
     store = evalAndLog("store = trans.objectStore('storeName')");
@@ -105,7 +106,7 @@ function transactionCompleted1()
 {
     debug("");
     testPassed("The transaction completed.");
-    trans = evalAndLog("trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)");
+    trans = evalAndLog("trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)");
     evalAndLog("trans.onabort = unexpectedAbortCallback");
     evalAndLog("trans.oncomplete = transactionCompleted2");
     store = evalAndLog("store = trans.objectStore('storeName')");
index cb85b76..055c7ff 100644 (file)
@@ -3,8 +3,9 @@ Test the basics of IndexedDB's IDBFactory.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 PASS typeof indexedDB.open === 'function' is true
 PASS typeof indexedDB.cmp === 'function' is true
 PASS typeof indexedDB.getDatabaseNames === 'function' is true
index 6afec0f..a517ede 100644 (file)
@@ -12,8 +12,7 @@ description("Test the basics of IndexedDB's IDBFactory.");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
+    removeVendorPrefixes();
 
     shouldBeTrue("typeof indexedDB.open === 'function'");
     shouldBeTrue("typeof indexedDB.cmp === 'function'");
index 5b7c4c3..e382f5d 100644 (file)
@@ -3,10 +3,9 @@ Test IndexedDB key comparison using IDBFactory.cmp().
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 PASS typeof indexedDB.cmp === 'function' is true
 
 compare valid keys
index 79f460f..f9fbef6 100644 (file)
@@ -12,10 +12,7 @@ description("Test IndexedDB key comparison using IDBFactory.cmp().");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
+    removeVendorPrefixes();
 
     shouldBeTrue("typeof indexedDB.cmp === 'function'");
 
index 46217f7..330ac86 100644 (file)
@@ -3,7 +3,10 @@ Test IndexedDB's webkitIndexedDB.deleteDatabase().
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-webkitIndexedDB.open('database-to-delete')
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open('database-to-delete')
 db = event.target.result
 db.setVersion('new version')
 trans = event.target.result
@@ -12,13 +15,13 @@ store = db.createObjectStore('storeName', null)
 store.createIndex('indexName', '')
 PASS store.indexNames.contains('indexName') is true
 store.add('value', 'key')
-db.transaction('storeName', webkitIDBTransaction.READ_WRITE)
+db.transaction('storeName', IDBTransaction.READ_WRITE)
 store = transaction.objectStore('storeName')
 store.get('key')
 PASS event.target.result is "value"
 db.setVersion('new version')
-request = webkitIndexedDB.deleteDatabase('database-to-delete')
-webkitIndexedDB.open('database-to-delete')
+request = indexedDB.deleteDatabase('database-to-delete')
+indexedDB.open('database-to-delete')
 db = event.target.result
 db.setVersion('new version')
 PASS db.objectStoreNames.length is 0
index e048ff9..c9a5adc 100644 (file)
@@ -3,8 +3,9 @@ Test the deleteDatabase call and its interaction with open/setVersion
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 
 TEST: deleteDatabase blocked on open handles
 window.dbname = 'test1'; window.ver = 1; window.steps = []
index c3b9174..1c21aef 100644 (file)
@@ -98,8 +98,7 @@ function runSteps(commands) {
 }
 
 function test() {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
+    removeVendorPrefixes();
     test1();
 }
 
index 467e1f0..47b6a9e 100644 (file)
@@ -12,7 +12,8 @@ description("Test IndexedDB's webkitIndexedDB.deleteDatabase().");
 
 function test()
 {
-    request = evalAndLog("webkitIndexedDB.open('database-to-delete')");
+    removeVendorPrefixes();
+    request = evalAndLog("indexedDB.open('database-to-delete')");
     request.onsuccess = startSetVersion;
     request.onerror = unexpectedErrorCallback;
 }
@@ -43,7 +44,7 @@ function deleteExisting()
 
 function getValue()
 {
-    transaction = evalAndLog("db.transaction('storeName', webkitIDBTransaction.READ_WRITE)");
+    transaction = evalAndLog("db.transaction('storeName', IDBTransaction.READ_WRITE)");
     transaction.onabort = unexpectedErrorCallback;
     var store = evalAndLog("store = transaction.objectStore('storeName')");
 
@@ -64,14 +65,14 @@ function addIndex()
 function deleteDatabase()
 {
     db.onversionchange = function() { db.close(); }
-    request = evalAndLog("request = webkitIndexedDB.deleteDatabase('database-to-delete')");
+    request = evalAndLog("request = indexedDB.deleteDatabase('database-to-delete')");
     request.onsuccess = reopenDatabase;
     request.onerror = unexpectedErrorCallback;
 }
 
 function reopenDatabase()
 {
-    request = evalAndLog("webkitIndexedDB.open('database-to-delete')");
+    request = evalAndLog("indexedDB.open('database-to-delete')");
     request.onsuccess = startSetVersionAgain;
     request.onerror = unexpectedErrorCallback;
 }
index 0a8514f..8dc4874 100644 (file)
@@ -3,7 +3,10 @@ Test the basics of IndexedDB's webkitIDBIndex.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-webkitIndexedDB.open('index-basics')
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open('index-basics')
 db = event.target.result
 db.setVersion('new version')
 setVersionSuccess():
index 159b395..4ba1093 100644 (file)
@@ -4,7 +4,10 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 Starting worker: resources/index-basics.js
-[Worker] webkitIndexedDB.open('index-basics')
+[Worker] indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS [Worker] Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+[Worker] 
+[Worker] indexedDB.open('index-basics')
 [Worker] db = event.target.result
 [Worker] db.setVersion('new version')
 [Worker] setVersionSuccess():
index 00fa4a4..8a87503 100644 (file)
@@ -3,10 +3,9 @@ Test IndexedDB's IDBIndex.count().
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-window.indexedDB = window.indexedDB || window.webkitIndexedDB
-window.IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction
-window.IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange
-window.IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open('index-count')
 db = event.target.result
 db.setVersion('new version')
index 65aa5d2..938b739 100644 (file)
@@ -12,10 +12,7 @@ description("Test IndexedDB's IDBIndex.count().");
 
 function test()
 {
-    evalAndLog("window.indexedDB = window.indexedDB || window.webkitIndexedDB");
-    evalAndLog("window.IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction");
-    evalAndLog("window.IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange");
-    evalAndLog("window.IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException");
+    removeVendorPrefixes();
     request = evalAndLog("indexedDB.open('index-count')");
     request.onerror = unexpectedErrorCallback;
     request.onsuccess = function() {
index 800a5cc..3714109 100644 (file)
@@ -3,7 +3,10 @@ Test IndexedDB's webkitIDBIndex.openCursor + the cursor it produces in depth.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-webkitIndexedDB.open('index-cursor')
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open('index-cursor')
 db = event.target.result
 db.setVersion('new version')
 trans = event.target.result
index b653c00..f1d036e 100644 (file)
@@ -25,7 +25,7 @@ window.testData = [
  
 function openDatabase()
 {
-    result = evalAndLog("webkitIndexedDB.open('index-cursor')");
+    result = evalAndLog("indexedDB.open('index-cursor')");
     result.onsuccess = setVersion;
     result.onerror = unexpectedErrorCallback;
 }
@@ -172,13 +172,13 @@ function runNextTest()
 
     var keyRange;
     if (lower !== null && upper !== null)
-        keyRange = webkitIDBKeyRange.bound(testData[lower], testData[upper], lowerIsOpen, upperIsOpen);
+        keyRange = IDBKeyRange.bound(testData[lower], testData[upper], lowerIsOpen, upperIsOpen);
     else if (lower !== null)
-        keyRange = webkitIDBKeyRange.lowerBound(testData[lower], lowerIsOpen);
+        keyRange = IDBKeyRange.lowerBound(testData[lower], lowerIsOpen);
     else
-        keyRange = webkitIDBKeyRange.upperBound(testData[upper], upperIsOpen);
+        keyRange = IDBKeyRange.upperBound(testData[upper], upperIsOpen);
  
-    var request = indexObject.openKeyCursor(keyRange, ascending ? webkitIDBCursor.NEXT : webkitIDBCursor.PREV);
+    var request = indexObject.openKeyCursor(keyRange, ascending ? IDBCursor.NEXT : IDBCursor.PREV);
     request.onsuccess = cursorIteration;
     request.onerror = unexpectedErrorCallback;
 }
@@ -245,11 +245,12 @@ function testNullKeyRange()
     debug("");
     debug(str);
  
-    var request = indexObject.openKeyCursor(null, ascending ? webkitIDBCursor.NEXT : webkitIDBCursor.PREV);
+    var request = indexObject.openKeyCursor(null, ascending ? IDBCursor.NEXT : IDBCursor.PREV);
     request.onsuccess = cursorIteration;
     request.onerror = unexpectedErrorCallback;
 }
  
+removeVendorPrefixes();
 openDatabase(); // The first step.
  
 </script>
index 14787e4..feda135 100644 (file)
@@ -3,14 +3,9 @@ Test IndexedDB index .get() required argument
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
-PASS IDBKeyRange == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index e236d9c..2e26a1c 100644 (file)
@@ -13,14 +13,7 @@ description("Test IndexedDB index .get() required argument");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
-    shouldBeFalse("IDBKeyRange == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index 93b89b8..e0aa6ac 100644 (file)
@@ -3,10 +3,9 @@ Test features of IndexedDB's multiEntry indices.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-window.indexedDB = window.indexedDB || window.webkitIndexedDB
-PASS indexedDB != null is true
-window.IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction
-PASS IDBTransaction != null is true
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open('index-multiEntry')
 db = event.target.result
 db.setVersion('1')
index 9f96eff..3703651 100644 (file)
@@ -12,10 +12,7 @@ description("Test features of IndexedDB's multiEntry indices.");
 
 function test()
 {
-    evalAndLog("window.indexedDB = window.indexedDB || window.webkitIndexedDB");
-    shouldBeTrue("indexedDB != null");
-    evalAndLog("window.IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction");
-    shouldBeTrue("IDBTransaction != null");
+    removeVendorPrefixes();
 
     request = evalAndLog("indexedDB.open('index-multiEntry')");
     request.onerror = unexpectedErrorCallback;
index 12b2cab..c8b8e5e 100644 (file)
@@ -3,12 +3,9 @@ Test IndexedDB index population.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB
-PASS indexedDB != null is true
-IDBIndex = window.IDBIndex || window.webkitIDBIndex
-PASS IDBIndex != null is true
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange
-PASS IDBKeyRange != null is true
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.deleteDatabase('index-population')
 indexedDB.open('index-population')
 
index 292a8cf..d78d8a0 100644 (file)
@@ -12,12 +12,7 @@ description("Test IndexedDB index population.");
 
 function test()
 {
-    evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB");
-    shouldBeTrue("indexedDB != null");
-    evalAndLog("IDBIndex = window.IDBIndex || window.webkitIDBIndex");
-    shouldBeTrue("IDBIndex != null");
-    evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange");
-    shouldBeTrue("IDBKeyRange != null");
+    removeVendorPrefixes();
 
     request = evalAndLog("indexedDB.deleteDatabase('index-population')");
     request.onsuccess = deleteSuccess;
index b1a0273..35ce055 100644 (file)
@@ -3,7 +3,10 @@ Test features of IndexedDB's unique indices.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-webkitIndexedDB.open('index-unique')
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open('index-unique')
 db = event.target.result
 db.setVersion('new version')
 deleteExisting():
@@ -13,19 +16,19 @@ Deleted all object stores.
 db.createObjectStore('store')
 store.createIndex('index', 'x', {unique: true})
 setVersionCompleted():
-transaction = db.transaction(['store'], webkitIDBTransaction.READ_WRITE)
+transaction = db.transaction(['store'], IDBTransaction.READ_WRITE)
 transaction.objectStore('store').put({x: 1}, 'foo')
 addMoreData():
 transaction.objectStore('store').put({x: 1}, 'bar')
 addMoreDataFailed():
 event.preventDefault()
-PASS event.target.errorCode is webkitIDBDatabaseException.CONSTRAINT_ERR
+PASS event.target.errorCode is IDBDatabaseException.CONSTRAINT_ERR
 transaction.objectStore('store').put({x: 0}, 'foo')
 changeDataSuccess():
-transaction.objectStore('store').index('index').openCursor(webkitIDBKeyRange.lowerBound(1))
+transaction.objectStore('store').index('index').openCursor(IDBKeyRange.lowerBound(1))
 cursorSuccess():
 PASS event.target.result is null
-transaction.objectStore('store').index('index').openKeyCursor(webkitIDBKeyRange.lowerBound(1))
+transaction.objectStore('store').index('index').openKeyCursor(IDBKeyRange.lowerBound(1))
 keyCursorSuccess():
 PASS event.target.result is null
 transaction.objectStore('store').put({x: 1}, 'bar')
index 38a62e4..a3d2803 100644 (file)
@@ -12,7 +12,8 @@ description("Test features of IndexedDB's unique indices.");
 
 function test()
 {
-    request = evalAndLog("webkitIndexedDB.open('index-unique')");
+    removeVendorPrefixes();
+    request = evalAndLog("indexedDB.open('index-unique')");
     request.onsuccess = setVersion;
     request.onerror = unexpectedErrorCallback;
 }
@@ -45,7 +46,7 @@ function deleteExisting()
 function setVersionCompleted()
 {
     debug("setVersionCompleted():");
-    window.transaction = evalAndLog("transaction = db.transaction(['store'], webkitIDBTransaction.READ_WRITE)");
+    window.transaction = evalAndLog("transaction = db.transaction(['store'], IDBTransaction.READ_WRITE)");
 
     request = evalAndLog("transaction.objectStore('store').put({x: 1}, 'foo')");
     request.onerror = unexpectedErrorCallback;
@@ -69,7 +70,7 @@ function addMoreDataFailed()
     // Don't abort the transaction.
     evalAndLog("event.preventDefault()");
 
-    shouldBe("event.target.errorCode", "webkitIDBDatabaseException.CONSTRAINT_ERR");
+    shouldBe("event.target.errorCode", "IDBDatabaseException.CONSTRAINT_ERR");
 
     // Update the 'foo' entry in object store, changing the value of x.
     request = evalAndLog("transaction.objectStore('store').put({x: 0}, 'foo')");
@@ -82,7 +83,7 @@ function changeDataSuccess()
     debug("changeDataSuccess():");
 
     // An index cursor starting at 1 should not find anything.
-    var request = evalAndLog("transaction.objectStore('store').index('index').openCursor(webkitIDBKeyRange.lowerBound(1))");
+    var request = evalAndLog("transaction.objectStore('store').index('index').openCursor(IDBKeyRange.lowerBound(1))");
     request.onsuccess = cursorSuccess;
     request.onerror = unexpectedErrorCallback;
 }
@@ -93,7 +94,7 @@ function cursorSuccess()
     shouldBe("event.target.result", "null");
 
     // A key cursor starting at 1 should not find anything.
-    var request = evalAndLog("transaction.objectStore('store').index('index').openKeyCursor(webkitIDBKeyRange.lowerBound(1))");
+    var request = evalAndLog("transaction.objectStore('store').index('index').openKeyCursor(IDBKeyRange.lowerBound(1))");
     request.onsuccess = keyCursorSuccess;
     request.onerror = unexpectedErrorCallback;
 }
index 687c92f..358c679 100644 (file)
@@ -3,10 +3,9 @@ Test IndexedDB invalid keys
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index 87e45da..422389a 100644 (file)
@@ -13,10 +13,7 @@ description("Test IndexedDB invalid keys");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index 509d248..8dd0827 100644 (file)
@@ -3,12 +3,9 @@ Test IndexedDB's key generator behavior.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB
-PASS indexedDB != null is true
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction
-PASS IDBTransaction != null is true
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange
-PASS IDBKeyRange != null is true
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 
 Verify that each object store has an independent key generator.
 request = indexedDB.deleteDatabase('key-generator')
index 55a1345..49ab62c 100644 (file)
@@ -12,12 +12,7 @@ description("Test IndexedDB's key generator behavior.");
 
 function test()
 {
-    evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB");
-    shouldBeTrue("indexedDB != null");
-    evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction");
-    shouldBeTrue("IDBTransaction != null");
-    evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange");
-    shouldBeTrue("IDBKeyRange != null");
+    removeVendorPrefixes();
 
     runTests();
 }
index fe15e6f..fe5bf75 100644 (file)
@@ -3,14 +3,9 @@ Test IndexedDB key comparison
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
-PASS IDBKeyRange == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index dde0e0c..38513c2 100644 (file)
@@ -13,14 +13,7 @@ description("Test IndexedDB key comparison");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
-    shouldBeFalse("IDBKeyRange == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index be2d714..c53cdeb 100644 (file)
@@ -3,14 +3,9 @@ Test IndexedDB key comparison
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
-PASS IDBKeyRange == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index c719ad1..ac7b36a 100644 (file)
@@ -13,14 +13,7 @@ description("Test IndexedDB key comparison");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
-    shouldBeFalse("IDBKeyRange == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index dab19fe..453d590 100644 (file)
@@ -3,11 +3,12 @@ Test IndexedDB key types
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+IDBTransaction = window.IDBTransaction || window.IDBTransaction;
 PASS IDBTransaction == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
+IDBDatabaseException = window.IDBDatabaseException || window.IDBDatabaseException;
 PASS IDBDatabaseException == null is false
 indexedDB.open(name, description)
 db = openreq.result
index e165032..8028702 100644 (file)
@@ -13,13 +13,12 @@ description("Test IndexedDB key types");
 
 function test()
 {
-    evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
+    removeVendorPrefixes();
 
-    evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;");
+    evalAndLog("IDBTransaction = window.IDBTransaction || window.IDBTransaction;");
     shouldBeFalse("IDBTransaction == null");
 
-    evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
+    evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.IDBDatabaseException;");
     shouldBeFalse("IDBDatabaseException == null");
 
 
index 48de3e3..3e196f5 100644 (file)
@@ -3,14 +3,9 @@ Test IndexedDB key types
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
-PASS IDBKeyRange == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index 7241f7b..bae3cb0 100644 (file)
@@ -13,14 +13,7 @@ description("Test IndexedDB key types");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
-    shouldBeFalse("IDBKeyRange == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index a35c91e..18e814c 100644 (file)
@@ -3,14 +3,9 @@ Test for valid and invalid keypaths
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
-PASS IDBKeyRange == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index 223d64f..552b8f7 100644 (file)
@@ -13,15 +13,7 @@ description("Test for valid and invalid keypaths");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
-    shouldBeFalse("IDBKeyRange == null");
-
+    removeVendorPrefixes();
     name = window.location.pathname;
     description = "My Test Database";
     request = evalAndLog("indexedDB.open(name, description)");
index 92d2ae9..4bf44f9 100644 (file)
@@ -3,12 +3,9 @@ Test IndexedDB keyPath edge cases
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
-PASS IDBTransaction == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.deleteDatabase('keypath-edges')
 indexedDB.open('keypath-edges')
 
index ed8a268..cfc3690 100644 (file)
@@ -13,12 +13,7 @@ description("Test IndexedDB keyPath edge cases");
 
 function test()
 {
-    evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;");
-    shouldBeFalse("IDBTransaction == null");
+    removeVendorPrefixes();
 
     request = evalAndLog("indexedDB.deleteDatabase('keypath-edges')");
     request.onerror = unexpectedErrorCallback;
index 06d1d3e..69ca3a8 100644 (file)
@@ -3,14 +3,9 @@ Test IndexedDB keyPaths
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
-PASS IDBKeyRange == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index 965ecb8..9a69761 100644 (file)
@@ -13,14 +13,7 @@ description("Test IndexedDB keyPaths");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
-    shouldBeFalse("IDBKeyRange == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index 23657a7..e518362 100644 (file)
@@ -3,16 +3,19 @@ Test IndexedDB's KeyRange.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS 'lower' in webkitIDBKeyRange is false
-PASS 'upper' in webkitIDBKeyRange is false
-PASS 'lowerOpen' in webkitIDBKeyRange is false
-PASS 'upperOpen' in webkitIDBKeyRange is false
-PASS 'only' in webkitIDBKeyRange is true
-PASS 'lowerBound' in webkitIDBKeyRange is true
-PASS 'upperBound' in webkitIDBKeyRange is true
-PASS 'bound' in webkitIDBKeyRange is true
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
 
-instance = webkitIDBKeyRange.only(1)
+PASS 'lower' in IDBKeyRange is false
+PASS 'upper' in IDBKeyRange is false
+PASS 'lowerOpen' in IDBKeyRange is false
+PASS 'upperOpen' in IDBKeyRange is false
+PASS 'only' in IDBKeyRange is true
+PASS 'lowerBound' in IDBKeyRange is true
+PASS 'upperBound' in IDBKeyRange is true
+PASS 'bound' in IDBKeyRange is true
+
+instance = IDBKeyRange.only(1)
 PASS 'lower' in instance is true
 PASS 'upper' in instance is true
 PASS 'lowerOpen' in instance is true
@@ -22,187 +25,187 @@ PASS 'lowerBound' in instance is false
 PASS 'upperBound' in instance is false
 PASS 'bound' in instance is false
 
-webkitIDBKeyRange.only(1)
+IDBKeyRange.only(1)
 PASS keyRange.lower is 1
 PASS keyRange.upper is 1
 PASS keyRange.lowerOpen is false
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.only(3.14)
+IDBKeyRange.only(3.14)
 PASS keyRange.lower is 3.14
 PASS keyRange.upper is 3.14
 PASS keyRange.lowerOpen is false
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.only('a')
+IDBKeyRange.only('a')
 PASS keyRange.lower is 'a'
 PASS keyRange.upper is 'a'
 PASS keyRange.lowerOpen is false
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.lowerBound(10,true)
+IDBKeyRange.lowerBound(10,true)
 PASS keyRange.lower is 10
 PASS keyRange.lowerOpen is true
 PASS keyRange.upper is null
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.lowerBound(11,false)
+IDBKeyRange.lowerBound(11,false)
 PASS keyRange.lower is 11
 PASS keyRange.lowerOpen is false
 PASS keyRange.upper is null
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.lowerBound(12,undefined)
+IDBKeyRange.lowerBound(12,undefined)
 PASS keyRange.lower is 12
 PASS keyRange.lowerOpen is false
 PASS keyRange.upper is null
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.lowerBound(10.1,true)
+IDBKeyRange.lowerBound(10.1,true)
 PASS keyRange.lower is 10.1
 PASS keyRange.lowerOpen is true
 PASS keyRange.upper is null
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.lowerBound(11.2,false)
+IDBKeyRange.lowerBound(11.2,false)
 PASS keyRange.lower is 11.2
 PASS keyRange.lowerOpen is false
 PASS keyRange.upper is null
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.lowerBound(12.3,undefined)
+IDBKeyRange.lowerBound(12.3,undefined)
 PASS keyRange.lower is 12.3
 PASS keyRange.lowerOpen is false
 PASS keyRange.upper is null
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.lowerBound('aa',true)
+IDBKeyRange.lowerBound('aa',true)
 PASS keyRange.lower is 'aa'
 PASS keyRange.lowerOpen is true
 PASS keyRange.upper is null
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.lowerBound('ab',false)
+IDBKeyRange.lowerBound('ab',false)
 PASS keyRange.lower is 'ab'
 PASS keyRange.lowerOpen is false
 PASS keyRange.upper is null
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.lowerBound('ac',undefined)
+IDBKeyRange.lowerBound('ac',undefined)
 PASS keyRange.lower is 'ac'
 PASS keyRange.lowerOpen is false
 PASS keyRange.upper is null
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.upperBound(20,true)
+IDBKeyRange.upperBound(20,true)
 PASS keyRange.upper is 20
 PASS keyRange.upperOpen is true
 PASS keyRange.lower is null
 PASS keyRange.lowerOpen is false
-webkitIDBKeyRange.upperBound(21,false)
+IDBKeyRange.upperBound(21,false)
 PASS keyRange.upper is 21
 PASS keyRange.upperOpen is false
 PASS keyRange.lower is null
 PASS keyRange.lowerOpen is false
-webkitIDBKeyRange.upperBound(22,undefined)
+IDBKeyRange.upperBound(22,undefined)
 PASS keyRange.upper is 22
 PASS keyRange.upperOpen is false
 PASS keyRange.lower is null
 PASS keyRange.lowerOpen is false
-webkitIDBKeyRange.upperBound(20.2,true)
+IDBKeyRange.upperBound(20.2,true)
 PASS keyRange.upper is 20.2
 PASS keyRange.upperOpen is true
 PASS keyRange.lower is null
 PASS keyRange.lowerOpen is false
-webkitIDBKeyRange.upperBound(21.3,false)
+IDBKeyRange.upperBound(21.3,false)
 PASS keyRange.upper is 21.3
 PASS keyRange.upperOpen is false
 PASS keyRange.lower is null
 PASS keyRange.lowerOpen is false
-webkitIDBKeyRange.upperBound(22.4,undefined)
+IDBKeyRange.upperBound(22.4,undefined)
 PASS keyRange.upper is 22.4
 PASS keyRange.upperOpen is false
 PASS keyRange.lower is null
 PASS keyRange.lowerOpen is false
-webkitIDBKeyRange.upperBound('ba',true)
+IDBKeyRange.upperBound('ba',true)
 PASS keyRange.upper is 'ba'
 PASS keyRange.upperOpen is true
 PASS keyRange.lower is null
 PASS keyRange.lowerOpen is false
-webkitIDBKeyRange.upperBound('bb',false)
+IDBKeyRange.upperBound('bb',false)
 PASS keyRange.upper is 'bb'
 PASS keyRange.upperOpen is false
 PASS keyRange.lower is null
 PASS keyRange.lowerOpen is false
-webkitIDBKeyRange.upperBound('bc',undefined)
+IDBKeyRange.upperBound('bc',undefined)
 PASS keyRange.upper is 'bc'
 PASS keyRange.upperOpen is false
 PASS keyRange.lower is null
 PASS keyRange.lowerOpen is false
-webkitIDBKeyRange.bound(30,40, undefined, undefined)
+IDBKeyRange.bound(30,40, undefined, undefined)
 PASS keyRange.lower is 30
 PASS keyRange.upper is 40
 PASS keyRange.lowerOpen is false
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.bound(31,41, false, false)
+IDBKeyRange.bound(31,41, false, false)
 PASS keyRange.lower is 31
 PASS keyRange.upper is 41
 PASS keyRange.lowerOpen is false
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.bound(32,42, false, true)
+IDBKeyRange.bound(32,42, false, true)
 PASS keyRange.lower is 32
 PASS keyRange.upper is 42
 PASS keyRange.lowerOpen is false
 PASS keyRange.upperOpen is true
-webkitIDBKeyRange.bound(33,43, true, false)
+IDBKeyRange.bound(33,43, true, false)
 PASS keyRange.lower is 33
 PASS keyRange.upper is 43
 PASS keyRange.lowerOpen is true
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.bound(34,44, true, true)
+IDBKeyRange.bound(34,44, true, true)
 PASS keyRange.lower is 34
 PASS keyRange.upper is 44
 PASS keyRange.lowerOpen is true
 PASS keyRange.upperOpen is true
-webkitIDBKeyRange.bound(30.1,40.2, undefined, undefined)
+IDBKeyRange.bound(30.1,40.2, undefined, undefined)
 PASS keyRange.lower is 30.1
 PASS keyRange.upper is 40.2
 PASS keyRange.lowerOpen is false
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.bound(31.3,41.4, false, false)
+IDBKeyRange.bound(31.3,41.4, false, false)
 PASS keyRange.lower is 31.3
 PASS keyRange.upper is 41.4
 PASS keyRange.lowerOpen is false
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.bound(32.5,42.6, false, true)
+IDBKeyRange.bound(32.5,42.6, false, true)
 PASS keyRange.lower is 32.5
 PASS keyRange.upper is 42.6
 PASS keyRange.lowerOpen is false
 PASS keyRange.upperOpen is true
-webkitIDBKeyRange.bound(33.7,43.8, true, false)
+IDBKeyRange.bound(33.7,43.8, true, false)
 PASS keyRange.lower is 33.7
 PASS keyRange.upper is 43.8
 PASS keyRange.lowerOpen is true
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.bound(34.9,44, true, true)
+IDBKeyRange.bound(34.9,44, true, true)
 PASS keyRange.lower is 34.9
 PASS keyRange.upper is 44
 PASS keyRange.lowerOpen is true
 PASS keyRange.upperOpen is true
-webkitIDBKeyRange.bound('aaa','aba', false, false)
+IDBKeyRange.bound('aaa','aba', false, false)
 PASS keyRange.lower is 'aaa'
 PASS keyRange.upper is 'aba'
 PASS keyRange.lowerOpen is false
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.bound('aab','abb', undefined, undefined)
+IDBKeyRange.bound('aab','abb', undefined, undefined)
 PASS keyRange.lower is 'aab'
 PASS keyRange.upper is 'abb'
 PASS keyRange.lowerOpen is false
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.bound('aac','abc', false, false)
+IDBKeyRange.bound('aac','abc', false, false)
 PASS keyRange.lower is 'aac'
 PASS keyRange.upper is 'abc'
 PASS keyRange.lowerOpen is false
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.bound('aad','abd', false, true)
+IDBKeyRange.bound('aad','abd', false, true)
 PASS keyRange.lower is 'aad'
 PASS keyRange.upper is 'abd'
 PASS keyRange.lowerOpen is false
 PASS keyRange.upperOpen is true
-webkitIDBKeyRange.bound('aae','abe', true, false)
+IDBKeyRange.bound('aae','abe', true, false)
 PASS keyRange.lower is 'aae'
 PASS keyRange.upper is 'abe'
 PASS keyRange.lowerOpen is true
 PASS keyRange.upperOpen is false
-webkitIDBKeyRange.bound('aaf','abf', true, true)
+IDBKeyRange.bound('aaf','abf', true, true)
 PASS keyRange.lower is 'aaf'
 PASS keyRange.upper is 'abf'
 PASS keyRange.lowerOpen is true
@@ -220,21 +223,21 @@ PASS Caught exception: Error: DATA_ERR: DOM IDBDatabase Exception 5
 Passing an invalid key into bound({}, {})
 PASS Caught exception: Error: DATA_ERR: DOM IDBDatabase Exception 5
 Lower key greater than higher key, bound(4, 3)
-Expecting exception from webkitIDBKeyRange.bound(4, 3)
+Expecting exception from IDBKeyRange.bound(4, 3)
 PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
 Equal keys, either of the bounds is open, bound(4, 4, true, false)
-Expecting exception from webkitIDBKeyRange.bound(4, 4, true, false)
+Expecting exception from IDBKeyRange.bound(4, 4, true, false)
 PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
 Equal keys, either of the bounds is open, bound(4, 4, false, true)
-Expecting exception from webkitIDBKeyRange.bound(4, 4, false, true)
+Expecting exception from IDBKeyRange.bound(4, 4, false, true)
 PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
 Equal keys, either of the bounds is open, bound(4, 4, true, true)
-Expecting exception from webkitIDBKeyRange.bound(4, 4, true, true)
+Expecting exception from IDBKeyRange.bound(4, 4, true, true)
 PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
 Equal keys, none of the bounds is open, bound(4, 4, false, false)
 PASS successfullyParsed is true
 
index b5643a6..4cad9d3 100644 (file)
@@ -3,14 +3,9 @@ Test IndexedDB keyrange required arguments
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
-PASS IDBKeyRange == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 PASS IDBKeyRange.only(); threw exception TypeError: Not enough arguments.
 PASS IDBKeyRange.lowerBound(); threw exception TypeError: Not enough arguments.
 PASS IDBKeyRange.upperBound(); threw exception TypeError: Not enough arguments.
index 06287cc..0a04b2c 100644 (file)
@@ -13,14 +13,7 @@ description("Test IndexedDB keyrange required arguments");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
-    shouldBeFalse("IDBKeyRange == null");
+    removeVendorPrefixes();
 
     shouldThrow("IDBKeyRange.only();");
     shouldThrow("IDBKeyRange.lowerBound();");
index 7b00194..ada8270 100644 (file)
@@ -12,7 +12,7 @@ description("Test IndexedDB's KeyRange.");
 
 function checkSingleKeyRange(value)
 {
-    keyRange = evalAndLog("webkitIDBKeyRange.only(" + value + ")");
+    keyRange = evalAndLog("IDBKeyRange.only(" + value + ")");
     shouldBe("keyRange.lower", "" + value);
     shouldBe("keyRange.upper", "" + value);
     shouldBeFalse("keyRange.lowerOpen");
@@ -21,7 +21,7 @@ function checkSingleKeyRange(value)
 
 function checkLowerBoundKeyRange(value, open)
 {
-    keyRange = evalAndLog("webkitIDBKeyRange.lowerBound(" + value + "," + open + ")");
+    keyRange = evalAndLog("IDBKeyRange.lowerBound(" + value + "," + open + ")");
     shouldBe("keyRange.lower", "" + value);
     if (open === undefined)
         open = false;
@@ -32,7 +32,7 @@ function checkLowerBoundKeyRange(value, open)
 
 function checkUpperBoundKeyRange(value, open)
 {
-    keyRange = evalAndLog("webkitIDBKeyRange.upperBound(" + value + "," + open + ")");
+    keyRange = evalAndLog("IDBKeyRange.upperBound(" + value + "," + open + ")");
     shouldBe("keyRange.upper", "" + value);
     if (open === undefined)
         open = false;
@@ -43,7 +43,7 @@ function checkUpperBoundKeyRange(value, open)
 
 function checkBoundKeyRange(lower, upper, lowerOpen, upperOpen)
 {
-    keyRange = evalAndLog("webkitIDBKeyRange.bound(" + lower + "," + upper + ", " + lowerOpen + ", " + upperOpen + ")");
+    keyRange = evalAndLog("IDBKeyRange.bound(" + lower + "," + upper + ", " + lowerOpen + ", " + upperOpen + ")");
     shouldBe("keyRange.lower", "" + lower);
     shouldBe("keyRange.upper", "" + upper);
     if (lowerOpen === undefined)
@@ -56,18 +56,19 @@ function checkBoundKeyRange(lower, upper, lowerOpen, upperOpen)
 
 function test()
 {
-    shouldBeFalse("'lower' in webkitIDBKeyRange");
-    shouldBeFalse("'upper' in webkitIDBKeyRange");
-    shouldBeFalse("'lowerOpen' in webkitIDBKeyRange");
-    shouldBeFalse("'upperOpen' in webkitIDBKeyRange");
-    shouldBeTrue("'only' in webkitIDBKeyRange");
-    shouldBeTrue("'lowerBound' in webkitIDBKeyRange");
-    shouldBeTrue("'upperBound' in webkitIDBKeyRange");
-    shouldBeTrue("'bound' in webkitIDBKeyRange");
+    removeVendorPrefixes();
+    shouldBeFalse("'lower' in IDBKeyRange");
+    shouldBeFalse("'upper' in IDBKeyRange");
+    shouldBeFalse("'lowerOpen' in IDBKeyRange");
+    shouldBeFalse("'upperOpen' in IDBKeyRange");
+    shouldBeTrue("'only' in IDBKeyRange");
+    shouldBeTrue("'lowerBound' in IDBKeyRange");
+    shouldBeTrue("'upperBound' in IDBKeyRange");
+    shouldBeTrue("'bound' in IDBKeyRange");
 
     debug("");
 
-    var instance = evalAndLog("instance = webkitIDBKeyRange.only(1)");
+    var instance = evalAndLog("instance = IDBKeyRange.only(1)");
     shouldBeTrue("'lower' in instance");
     shouldBeTrue("'upper' in instance");
     shouldBeTrue("'lowerOpen' in instance");
@@ -124,7 +125,7 @@ function test()
 
     try {
         debug("Passing an invalid key into only({})");
-        webkitIDBKeyRange.only({});
+        IDBKeyRange.only({});
         testFailed("No exception thrown");
     } catch (e) {
         testPassed("Caught exception: " + e.toString());
@@ -132,7 +133,7 @@ function test()
 
     try {
         debug("Passing an invalid key into upperBound({})");
-        webkitIDBKeyRange.upperBound({});
+        IDBKeyRange.upperBound({});
         testFailed("No exception thrown");
     } catch (e) {
         testPassed("Caught exception: " + e.toString());
@@ -140,7 +141,7 @@ function test()
  
     try {
         debug("Passing an invalid key into lowerBound({})");
-        webkitIDBKeyRange.lowerBound({});
+        IDBKeyRange.lowerBound({});
         testFailed("No exception thrown");
     } catch (e) {
         testPassed("Caught exception: " + e.toString());
@@ -148,7 +149,7 @@ function test()
 
     try {
         debug("Passing an invalid key into bound(null, {})");
-        webkitIDBKeyRange.bound(null, {});
+        IDBKeyRange.bound(null, {});
         testFailed("No exception thrown");
     } catch (e) {
         testPassed("Caught exception: " + e.toString());
@@ -156,7 +157,7 @@ function test()
 
     try {
         debug("Passing an invalid key into bound({},null)");
-        webkitIDBKeyRange.bound({}, null);
+        IDBKeyRange.bound({}, null);
         testFailed("No exception thrown");
     } catch (e) {
         testPassed("Caught exception: " + e.toString());
@@ -164,26 +165,26 @@ function test()
 
     try {
         debug("Passing an invalid key into bound({}, {})");
-        webkitIDBKeyRange.bound({}, {});
+        IDBKeyRange.bound({}, {});
         testFailed("No exception thrown");
     } catch (e) {
         testPassed("Caught exception: " + e.toString());
     }
 
     debug("Lower key greater than higher key, bound(4, 3)");
-    evalAndExpectException("webkitIDBKeyRange.bound(4, 3)", "webkitIDBDatabaseException.DATA_ERR");
+    evalAndExpectException("IDBKeyRange.bound(4, 3)", "IDBDatabaseException.DATA_ERR");
 
     debug("Equal keys, either of the bounds is open, bound(4, 4, true, false)");
-    evalAndExpectException("webkitIDBKeyRange.bound(4, 4, true, false)", "webkitIDBDatabaseException.DATA_ERR");
+    evalAndExpectException("IDBKeyRange.bound(4, 4, true, false)", "IDBDatabaseException.DATA_ERR");
 
     debug("Equal keys, either of the bounds is open, bound(4, 4, false, true)");
-    evalAndExpectException("webkitIDBKeyRange.bound(4, 4, false, true)", "webkitIDBDatabaseException.DATA_ERR");
+    evalAndExpectException("IDBKeyRange.bound(4, 4, false, true)", "IDBDatabaseException.DATA_ERR");
 
     debug("Equal keys, either of the bounds is open, bound(4, 4, true, true)");
-    evalAndExpectException("webkitIDBKeyRange.bound(4, 4, true, true)", "webkitIDBDatabaseException.DATA_ERR");
+    evalAndExpectException("IDBKeyRange.bound(4, 4, true, true)", "IDBDatabaseException.DATA_ERR");
 
     debug("Equal keys, none of the bounds is open, bound(4, 4, false, false)");
-    webkitIDBKeyRange.bound(4, 4, false, false);
+    IDBKeyRange.bound(4, 4, false, false);
 }
 
 test();
index 4971db0..327d7ee 100644 (file)
@@ -4,8 +4,9 @@ Test string list ordering in IndexedDB.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB
-PASS indexedDB != null is true
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 check that the expected order is the canonical JS sort order:
 sorted_order = expected_order.slice(); sorted_order.sort()
 PASS areArraysEqual(sorted_order, expected_order) is true
index 74a4947..a48d9d8 100644 (file)
@@ -40,9 +40,7 @@ for (i = 0; i < permuted_order.length - 2; i += 2) {
 
 function test()
 {
-    evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB");
-    shouldBeTrue("indexedDB != null");
-
+    removeVendorPrefixes();
     debug("check that the expected order is the canonical JS sort order:");
     evalAndLog("sorted_order = expected_order.slice(); sorted_order.sort()");
     shouldBeTrue("areArraysEqual(sorted_order, expected_order)");
index 4b6db03..e60aa75 100644 (file)
@@ -3,10 +3,9 @@ Test IndexedDB behavior adding the same property twice
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index d6e9148..b58c5b7 100644 (file)
@@ -19,10 +19,7 @@ description("Test IndexedDB behavior adding the same property twice");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index 2396288..d461e7d 100644 (file)
@@ -3,10 +3,9 @@ Test IndexedDB indexes against autoincrementing keys
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index faa0d69..35fdf02 100644 (file)
@@ -19,10 +19,7 @@ description("Test IndexedDB indexes against autoincrementing keys");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index a9867cb..aa93111 100644 (file)
@@ -3,10 +3,9 @@ Test IndexedDB adding property with invalid keypath
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index b2d9111..e299b91 100644 (file)
@@ -19,10 +19,7 @@ description("Test IndexedDB adding property with invalid keypath");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index c24a84a..3b601f5 100644 (file)
@@ -3,12 +3,9 @@ Test IndexedDB's clearing an object store
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
-PASS IDBTransaction == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index 1e9756d..3d27386 100644 (file)
@@ -19,12 +19,7 @@ description("Test IndexedDB's clearing an object store");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBTransaction = evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;");
-    shouldBeFalse("IDBTransaction == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index 4816d07..36f7365 100644 (file)
@@ -3,12 +3,9 @@ Test IndexedDB's creating unique index and updating indexNames
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
-PASS IDBTransaction == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index 27309a0..aa596ec 100644 (file)
@@ -19,12 +19,7 @@ description("Test IndexedDB's creating unique index and updating indexNames");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBTransaction = evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;");
-    shouldBeFalse("IDBTransaction == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index ff05c79..fa0a820 100644 (file)
@@ -3,12 +3,9 @@ Test IndexedDB's creating index with integer keys
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
-PASS IDBTransaction == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index ce9ec9b..cc7b0ae 100644 (file)
@@ -19,12 +19,7 @@ description("Test IndexedDB's creating index with integer keys");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBTransaction = evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;");
-    shouldBeFalse("IDBTransaction == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index bce89bf..02d038b 100644 (file)
@@ -3,12 +3,9 @@ Test IndexedDB's creating object store and updating properties
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
-PASS IDBTransaction == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index 408fe4b..651a0a4 100644 (file)
@@ -19,12 +19,7 @@ description("Test IndexedDB's creating object store and updating properties");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBTransaction = evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;");
-    shouldBeFalse("IDBTransaction == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index 8106f74..2d34d0a 100644 (file)
@@ -3,10 +3,9 @@ Test IndexedDB's creating object store with null name
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index f77b7a7..fec0502 100644 (file)
@@ -19,10 +19,7 @@ description("Test IndexedDB's creating object store with null name");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index 7492d2e..3989eca 100644 (file)
@@ -3,12 +3,9 @@ Test IndexedDB's cursor mutation
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException
-PASS IDBDatabaseException == null is false
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction
-PASS IDBTransaction == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 
 indexedDB.deleteDatabase(name)
 indexedDB.open(name)
index 6b4e8ac..50d5840 100644 (file)
@@ -3,12 +3,9 @@ Test IndexedDB's cursor mutation during object store cursor iteration
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
-PASS IDBTransaction == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 openSuccess():
 db = event.target.result
index ea89537..4557cd5 100644 (file)
@@ -19,12 +19,7 @@ description("Test IndexedDB's cursor mutation during object store cursor iterati
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBTransaction = evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;");
-    shouldBeFalse("IDBTransaction == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index 8092a7b..c316b7a 100644 (file)
@@ -19,12 +19,7 @@ description("Test IndexedDB's cursor mutation");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBTransaction = evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction");
-    shouldBeFalse("IDBTransaction == null");
+    removeVendorPrefixes();
 
     debug("");
     name = 'cursor-mutation';
index afbdde2..74f749a 100644 (file)
@@ -3,12 +3,9 @@ Test IndexedDB: mutating records with a r/w cursor updates indexes on those reco
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
-PASS IDBTransaction == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 openSuccess():
 db = event.target.result
index 1b9f04b..b3099af 100644 (file)
@@ -19,12 +19,7 @@ description("Test IndexedDB: mutating records with a r/w cursor updates indexes
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBTransaction = evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;");
-    shouldBeFalse("IDBTransaction == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index ddaabfb..81a8e3d 100644 (file)
@@ -3,14 +3,9 @@ Test IndexedDB cursor behavior
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
-PASS IDBKeyRange == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index d844c7a..ee07874 100644 (file)
@@ -19,14 +19,7 @@ description("Test IndexedDB cursor behavior");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
-    shouldBeFalse("IDBKeyRange == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index 07554b3..418fb64 100644 (file)
@@ -3,8 +3,9 @@ Test IndexedDB: result property after deleting existing and non-existing record
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index 40ac1f3..487a112 100644 (file)
@@ -19,8 +19,7 @@ description("Test IndexedDB: result property after deleting existing and non-exi
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index cf9f156..8c3f1b2 100644 (file)
@@ -3,8 +3,9 @@ Test IndexedDB's event.target.source in success callbacks
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 source = event.target.source;
 PASS source is indexedDB
index 7110fd5..15135e1 100644 (file)
@@ -19,8 +19,7 @@ description("Test IndexedDB's event.target.source in success callbacks");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index 395fd97..7a0f255 100644 (file)
@@ -3,10 +3,9 @@ Test IndexedDB's opening DB more than once
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db1 = event.target.result
 request = db1.setVersion('1')
index 73698d4..2ef5531 100644 (file)
@@ -19,10 +19,7 @@ description("Test IndexedDB's opening DB more than once");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index 8483ff3..397986e 100644 (file)
@@ -3,16 +3,9 @@ Test IndexedDB: iterating through index cursors with keys and key ranges
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
-PASS IDBTransaction == null is false
-IDBCursor = window.IDBCursor || window.webkitIDBCursor;
-PASS IDBCursor == null is false
-IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
-PASS IDBKeyRange == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 openSuccess():
 db = event.target.result
index 892b3e1..83ed839 100644 (file)
@@ -19,16 +19,7 @@ description("Test IndexedDB: iterating through index cursors with keys and key r
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBTransaction = evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;");
-    shouldBeFalse("IDBTransaction == null");
-    IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
-    shouldBeFalse("IDBCursor == null");
-    IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
-    shouldBeFalse("IDBKeyRange == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index f50a06a..ad6f958 100644 (file)
@@ -3,8 +3,9 @@ Test IndexedDB's behavior deleting entry with no key
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('version 1')
@@ -12,7 +13,7 @@ Deleted all object stores.
 objectStore = db.createObjectStore('bar');
 Expecting exception from objectStore.delete(null);
 PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 5b7bca4..010a827 100644 (file)
@@ -19,8 +19,7 @@ description("Test IndexedDB's behavior deleting entry with no key");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
@@ -42,7 +41,7 @@ function cleanDatabaseAndCreateObjectStore()
 {
     deleteAllObjectStores(db);
     objectStore = evalAndLog("objectStore = db.createObjectStore('bar');");
-    evalAndExpectException("objectStore.delete(null);", "webkitIDBDatabaseException.DATA_ERR");
+    evalAndExpectException("objectStore.delete(null);", "IDBDatabaseException.DATA_ERR");
     finishJSTest();
 }
 
index 67b8645..f0fc6be 100644 (file)
@@ -3,8 +3,9 @@ Test IndexedDB's event.target.result after add() and put()
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index 4d3bd3a..883c1ff 100644 (file)
@@ -3,9 +3,10 @@ Test IndexedDB's behavior adding inline and passed key simultaneously
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS 'webkitIndexedDB' in window is true
-PASS webkitIndexedDB == null is false
-webkitIndexedDB.open(name, description)
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
+indexedDB.open(name, description)
 openSuccess():
 db = event.target.result
 request = db.setVersion('version 1')
@@ -14,7 +15,7 @@ Deleted all object stores.
 objectStore = db.createObjectStore('baz', { keyPath: 'id' });
 Expecting exception from objectStore.add({id: 5}, 5);
 PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
 PASS successfullyParsed is true
 
 TEST COMPLETE
index f5b2902..ac6cd4d 100644 (file)
@@ -19,12 +19,11 @@ description("Test IndexedDB's behavior adding inline and passed key simultaneous
 
 function test()
 {
-    shouldBeTrue("'webkitIndexedDB' in window");
-    shouldBeFalse("webkitIndexedDB == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
-    request = evalAndLog("webkitIndexedDB.open(name, description)");
+    request = evalAndLog("indexedDB.open(name, description)");
     request.onsuccess = openSuccess;
     request.onerror = unexpectedErrorCallback;
 }
@@ -44,7 +43,7 @@ function cleanDatabase()
     debug("cleanDatabase():");
     deleteAllObjectStores(db);
     objectStore = evalAndLog("objectStore = db.createObjectStore('baz', { keyPath: 'id' });");
-    evalAndExpectException("objectStore.add({id: 5}, 5);", "webkitIDBDatabaseException.DATA_ERR");
+    evalAndExpectException("objectStore.add({id: 5}, 5);", "IDBDatabaseException.DATA_ERR");
     finishJSTest();
 }
 
index ea5b251..aaba353 100644 (file)
@@ -3,10 +3,9 @@ Test IndexedDB's behavior puting without key
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index b5865a2..889e9a3 100644 (file)
@@ -19,10 +19,7 @@ description("Test IndexedDB's behavior puting without key");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index 3cf8b5c..0b17eff 100644 (file)
@@ -3,10 +3,9 @@ Test IndexedDB's behavior put()ing with null key
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index cf848d1..16319ca 100644 (file)
@@ -19,10 +19,7 @@ description("Test IndexedDB's behavior put()ing with null key");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index 80ed958..4e98592 100644 (file)
@@ -19,8 +19,7 @@ description("Test IndexedDB's event.target.result after add() and put()");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index 8a11945..d4ec3e6 100644 (file)
@@ -3,8 +3,9 @@ Test IndexedDB's index cursors
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index 229084d..50bb6fa 100644 (file)
@@ -19,8 +19,7 @@ description("Test IndexedDB's index cursors");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index b6a4e97..d120cfc 100644 (file)
@@ -3,8 +3,9 @@ Test IndexedDB: object identity
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index 5c65d25..8f09330 100644 (file)
@@ -19,8 +19,7 @@ description("Test IndexedDB: object identity");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index d1ad501..b803d8f 100644 (file)
@@ -3,10 +3,9 @@ Test IndexedDB adding an autoincremented key and retrieving it successfully
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index ae80520..83fe2f8 100644 (file)
@@ -19,10 +19,7 @@ description("Test IndexedDB adding an autoincremented key and retrieving it succ
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index f74352d..2d09eda 100644 (file)
@@ -3,8 +3,9 @@ Test IndexedDB: adds, gets, deletes, and re-gets a record in a variety of differ
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 data = [
index 6c8d9d6..9b3081c 100644 (file)
@@ -19,8 +19,7 @@ description("Test IndexedDB: adds, gets, deletes, and re-gets a record in a vari
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index b1e55ae..cfff31b 100644 (file)
@@ -3,8 +3,9 @@ Test IndexedDB's objectStoreNames array
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index af6795f..1416290 100644 (file)
@@ -19,8 +19,7 @@ description("Test IndexedDB's objectStoreNames array");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index 9bc0fd8..5adc235 100644 (file)
@@ -3,14 +3,9 @@ Test IndexedDB: request result persists in setTimeout callback
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBDatabase = window.IDBDatabase || window.webkitIDBDatabase;
-PASS IDBDatabase == null is false
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
-PASS IDBTransaction == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 openSuccess():
 db = null;
index b449a93..7850c5c 100644 (file)
@@ -19,14 +19,7 @@ description("Test IndexedDB: request result persists in setTimeout callback");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBDatabase = evalAndLog("IDBDatabase = window.IDBDatabase || window.webkitIDBDatabase;");
-    shouldBeFalse("IDBDatabase == null");
-    IDBTransaction = evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;");
-    shouldBeFalse("IDBTransaction == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index 738b177..d9c7ac9 100644 (file)
@@ -3,12 +3,9 @@ Test IndexedDB: should NOT throw when opening a database with a null name
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
-PASS IDBTransaction == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(null);
 db = event.target.result
 PASS db.name is 'null'
index b50af92..357d633 100644 (file)
@@ -19,12 +19,7 @@ description("Test IndexedDB: should NOT throw when opening a database with a nul
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
-    IDBTransaction = evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;");
-    shouldBeFalse("IDBTransaction == null");
+    removeVendorPrefixes();
 
     description = "My Test Database";
     request = evalAndLog("indexedDB.open(null);");
index caaf6fe..6a7bfff 100644 (file)
@@ -3,8 +3,9 @@ Test IndexedDB's putting and getting values in an object store
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index e5c7ba9..a50bcc5 100644 (file)
@@ -19,8 +19,7 @@ description("Test IndexedDB's putting and getting values in an object store");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index bdabda7..07060f1 100644 (file)
@@ -3,10 +3,9 @@ Test IndexedDB's readonly transactions
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')
index 71aa11e..d319421 100644 (file)
@@ -19,10 +19,7 @@ description("Test IndexedDB's readonly transactions");
 
 function test()
 {
-    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
-    shouldBeFalse("indexedDB == null");
-    IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
-    shouldBeFalse("IDBDatabaseException == null");
+    removeVendorPrefixes();
 
     name = window.location.pathname;
     description = "My Test Database";
index fd595e6..68d21fe 100644 (file)
@@ -3,12 +3,9 @@ Test IndexedDB's read/write transactions
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-PASS indexedDB == null is false
-IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
-PASS IDBDatabaseException == null is false
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
-PASS IDBTransaction == null is false
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+PASS Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction) is true
+
 indexedDB.open(name, description)
 db = event.target.result
 request = db.setVersion('1')