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:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@110750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 3df1fd6..ed8f5c6 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -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
diff --git a/LayoutTests/storage/indexeddb/basics-expected.txt b/LayoutTests/storage/indexeddb/basics-expected.txt
index 8e3cd2a..4bf56d0 100644
--- a/LayoutTests/storage/indexeddb/basics-expected.txt
+++ b/LayoutTests/storage/indexeddb/basics-expected.txt
@@ -3,29 +3,28 @@
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 '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
diff --git a/LayoutTests/storage/indexeddb/basics-shared-workers-expected.txt b/LayoutTests/storage/indexeddb/basics-shared-workers-expected.txt
index 43f1e8a..444270f 100644
--- a/LayoutTests/storage/indexeddb/basics-shared-workers-expected.txt
+++ b/LayoutTests/storage/indexeddb/basics-shared-workers-expected.txt
@@ -4,29 +4,28 @@
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] '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
diff --git a/LayoutTests/storage/indexeddb/basics-workers-expected.txt b/LayoutTests/storage/indexeddb/basics-workers-expected.txt
index 43f1e8a..444270f 100644
--- a/LayoutTests/storage/indexeddb/basics-workers-expected.txt
+++ b/LayoutTests/storage/indexeddb/basics-workers-expected.txt
@@ -4,29 +4,28 @@
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] '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
diff --git a/LayoutTests/storage/indexeddb/constants-expected.txt b/LayoutTests/storage/indexeddb/constants-expected.txt
index 2b86df9..10de03f 100644
--- a/LayoutTests/storage/indexeddb/constants-expected.txt
+++ b/LayoutTests/storage/indexeddb/constants-expected.txt
@@ -3,27 +3,30 @@
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
diff --git a/LayoutTests/storage/indexeddb/constants.html b/LayoutTests/storage/indexeddb/constants.html
index 3816134..325cba7 100644
--- a/LayoutTests/storage/indexeddb/constants.html
+++ b/LayoutTests/storage/indexeddb/constants.html
@@ -12,30 +12,31 @@
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");
+ 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("webkitIDBRequest.LOADING", "1");
- shouldBe("webkitIDBRequest.DONE", "2");
+ shouldBe("IDBRequest.LOADING", "1");
+ shouldBe("IDBRequest.DONE", "2");
- shouldBe("webkitIDBCursor.NEXT", "0");
- shouldBe("webkitIDBCursor.NEXT_NO_DUPLICATE", "1");
- shouldBe("webkitIDBCursor.PREV", "2");
- shouldBe("webkitIDBCursor.PREV_NO_DUPLICATE", "3");
+ shouldBe("IDBCursor.NEXT", "0");
+ shouldBe("IDBCursor.NEXT_NO_DUPLICATE", "1");
+ shouldBe("IDBCursor.PREV", "2");
+ shouldBe("IDBCursor.PREV_NO_DUPLICATE", "3");
- shouldBe("webkitIDBTransaction.READ_ONLY", "0");
- shouldBe("webkitIDBTransaction.READ_WRITE", "1");
- shouldBe("webkitIDBTransaction.VERSION_CHANGE", "2");
+ shouldBe("IDBTransaction.READ_ONLY", "0");
+ shouldBe("IDBTransaction.READ_WRITE", "1");
+ shouldBe("IDBTransaction.VERSION_CHANGE", "2");
}
test();
diff --git a/LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt b/LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt
index 935985a..5c366b4 100644
--- a/LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt
+++ b/LayoutTests/storage/indexeddb/create-and-remove-object-store-expected.txt
@@ -3,50 +3,53 @@
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
diff --git a/LayoutTests/storage/indexeddb/create-and-remove-object-store.html b/LayoutTests/storage/indexeddb/create-and-remove-object-store.html
index 1453754..554039e 100644
--- a/LayoutTests/storage/indexeddb/create-and-remove-object-store.html
+++ b/LayoutTests/storage/indexeddb/create-and-remove-object-store.html
@@ -12,7 +12,8 @@
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 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 @@
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 @@
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();
}
diff --git a/LayoutTests/storage/indexeddb/create-object-store-options-expected.txt b/LayoutTests/storage/indexeddb/create-object-store-options-expected.txt
index eff5b5c..8c8ccc8 100644
--- a/LayoutTests/storage/indexeddb/create-object-store-options-expected.txt
+++ b/LayoutTests/storage/indexeddb/create-object-store-options-expected.txt
@@ -3,17 +3,18 @@
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.
diff --git a/LayoutTests/storage/indexeddb/create-object-store-options.html b/LayoutTests/storage/indexeddb/create-object-store-options.html
index 078e508..bf94d36 100644
--- a/LayoutTests/storage/indexeddb/create-object-store-options.html
+++ b/LayoutTests/storage/indexeddb/create-object-store-options.html
@@ -12,10 +12,9 @@
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 @@
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;
diff --git a/LayoutTests/storage/indexeddb/createObjectStore-name-argument-required-expected.txt b/LayoutTests/storage/indexeddb/createObjectStore-name-argument-required-expected.txt
index edf0d49..083231b 100644
--- a/LayoutTests/storage/indexeddb/createObjectStore-name-argument-required-expected.txt
+++ b/LayoutTests/storage/indexeddb/createObjectStore-name-argument-required-expected.txt
@@ -3,14 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/createObjectStore-name-argument-required.html b/LayoutTests/storage/indexeddb/createObjectStore-name-argument-required.html
index b63f398..c2c4f29 100644
--- a/LayoutTests/storage/indexeddb/createObjectStore-name-argument-required.html
+++ b/LayoutTests/storage/indexeddb/createObjectStore-name-argument-required.html
@@ -13,14 +13,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/createObjectStore-null-name-expected.txt b/LayoutTests/storage/indexeddb/createObjectStore-null-name-expected.txt
index 83e4a62..b460ed5 100644
--- a/LayoutTests/storage/indexeddb/createObjectStore-null-name-expected.txt
+++ b/LayoutTests/storage/indexeddb/createObjectStore-null-name-expected.txt
@@ -3,14 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/createObjectStore-null-name.html b/LayoutTests/storage/indexeddb/createObjectStore-null-name.html
index 76e9fb1..260544e 100644
--- a/LayoutTests/storage/indexeddb/createObjectStore-null-name.html
+++ b/LayoutTests/storage/indexeddb/createObjectStore-null-name.html
@@ -13,14 +13,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/cursor-continue-expected.txt b/LayoutTests/storage/indexeddb/cursor-continue-expected.txt
index b64ddd9..cd01c31 100644
--- a/LayoutTests/storage/indexeddb/cursor-continue-expected.txt
+++ b/LayoutTests/storage/indexeddb/cursor-continue-expected.txt
@@ -3,12 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/cursor-continue.html b/LayoutTests/storage/indexeddb/cursor-continue.html
index 64fb0bb..cdafaf7 100644
--- a/LayoutTests/storage/indexeddb/cursor-continue.html
+++ b/LayoutTests/storage/indexeddb/cursor-continue.html
@@ -36,12 +36,7 @@
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();
}
diff --git a/LayoutTests/storage/indexeddb/cursor-delete-expected.txt b/LayoutTests/storage/indexeddb/cursor-delete-expected.txt
index edda620..9cc7977 100644
--- a/LayoutTests/storage/indexeddb/cursor-delete-expected.txt
+++ b/LayoutTests/storage/indexeddb/cursor-delete-expected.txt
@@ -3,7 +3,10 @@
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('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 @@
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
diff --git a/LayoutTests/storage/indexeddb/cursor-delete.html b/LayoutTests/storage/indexeddb/cursor-delete.html
index 9fe8ede..6a531a6 100644
--- a/LayoutTests/storage/indexeddb/cursor-delete.html
+++ b/LayoutTests/storage/indexeddb/cursor-delete.html
@@ -14,7 +14,8 @@
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 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 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;
diff --git a/LayoutTests/storage/indexeddb/cursor-inconsistency-expected.txt b/LayoutTests/storage/indexeddb/cursor-inconsistency-expected.txt
index fa34a00..43010a1 100644
--- a/LayoutTests/storage/indexeddb/cursor-inconsistency-expected.txt
+++ b/LayoutTests/storage/indexeddb/cursor-inconsistency-expected.txt
@@ -3,7 +3,10 @@
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('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)
diff --git a/LayoutTests/storage/indexeddb/cursor-inconsistency.html b/LayoutTests/storage/indexeddb/cursor-inconsistency.html
index 194c2c6..6e07b1c 100644
--- a/LayoutTests/storage/indexeddb/cursor-inconsistency.html
+++ b/LayoutTests/storage/indexeddb/cursor-inconsistency.html
@@ -14,7 +14,8 @@
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 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;
diff --git a/LayoutTests/storage/indexeddb/cursor-index-delete-expected.txt b/LayoutTests/storage/indexeddb/cursor-index-delete-expected.txt
index 5780dff..58b4318 100644
--- a/LayoutTests/storage/indexeddb/cursor-index-delete-expected.txt
+++ b/LayoutTests/storage/indexeddb/cursor-index-delete-expected.txt
@@ -3,7 +3,10 @@
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: 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 @@
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
diff --git a/LayoutTests/storage/indexeddb/cursor-index-delete.html b/LayoutTests/storage/indexeddb/cursor-index-delete.html
index e1a4b7b..a758c78 100644
--- a/LayoutTests/storage/indexeddb/cursor-index-delete.html
+++ b/LayoutTests/storage/indexeddb/cursor-index-delete.html
@@ -14,7 +14,8 @@
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 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 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;
diff --git a/LayoutTests/storage/indexeddb/cursor-key-order-expected.txt b/LayoutTests/storage/indexeddb/cursor-key-order-expected.txt
index 7ca2947..56f74ea 100644
--- a/LayoutTests/storage/indexeddb/cursor-key-order-expected.txt
+++ b/LayoutTests/storage/indexeddb/cursor-key-order-expected.txt
@@ -3,12 +3,9 @@
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
diff --git a/LayoutTests/storage/indexeddb/cursor-key-order.html b/LayoutTests/storage/indexeddb/cursor-key-order.html
index 5a34cde..e014dbb 100644
--- a/LayoutTests/storage/indexeddb/cursor-key-order.html
+++ b/LayoutTests/storage/indexeddb/cursor-key-order.html
@@ -12,12 +12,7 @@
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();
}
diff --git a/LayoutTests/storage/indexeddb/cursor-primary-key-order-expected.txt b/LayoutTests/storage/indexeddb/cursor-primary-key-order-expected.txt
index ce26e9f..262ce33 100644
--- a/LayoutTests/storage/indexeddb/cursor-primary-key-order-expected.txt
+++ b/LayoutTests/storage/indexeddb/cursor-primary-key-order-expected.txt
@@ -3,12 +3,9 @@
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
diff --git a/LayoutTests/storage/indexeddb/cursor-primary-key-order.html b/LayoutTests/storage/indexeddb/cursor-primary-key-order.html
index 84a117c..35da000 100644
--- a/LayoutTests/storage/indexeddb/cursor-primary-key-order.html
+++ b/LayoutTests/storage/indexeddb/cursor-primary-key-order.html
@@ -13,12 +13,7 @@
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();
}
diff --git a/LayoutTests/storage/indexeddb/cursor-reverse-bug-expected.txt b/LayoutTests/storage/indexeddb/cursor-reverse-bug-expected.txt
index 3bb29a8..3b41c5d 100644
--- a/LayoutTests/storage/indexeddb/cursor-reverse-bug-expected.txt
+++ b/LayoutTests/storage/indexeddb/cursor-reverse-bug-expected.txt
@@ -3,14 +3,9 @@
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
diff --git a/LayoutTests/storage/indexeddb/cursor-reverse-bug.html b/LayoutTests/storage/indexeddb/cursor-reverse-bug.html
index b5594df..5975bac 100644
--- a/LayoutTests/storage/indexeddb/cursor-reverse-bug.html
+++ b/LayoutTests/storage/indexeddb/cursor-reverse-bug.html
@@ -12,14 +12,7 @@
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();
}
diff --git a/LayoutTests/storage/indexeddb/cursor-skip-deleted-expected.txt b/LayoutTests/storage/indexeddb/cursor-skip-deleted-expected.txt
index e129ad9..f3c3c24 100644
--- a/LayoutTests/storage/indexeddb/cursor-skip-deleted-expected.txt
+++ b/LayoutTests/storage/indexeddb/cursor-skip-deleted-expected.txt
@@ -3,7 +3,10 @@
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 @@
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 @@
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 @@
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)
diff --git a/LayoutTests/storage/indexeddb/cursor-skip-deleted.html b/LayoutTests/storage/indexeddb/cursor-skip-deleted.html
index c26eaf4..eaedb2d 100644
--- a/LayoutTests/storage/indexeddb/cursor-skip-deleted.html
+++ b/LayoutTests/storage/indexeddb/cursor-skip-deleted.html
@@ -19,7 +19,8 @@
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 @@
{
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 @@
{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 @@
];
- 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 @@
{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()
diff --git a/LayoutTests/storage/indexeddb/cursor-update-expected.txt b/LayoutTests/storage/indexeddb/cursor-update-expected.txt
index 0e21f8c..4404f96 100644
--- a/LayoutTests/storage/indexeddb/cursor-update-expected.txt
+++ b/LayoutTests/storage/indexeddb/cursor-update-expected.txt
@@ -3,7 +3,10 @@
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: 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 @@
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 @@
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()
diff --git a/LayoutTests/storage/indexeddb/cursor-update-value-argument-required-expected.txt b/LayoutTests/storage/indexeddb/cursor-update-value-argument-required-expected.txt
index b7db426..5d078b5 100644
--- a/LayoutTests/storage/indexeddb/cursor-update-value-argument-required-expected.txt
+++ b/LayoutTests/storage/indexeddb/cursor-update-value-argument-required-expected.txt
@@ -3,14 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/cursor-update-value-argument-required.html b/LayoutTests/storage/indexeddb/cursor-update-value-argument-required.html
index d846f04..72c67a2 100644
--- a/LayoutTests/storage/indexeddb/cursor-update-value-argument-required.html
+++ b/LayoutTests/storage/indexeddb/cursor-update-value-argument-required.html
@@ -13,14 +13,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/cursor-update.html b/LayoutTests/storage/indexeddb/cursor-update.html
index ae19c97..2cca28e 100644
--- a/LayoutTests/storage/indexeddb/cursor-update.html
+++ b/LayoutTests/storage/indexeddb/cursor-update.html
@@ -14,7 +14,8 @@
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 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 @@
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 @@
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 @@
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 @@
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 @@
testFailed("Expected exception.");
} catch (e) {
code = e.code;
- shouldBe("code", "webkitIDBDatabaseException.NOT_ALLOWED_ERR");
+ shouldBe("code", "IDBDatabaseException.NOT_ALLOWED_ERR");
}
counter++;
diff --git a/LayoutTests/storage/indexeddb/data-corruption-expected.txt b/LayoutTests/storage/indexeddb/data-corruption-expected.txt
index 31b14a8..a3478f5 100644
--- a/LayoutTests/storage/indexeddb/data-corruption-expected.txt
+++ b/LayoutTests/storage/indexeddb/data-corruption-expected.txt
@@ -3,7 +3,10 @@
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 @@
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
diff --git a/LayoutTests/storage/indexeddb/data-corruption.html b/LayoutTests/storage/indexeddb/data-corruption.html
index 0bfb157..cd056a2a 100644
--- a/LayoutTests/storage/indexeddb/data-corruption.html
+++ b/LayoutTests/storage/indexeddb/data-corruption.html
@@ -12,7 +12,8 @@
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 @@
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 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;
diff --git a/LayoutTests/storage/indexeddb/database-basics-expected.txt b/LayoutTests/storage/indexeddb/database-basics-expected.txt
index 49d1cac..75be59b 100644
--- a/LayoutTests/storage/indexeddb/database-basics-expected.txt
+++ b/LayoutTests/storage/indexeddb/database-basics-expected.txt
@@ -3,10 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/database-basics.html b/LayoutTests/storage/indexeddb/database-basics.html
index 8afc1ba..d029148 100644
--- a/LayoutTests/storage/indexeddb/database-basics.html
+++ b/LayoutTests/storage/indexeddb/database-basics.html
@@ -12,10 +12,7 @@
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;
diff --git a/LayoutTests/storage/indexeddb/database-name-undefined-expected.txt b/LayoutTests/storage/indexeddb/database-name-undefined-expected.txt
index 3f3a8ab..86ef1f9 100644
--- a/LayoutTests/storage/indexeddb/database-name-undefined-expected.txt
+++ b/LayoutTests/storage/indexeddb/database-name-undefined-expected.txt
@@ -3,14 +3,9 @@
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
diff --git a/LayoutTests/storage/indexeddb/database-name-undefined.html b/LayoutTests/storage/indexeddb/database-name-undefined.html
index d6fc954..3f67a17 100644
--- a/LayoutTests/storage/indexeddb/database-name-undefined.html
+++ b/LayoutTests/storage/indexeddb/database-name-undefined.html
@@ -13,15 +13,7 @@
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();
}
diff --git a/LayoutTests/storage/indexeddb/database-odd-names-expected.txt b/LayoutTests/storage/indexeddb/database-odd-names-expected.txt
index 091ce5b..e752ab2 100644
--- a/LayoutTests/storage/indexeddb/database-odd-names-expected.txt
+++ b/LayoutTests/storage/indexeddb/database-odd-names-expected.txt
@@ -3,14 +3,9 @@
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
diff --git a/LayoutTests/storage/indexeddb/database-odd-names.html b/LayoutTests/storage/indexeddb/database-odd-names.html
index 83d8e97..d18fbf8 100644
--- a/LayoutTests/storage/indexeddb/database-odd-names.html
+++ b/LayoutTests/storage/indexeddb/database-odd-names.html
@@ -13,14 +13,7 @@
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' },
diff --git a/LayoutTests/storage/indexeddb/database-quota-expected.txt b/LayoutTests/storage/indexeddb/database-quota-expected.txt
index ef1cfbd..1fcdbc6 100644
--- a/LayoutTests/storage/indexeddb/database-quota-expected.txt
+++ b/LayoutTests/storage/indexeddb/database-quota-expected.txt
@@ -3,7 +3,10 @@
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.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')
diff --git a/LayoutTests/storage/indexeddb/database-quota.html b/LayoutTests/storage/indexeddb/database-quota.html
index 1617a7b..f1eae1a 100644
--- a/LayoutTests/storage/indexeddb/database-quota.html
+++ b/LayoutTests/storage/indexeddb/database-quota.html
@@ -12,7 +12,8 @@
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 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");
diff --git a/LayoutTests/storage/indexeddb/delete-closed-database-object-expected.txt b/LayoutTests/storage/indexeddb/delete-closed-database-object-expected.txt
index f0a4b28..371472f 100644
--- a/LayoutTests/storage/indexeddb/delete-closed-database-object-expected.txt
+++ b/LayoutTests/storage/indexeddb/delete-closed-database-object-expected.txt
@@ -3,8 +3,9 @@
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
diff --git a/LayoutTests/storage/indexeddb/delete-closed-database-object.html b/LayoutTests/storage/indexeddb/delete-closed-database-object.html
index ab0f5cf..8fe858f 100644
--- a/LayoutTests/storage/indexeddb/delete-closed-database-object.html
+++ b/LayoutTests/storage/indexeddb/delete-closed-database-object.html
@@ -12,8 +12,7 @@
function test() {
- indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
+ removeVendorPrefixes();
openDBConnection();
}
diff --git a/LayoutTests/storage/indexeddb/delete-range-expected.txt b/LayoutTests/storage/indexeddb/delete-range-expected.txt
index 84cb76c..5492560 100644
--- a/LayoutTests/storage/indexeddb/delete-range-expected.txt
+++ b/LayoutTests/storage/indexeddb/delete-range-expected.txt
@@ -3,12 +3,9 @@
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
diff --git a/LayoutTests/storage/indexeddb/delete-range.html b/LayoutTests/storage/indexeddb/delete-range.html
index 5cab905..6dab1ba 100644
--- a/LayoutTests/storage/indexeddb/delete-range.html
+++ b/LayoutTests/storage/indexeddb/delete-range.html
@@ -12,12 +12,7 @@
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;
diff --git a/LayoutTests/storage/indexeddb/deleteIndex-expected.txt b/LayoutTests/storage/indexeddb/deleteIndex-expected.txt
index 106b2ff..e0d76fd 100644
--- a/LayoutTests/storage/indexeddb/deleteIndex-expected.txt
+++ b/LayoutTests/storage/indexeddb/deleteIndex-expected.txt
@@ -3,10 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/deleteIndex.html b/LayoutTests/storage/indexeddb/deleteIndex.html
index d847b5b..13ce1f3 100644
--- a/LayoutTests/storage/indexeddb/deleteIndex.html
+++ b/LayoutTests/storage/indexeddb/deleteIndex.html
@@ -13,11 +13,7 @@
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;
diff --git a/LayoutTests/storage/indexeddb/deleteObjectStore-name-argument-required-expected.txt b/LayoutTests/storage/indexeddb/deleteObjectStore-name-argument-required-expected.txt
index a974fa4..ab6463c 100644
--- a/LayoutTests/storage/indexeddb/deleteObjectStore-name-argument-required-expected.txt
+++ b/LayoutTests/storage/indexeddb/deleteObjectStore-name-argument-required-expected.txt
@@ -3,14 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/deleteObjectStore-name-argument-required.html b/LayoutTests/storage/indexeddb/deleteObjectStore-name-argument-required.html
index 6b9d1ad..f6c5c6a 100644
--- a/LayoutTests/storage/indexeddb/deleteObjectStore-name-argument-required.html
+++ b/LayoutTests/storage/indexeddb/deleteObjectStore-name-argument-required.html
@@ -13,14 +13,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/deleteObjectStore-null-name-expected.txt b/LayoutTests/storage/indexeddb/deleteObjectStore-null-name-expected.txt
index a4e11e8..fdec05f 100644
--- a/LayoutTests/storage/indexeddb/deleteObjectStore-null-name-expected.txt
+++ b/LayoutTests/storage/indexeddb/deleteObjectStore-null-name-expected.txt
@@ -3,14 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/deleteObjectStore-null-name.html b/LayoutTests/storage/indexeddb/deleteObjectStore-null-name.html
index 56a621d..4651cf1 100644
--- a/LayoutTests/storage/indexeddb/deleteObjectStore-null-name.html
+++ b/LayoutTests/storage/indexeddb/deleteObjectStore-null-name.html
@@ -13,14 +13,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/duplicates-expected.txt b/LayoutTests/storage/indexeddb/duplicates-expected.txt
index c539769..00c7744 100644
--- a/LayoutTests/storage/indexeddb/duplicates-expected.txt
+++ b/LayoutTests/storage/indexeddb/duplicates-expected.txt
@@ -3,7 +3,10 @@
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.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():
diff --git a/LayoutTests/storage/indexeddb/duplicates.html b/LayoutTests/storage/indexeddb/duplicates.html
index 423607b..328f8f2 100644
--- a/LayoutTests/storage/indexeddb/duplicates.html
+++ b/LayoutTests/storage/indexeddb/duplicates.html
@@ -14,9 +14,9 @@
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 @@
finishJSTest();
}
+removeVendorPrefixes();
test();
diff --git a/LayoutTests/storage/indexeddb/error-causes-abort-by-default-expected.txt b/LayoutTests/storage/indexeddb/error-causes-abort-by-default-expected.txt
index 8a55d9f..5e8c279 100644
--- a/LayoutTests/storage/indexeddb/error-causes-abort-by-default-expected.txt
+++ b/LayoutTests/storage/indexeddb/error-causes-abort-by-default-expected.txt
@@ -3,7 +3,10 @@
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 @@
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 @@
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 @@
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')
diff --git a/LayoutTests/storage/indexeddb/error-causes-abort-by-default.html b/LayoutTests/storage/indexeddb/error-causes-abort-by-default.html
index 7c1025d..c6bc627 100644
--- a/LayoutTests/storage/indexeddb/error-causes-abort-by-default.html
+++ b/LayoutTests/storage/indexeddb/error-causes-abort-by-default.html
@@ -12,7 +12,8 @@
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 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 @@
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 @@
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')");
diff --git a/LayoutTests/storage/indexeddb/exception-in-event-aborts-expected.txt b/LayoutTests/storage/indexeddb/exception-in-event-aborts-expected.txt
index 04becde..e7277db 100644
--- a/LayoutTests/storage/indexeddb/exception-in-event-aborts-expected.txt
+++ b/LayoutTests/storage/indexeddb/exception-in-event-aborts-expected.txt
@@ -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 @@
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 @@
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 @@
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 @@
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')
diff --git a/LayoutTests/storage/indexeddb/exception-in-event-aborts.html b/LayoutTests/storage/indexeddb/exception-in-event-aborts.html
index a2dc2c2..8a217a3 100644
--- a/LayoutTests/storage/indexeddb/exception-in-event-aborts.html
+++ b/LayoutTests/storage/indexeddb/exception-in-event-aborts.html
@@ -12,7 +12,8 @@
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 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 @@
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 @@
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 @@
{
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')");
diff --git a/LayoutTests/storage/indexeddb/factory-basics-expected.txt b/LayoutTests/storage/indexeddb/factory-basics-expected.txt
index cb85b76..055c7ff 100644
--- a/LayoutTests/storage/indexeddb/factory-basics-expected.txt
+++ b/LayoutTests/storage/indexeddb/factory-basics-expected.txt
@@ -3,8 +3,9 @@
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
diff --git a/LayoutTests/storage/indexeddb/factory-basics.html b/LayoutTests/storage/indexeddb/factory-basics.html
index 6afec0f..a517ede 100644
--- a/LayoutTests/storage/indexeddb/factory-basics.html
+++ b/LayoutTests/storage/indexeddb/factory-basics.html
@@ -12,8 +12,7 @@
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'");
diff --git a/LayoutTests/storage/indexeddb/factory-cmp-expected.txt b/LayoutTests/storage/indexeddb/factory-cmp-expected.txt
index 5b7c4c3..e382f5d 100644
--- a/LayoutTests/storage/indexeddb/factory-cmp-expected.txt
+++ b/LayoutTests/storage/indexeddb/factory-cmp-expected.txt
@@ -3,10 +3,9 @@
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
diff --git a/LayoutTests/storage/indexeddb/factory-cmp.html b/LayoutTests/storage/indexeddb/factory-cmp.html
index 79f460f..f9fbef61 100644
--- a/LayoutTests/storage/indexeddb/factory-cmp.html
+++ b/LayoutTests/storage/indexeddb/factory-cmp.html
@@ -12,10 +12,7 @@
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'");
diff --git a/LayoutTests/storage/indexeddb/factory-deletedatabase-expected.txt b/LayoutTests/storage/indexeddb/factory-deletedatabase-expected.txt
index 46217f7..330ac86 100644
--- a/LayoutTests/storage/indexeddb/factory-deletedatabase-expected.txt
+++ b/LayoutTests/storage/indexeddb/factory-deletedatabase-expected.txt
@@ -3,7 +3,10 @@
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.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
diff --git a/LayoutTests/storage/indexeddb/factory-deletedatabase-interactions-expected.txt b/LayoutTests/storage/indexeddb/factory-deletedatabase-interactions-expected.txt
index e048ff9..c9a5adc 100644
--- a/LayoutTests/storage/indexeddb/factory-deletedatabase-interactions-expected.txt
+++ b/LayoutTests/storage/indexeddb/factory-deletedatabase-interactions-expected.txt
@@ -3,8 +3,9 @@
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 = []
diff --git a/LayoutTests/storage/indexeddb/factory-deletedatabase-interactions.html b/LayoutTests/storage/indexeddb/factory-deletedatabase-interactions.html
index c3b9174..1c21aef 100644
--- a/LayoutTests/storage/indexeddb/factory-deletedatabase-interactions.html
+++ b/LayoutTests/storage/indexeddb/factory-deletedatabase-interactions.html
@@ -98,8 +98,7 @@
}
function test() {
- indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
+ removeVendorPrefixes();
test1();
}
diff --git a/LayoutTests/storage/indexeddb/factory-deletedatabase.html b/LayoutTests/storage/indexeddb/factory-deletedatabase.html
index 467e1f0..47b6a9e 100644
--- a/LayoutTests/storage/indexeddb/factory-deletedatabase.html
+++ b/LayoutTests/storage/indexeddb/factory-deletedatabase.html
@@ -12,7 +12,8 @@
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 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 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;
}
diff --git a/LayoutTests/storage/indexeddb/index-basics-expected.txt b/LayoutTests/storage/indexeddb/index-basics-expected.txt
index 0a8514f..8dc4874 100644
--- a/LayoutTests/storage/indexeddb/index-basics-expected.txt
+++ b/LayoutTests/storage/indexeddb/index-basics-expected.txt
@@ -3,7 +3,10 @@
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():
diff --git a/LayoutTests/storage/indexeddb/index-basics-workers-expected.txt b/LayoutTests/storage/indexeddb/index-basics-workers-expected.txt
index 159b395..4ba1093 100644
--- a/LayoutTests/storage/indexeddb/index-basics-workers-expected.txt
+++ b/LayoutTests/storage/indexeddb/index-basics-workers-expected.txt
@@ -4,7 +4,10 @@
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():
diff --git a/LayoutTests/storage/indexeddb/index-count-expected.txt b/LayoutTests/storage/indexeddb/index-count-expected.txt
index 00fa4a4..8a87503 100644
--- a/LayoutTests/storage/indexeddb/index-count-expected.txt
+++ b/LayoutTests/storage/indexeddb/index-count-expected.txt
@@ -3,10 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/index-count.html b/LayoutTests/storage/indexeddb/index-count.html
index 65aa5d2..938b739 100644
--- a/LayoutTests/storage/indexeddb/index-count.html
+++ b/LayoutTests/storage/indexeddb/index-count.html
@@ -12,10 +12,7 @@
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() {
diff --git a/LayoutTests/storage/indexeddb/index-cursor-expected.txt b/LayoutTests/storage/indexeddb/index-cursor-expected.txt
index 800a5cc..3714109 100644
--- a/LayoutTests/storage/indexeddb/index-cursor-expected.txt
+++ b/LayoutTests/storage/indexeddb/index-cursor-expected.txt
@@ -3,7 +3,10 @@
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
diff --git a/LayoutTests/storage/indexeddb/index-cursor.html b/LayoutTests/storage/indexeddb/index-cursor.html
index b653c00..f1d036e 100644
--- a/LayoutTests/storage/indexeddb/index-cursor.html
+++ b/LayoutTests/storage/indexeddb/index-cursor.html
@@ -25,7 +25,7 @@
function openDatabase()
{
- result = evalAndLog("webkitIndexedDB.open('index-cursor')");
+ result = evalAndLog("indexedDB.open('index-cursor')");
result.onsuccess = setVersion;
result.onerror = unexpectedErrorCallback;
}
@@ -172,13 +172,13 @@
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 @@
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>
diff --git a/LayoutTests/storage/indexeddb/index-get-key-argument-required-expected.txt b/LayoutTests/storage/indexeddb/index-get-key-argument-required-expected.txt
index 14787e4..feda135 100644
--- a/LayoutTests/storage/indexeddb/index-get-key-argument-required-expected.txt
+++ b/LayoutTests/storage/indexeddb/index-get-key-argument-required-expected.txt
@@ -3,14 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/index-get-key-argument-required.html b/LayoutTests/storage/indexeddb/index-get-key-argument-required.html
index e236d9c..2e26a1c 100644
--- a/LayoutTests/storage/indexeddb/index-get-key-argument-required.html
+++ b/LayoutTests/storage/indexeddb/index-get-key-argument-required.html
@@ -13,14 +13,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/index-multientry-expected.txt b/LayoutTests/storage/indexeddb/index-multientry-expected.txt
index 93b89b8..e0aa6ac 100644
--- a/LayoutTests/storage/indexeddb/index-multientry-expected.txt
+++ b/LayoutTests/storage/indexeddb/index-multientry-expected.txt
@@ -3,10 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/index-multientry.html b/LayoutTests/storage/indexeddb/index-multientry.html
index 9f96eff..3703651 100644
--- a/LayoutTests/storage/indexeddb/index-multientry.html
+++ b/LayoutTests/storage/indexeddb/index-multientry.html
@@ -12,10 +12,7 @@
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;
diff --git a/LayoutTests/storage/indexeddb/index-population-expected.txt b/LayoutTests/storage/indexeddb/index-population-expected.txt
index 12b2cab..c8b8e5e 100644
--- a/LayoutTests/storage/indexeddb/index-population-expected.txt
+++ b/LayoutTests/storage/indexeddb/index-population-expected.txt
@@ -3,12 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/index-population.html b/LayoutTests/storage/indexeddb/index-population.html
index 292a8cf..d78d8a0 100644
--- a/LayoutTests/storage/indexeddb/index-population.html
+++ b/LayoutTests/storage/indexeddb/index-population.html
@@ -12,12 +12,7 @@
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;
diff --git a/LayoutTests/storage/indexeddb/index-unique-expected.txt b/LayoutTests/storage/indexeddb/index-unique-expected.txt
index b1a0273..35ce055 100644
--- a/LayoutTests/storage/indexeddb/index-unique-expected.txt
+++ b/LayoutTests/storage/indexeddb/index-unique-expected.txt
@@ -3,7 +3,10 @@
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 @@
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')
diff --git a/LayoutTests/storage/indexeddb/index-unique.html b/LayoutTests/storage/indexeddb/index-unique.html
index 38a62e42..a3d2803 100644
--- a/LayoutTests/storage/indexeddb/index-unique.html
+++ b/LayoutTests/storage/indexeddb/index-unique.html
@@ -12,7 +12,8 @@
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 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 @@
// 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 @@
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 @@
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;
}
diff --git a/LayoutTests/storage/indexeddb/invalid-keys-expected.txt b/LayoutTests/storage/indexeddb/invalid-keys-expected.txt
index 687c92f..358c679 100644
--- a/LayoutTests/storage/indexeddb/invalid-keys-expected.txt
+++ b/LayoutTests/storage/indexeddb/invalid-keys-expected.txt
@@ -3,10 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/invalid-keys.html b/LayoutTests/storage/indexeddb/invalid-keys.html
index 87e45da..422389a 100644
--- a/LayoutTests/storage/indexeddb/invalid-keys.html
+++ b/LayoutTests/storage/indexeddb/invalid-keys.html
@@ -13,10 +13,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/key-generator-expected.txt b/LayoutTests/storage/indexeddb/key-generator-expected.txt
index 509d248..8dd0827 100644
--- a/LayoutTests/storage/indexeddb/key-generator-expected.txt
+++ b/LayoutTests/storage/indexeddb/key-generator-expected.txt
@@ -3,12 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/key-generator.html b/LayoutTests/storage/indexeddb/key-generator.html
index 55a1345..49ab62c 100644
--- a/LayoutTests/storage/indexeddb/key-generator.html
+++ b/LayoutTests/storage/indexeddb/key-generator.html
@@ -12,12 +12,7 @@
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();
}
diff --git a/LayoutTests/storage/indexeddb/key-sort-order-across-types-expected.txt b/LayoutTests/storage/indexeddb/key-sort-order-across-types-expected.txt
index fe15e6f..fe5bf75 100644
--- a/LayoutTests/storage/indexeddb/key-sort-order-across-types-expected.txt
+++ b/LayoutTests/storage/indexeddb/key-sort-order-across-types-expected.txt
@@ -3,14 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/key-sort-order-across-types.html b/LayoutTests/storage/indexeddb/key-sort-order-across-types.html
index dde0e0c..38513c2 100644
--- a/LayoutTests/storage/indexeddb/key-sort-order-across-types.html
+++ b/LayoutTests/storage/indexeddb/key-sort-order-across-types.html
@@ -13,14 +13,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/key-sort-order-date-expected.txt b/LayoutTests/storage/indexeddb/key-sort-order-date-expected.txt
index be2d714..c53cdeb 100644
--- a/LayoutTests/storage/indexeddb/key-sort-order-date-expected.txt
+++ b/LayoutTests/storage/indexeddb/key-sort-order-date-expected.txt
@@ -3,14 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/key-sort-order-date.html b/LayoutTests/storage/indexeddb/key-sort-order-date.html
index c719ad1..ac7b36a 100644
--- a/LayoutTests/storage/indexeddb/key-sort-order-date.html
+++ b/LayoutTests/storage/indexeddb/key-sort-order-date.html
@@ -13,14 +13,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/key-type-array-expected.txt b/LayoutTests/storage/indexeddb/key-type-array-expected.txt
index dab19fe..453d590 100644
--- a/LayoutTests/storage/indexeddb/key-type-array-expected.txt
+++ b/LayoutTests/storage/indexeddb/key-type-array-expected.txt
@@ -3,11 +3,12 @@
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
diff --git a/LayoutTests/storage/indexeddb/key-type-array.html b/LayoutTests/storage/indexeddb/key-type-array.html
index e165032..8028702 100644
--- a/LayoutTests/storage/indexeddb/key-type-array.html
+++ b/LayoutTests/storage/indexeddb/key-type-array.html
@@ -13,13 +13,12 @@
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");
diff --git a/LayoutTests/storage/indexeddb/key-type-infinity-expected.txt b/LayoutTests/storage/indexeddb/key-type-infinity-expected.txt
index 48de3e3..3e196f5 100644
--- a/LayoutTests/storage/indexeddb/key-type-infinity-expected.txt
+++ b/LayoutTests/storage/indexeddb/key-type-infinity-expected.txt
@@ -3,14 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/key-type-infinity.html b/LayoutTests/storage/indexeddb/key-type-infinity.html
index 7241f7b..bae3cb0 100644
--- a/LayoutTests/storage/indexeddb/key-type-infinity.html
+++ b/LayoutTests/storage/indexeddb/key-type-infinity.html
@@ -13,14 +13,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/keypath-basics-expected.txt b/LayoutTests/storage/indexeddb/keypath-basics-expected.txt
index a35c91e..18e814c 100644
--- a/LayoutTests/storage/indexeddb/keypath-basics-expected.txt
+++ b/LayoutTests/storage/indexeddb/keypath-basics-expected.txt
@@ -3,14 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/keypath-basics.html b/LayoutTests/storage/indexeddb/keypath-basics.html
index 223d64f..552b8f7 100644
--- a/LayoutTests/storage/indexeddb/keypath-basics.html
+++ b/LayoutTests/storage/indexeddb/keypath-basics.html
@@ -13,15 +13,7 @@
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)");
diff --git a/LayoutTests/storage/indexeddb/keypath-edges-expected.txt b/LayoutTests/storage/indexeddb/keypath-edges-expected.txt
index 92d2ae9..4bf44f9 100644
--- a/LayoutTests/storage/indexeddb/keypath-edges-expected.txt
+++ b/LayoutTests/storage/indexeddb/keypath-edges-expected.txt
@@ -3,12 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/keypath-edges.html b/LayoutTests/storage/indexeddb/keypath-edges.html
index ed8a268..cfc3690 100644
--- a/LayoutTests/storage/indexeddb/keypath-edges.html
+++ b/LayoutTests/storage/indexeddb/keypath-edges.html
@@ -13,12 +13,7 @@
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;
diff --git a/LayoutTests/storage/indexeddb/keypath-fetch-key-expected.txt b/LayoutTests/storage/indexeddb/keypath-fetch-key-expected.txt
index 06d1d3e..69ca3a8 100644
--- a/LayoutTests/storage/indexeddb/keypath-fetch-key-expected.txt
+++ b/LayoutTests/storage/indexeddb/keypath-fetch-key-expected.txt
@@ -3,14 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/keypath-fetch-key.html b/LayoutTests/storage/indexeddb/keypath-fetch-key.html
index 965ecb8..9a69761 100644
--- a/LayoutTests/storage/indexeddb/keypath-fetch-key.html
+++ b/LayoutTests/storage/indexeddb/keypath-fetch-key.html
@@ -13,14 +13,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/keyrange-expected.txt b/LayoutTests/storage/indexeddb/keyrange-expected.txt
index 23657a7..e518362 100644
--- a/LayoutTests/storage/indexeddb/keyrange-expected.txt
+++ b/LayoutTests/storage/indexeddb/keyrange-expected.txt
@@ -3,16 +3,19 @@
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 '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 @@
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
diff --git a/LayoutTests/storage/indexeddb/keyrange-required-arguments-expected.txt b/LayoutTests/storage/indexeddb/keyrange-required-arguments-expected.txt
index b5643a6..4cad9d3 100644
--- a/LayoutTests/storage/indexeddb/keyrange-required-arguments-expected.txt
+++ b/LayoutTests/storage/indexeddb/keyrange-required-arguments-expected.txt
@@ -3,14 +3,9 @@
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.
diff --git a/LayoutTests/storage/indexeddb/keyrange-required-arguments.html b/LayoutTests/storage/indexeddb/keyrange-required-arguments.html
index 06287cc..0a04b2c 100644
--- a/LayoutTests/storage/indexeddb/keyrange-required-arguments.html
+++ b/LayoutTests/storage/indexeddb/keyrange-required-arguments.html
@@ -13,14 +13,7 @@
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();");
diff --git a/LayoutTests/storage/indexeddb/keyrange.html b/LayoutTests/storage/indexeddb/keyrange.html
index 7b00194..ada8270 100644
--- a/LayoutTests/storage/indexeddb/keyrange.html
+++ b/LayoutTests/storage/indexeddb/keyrange.html
@@ -12,7 +12,7 @@
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 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 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 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 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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();
diff --git a/LayoutTests/storage/indexeddb/list-ordering-expected.txt b/LayoutTests/storage/indexeddb/list-ordering-expected.txt
index 4971db0..327d7ee 100644
--- a/LayoutTests/storage/indexeddb/list-ordering-expected.txt
+++ b/LayoutTests/storage/indexeddb/list-ordering-expected.txt
@@ -4,8 +4,9 @@
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
diff --git a/LayoutTests/storage/indexeddb/list-ordering.html b/LayoutTests/storage/indexeddb/list-ordering.html
index 74a4947..a48d9d8 100644
--- a/LayoutTests/storage/indexeddb/list-ordering.html
+++ b/LayoutTests/storage/indexeddb/list-ordering.html
@@ -40,9 +40,7 @@
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)");
diff --git a/LayoutTests/storage/indexeddb/mozilla/add-twice-failure-expected.txt b/LayoutTests/storage/indexeddb/mozilla/add-twice-failure-expected.txt
index 4b6db03..e60aa75 100644
--- a/LayoutTests/storage/indexeddb/mozilla/add-twice-failure-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/add-twice-failure-expected.txt
@@ -3,10 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/add-twice-failure.html b/LayoutTests/storage/indexeddb/mozilla/add-twice-failure.html
index d6e9148..b58c5b7 100644
--- a/LayoutTests/storage/indexeddb/mozilla/add-twice-failure.html
+++ b/LayoutTests/storage/indexeddb/mozilla/add-twice-failure.html
@@ -19,10 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/autoincrement-indexes-expected.txt b/LayoutTests/storage/indexeddb/mozilla/autoincrement-indexes-expected.txt
index 2396288..d461e7d 100644
--- a/LayoutTests/storage/indexeddb/mozilla/autoincrement-indexes-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/autoincrement-indexes-expected.txt
@@ -3,10 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/autoincrement-indexes.html b/LayoutTests/storage/indexeddb/mozilla/autoincrement-indexes.html
index faa0d69..35fdf02 100644
--- a/LayoutTests/storage/indexeddb/mozilla/autoincrement-indexes.html
+++ b/LayoutTests/storage/indexeddb/mozilla/autoincrement-indexes.html
@@ -19,10 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/bad-keypath-expected.txt b/LayoutTests/storage/indexeddb/mozilla/bad-keypath-expected.txt
index a9867cb..aa93111 100644
--- a/LayoutTests/storage/indexeddb/mozilla/bad-keypath-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/bad-keypath-expected.txt
@@ -3,10 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/bad-keypath.html b/LayoutTests/storage/indexeddb/mozilla/bad-keypath.html
index b2d9111..e299b91 100644
--- a/LayoutTests/storage/indexeddb/mozilla/bad-keypath.html
+++ b/LayoutTests/storage/indexeddb/mozilla/bad-keypath.html
@@ -19,10 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/clear-expected.txt b/LayoutTests/storage/indexeddb/mozilla/clear-expected.txt
index c24a84a..3b601f5 100644
--- a/LayoutTests/storage/indexeddb/mozilla/clear-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/clear-expected.txt
@@ -3,12 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/clear.html b/LayoutTests/storage/indexeddb/mozilla/clear.html
index 1e9756d..3d27386 100644
--- a/LayoutTests/storage/indexeddb/mozilla/clear.html
+++ b/LayoutTests/storage/indexeddb/mozilla/clear.html
@@ -19,12 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/create-index-unique-expected.txt b/LayoutTests/storage/indexeddb/mozilla/create-index-unique-expected.txt
index 4816d07..36f7365 100644
--- a/LayoutTests/storage/indexeddb/mozilla/create-index-unique-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/create-index-unique-expected.txt
@@ -3,12 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/create-index-unique.html b/LayoutTests/storage/indexeddb/mozilla/create-index-unique.html
index 27309a0..aa596ec 100644
--- a/LayoutTests/storage/indexeddb/mozilla/create-index-unique.html
+++ b/LayoutTests/storage/indexeddb/mozilla/create-index-unique.html
@@ -19,12 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/create-index-with-integer-keys-expected.txt b/LayoutTests/storage/indexeddb/mozilla/create-index-with-integer-keys-expected.txt
index ff05c79..fa0a820 100644
--- a/LayoutTests/storage/indexeddb/mozilla/create-index-with-integer-keys-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/create-index-with-integer-keys-expected.txt
@@ -3,12 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/create-index-with-integer-keys.html b/LayoutTests/storage/indexeddb/mozilla/create-index-with-integer-keys.html
index ce9ec9b..cc7b0ae 100644
--- a/LayoutTests/storage/indexeddb/mozilla/create-index-with-integer-keys.html
+++ b/LayoutTests/storage/indexeddb/mozilla/create-index-with-integer-keys.html
@@ -19,12 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt b/LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt
index bce89bf..02d038b 100644
--- a/LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics-expected.txt
@@ -3,12 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics.html b/LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics.html
index 408fe4b..651a0a4 100644
--- a/LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics.html
+++ b/LayoutTests/storage/indexeddb/mozilla/create-objectstore-basics.html
@@ -19,12 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/create-objectstore-null-name-expected.txt b/LayoutTests/storage/indexeddb/mozilla/create-objectstore-null-name-expected.txt
index 8106f74..2d34d0a 100644
--- a/LayoutTests/storage/indexeddb/mozilla/create-objectstore-null-name-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/create-objectstore-null-name-expected.txt
@@ -3,10 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/create-objectstore-null-name.html b/LayoutTests/storage/indexeddb/mozilla/create-objectstore-null-name.html
index f77b7a7..fec0502 100644
--- a/LayoutTests/storage/indexeddb/mozilla/create-objectstore-null-name.html
+++ b/LayoutTests/storage/indexeddb/mozilla/create-objectstore-null-name.html
@@ -19,10 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/cursor-mutation-expected.txt b/LayoutTests/storage/indexeddb/mozilla/cursor-mutation-expected.txt
index 7492d2e..3989eca 100644
--- a/LayoutTests/storage/indexeddb/mozilla/cursor-mutation-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/cursor-mutation-expected.txt
@@ -3,12 +3,9 @@
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)
diff --git a/LayoutTests/storage/indexeddb/mozilla/cursor-mutation-objectstore-only-expected.txt b/LayoutTests/storage/indexeddb/mozilla/cursor-mutation-objectstore-only-expected.txt
index 6b4e8ac..50d5840 100644
--- a/LayoutTests/storage/indexeddb/mozilla/cursor-mutation-objectstore-only-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/cursor-mutation-objectstore-only-expected.txt
@@ -3,12 +3,9 @@
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
diff --git a/LayoutTests/storage/indexeddb/mozilla/cursor-mutation-objectstore-only.html b/LayoutTests/storage/indexeddb/mozilla/cursor-mutation-objectstore-only.html
index ea89537..4557cd5 100644
--- a/LayoutTests/storage/indexeddb/mozilla/cursor-mutation-objectstore-only.html
+++ b/LayoutTests/storage/indexeddb/mozilla/cursor-mutation-objectstore-only.html
@@ -19,12 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/cursor-mutation.html b/LayoutTests/storage/indexeddb/mozilla/cursor-mutation.html
index 8092a7b..c316b7a 100644
--- a/LayoutTests/storage/indexeddb/mozilla/cursor-mutation.html
+++ b/LayoutTests/storage/indexeddb/mozilla/cursor-mutation.html
@@ -19,12 +19,7 @@
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';
diff --git a/LayoutTests/storage/indexeddb/mozilla/cursor-update-updates-indexes-expected.txt b/LayoutTests/storage/indexeddb/mozilla/cursor-update-updates-indexes-expected.txt
index afbdde2..74f749a 100644
--- a/LayoutTests/storage/indexeddb/mozilla/cursor-update-updates-indexes-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/cursor-update-updates-indexes-expected.txt
@@ -3,12 +3,9 @@
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
diff --git a/LayoutTests/storage/indexeddb/mozilla/cursor-update-updates-indexes.html b/LayoutTests/storage/indexeddb/mozilla/cursor-update-updates-indexes.html
index 1b9f04b..b3099af2 100644
--- a/LayoutTests/storage/indexeddb/mozilla/cursor-update-updates-indexes.html
+++ b/LayoutTests/storage/indexeddb/mozilla/cursor-update-updates-indexes.html
@@ -19,12 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/cursors-expected.txt b/LayoutTests/storage/indexeddb/mozilla/cursors-expected.txt
index ddaabfb..81a8e3d 100644
--- a/LayoutTests/storage/indexeddb/mozilla/cursors-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/cursors-expected.txt
@@ -3,14 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/cursors.html b/LayoutTests/storage/indexeddb/mozilla/cursors.html
index d844c7a..ee07874 100644
--- a/LayoutTests/storage/indexeddb/mozilla/cursors.html
+++ b/LayoutTests/storage/indexeddb/mozilla/cursors.html
@@ -19,14 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/delete-result-expected.txt b/LayoutTests/storage/indexeddb/mozilla/delete-result-expected.txt
index 07554b3..418fb64 100644
--- a/LayoutTests/storage/indexeddb/mozilla/delete-result-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/delete-result-expected.txt
@@ -3,8 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/delete-result.html b/LayoutTests/storage/indexeddb/mozilla/delete-result.html
index 40ac1f3..487a112 100644
--- a/LayoutTests/storage/indexeddb/mozilla/delete-result.html
+++ b/LayoutTests/storage/indexeddb/mozilla/delete-result.html
@@ -19,8 +19,7 @@
function test()
{
- indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
+ removeVendorPrefixes();
name = window.location.pathname;
description = "My Test Database";
diff --git a/LayoutTests/storage/indexeddb/mozilla/event-source-expected.txt b/LayoutTests/storage/indexeddb/mozilla/event-source-expected.txt
index cf9f156..8c3f1b2 100644
--- a/LayoutTests/storage/indexeddb/mozilla/event-source-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/event-source-expected.txt
@@ -3,8 +3,9 @@
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
diff --git a/LayoutTests/storage/indexeddb/mozilla/event-source.html b/LayoutTests/storage/indexeddb/mozilla/event-source.html
index 7110fd5..15135e1 100644
--- a/LayoutTests/storage/indexeddb/mozilla/event-source.html
+++ b/LayoutTests/storage/indexeddb/mozilla/event-source.html
@@ -19,8 +19,7 @@
function test()
{
- indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
+ removeVendorPrefixes();
name = window.location.pathname;
description = "My Test Database";
diff --git a/LayoutTests/storage/indexeddb/mozilla/global-data-expected.txt b/LayoutTests/storage/indexeddb/mozilla/global-data-expected.txt
index 395fd97..7a0f255 100644
--- a/LayoutTests/storage/indexeddb/mozilla/global-data-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/global-data-expected.txt
@@ -3,10 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/global-data.html b/LayoutTests/storage/indexeddb/mozilla/global-data.html
index 73698d4..2ef5531 100644
--- a/LayoutTests/storage/indexeddb/mozilla/global-data.html
+++ b/LayoutTests/storage/indexeddb/mozilla/global-data.html
@@ -19,10 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/indexes-expected.txt b/LayoutTests/storage/indexeddb/mozilla/indexes-expected.txt
index 8483ff3..397986e 100644
--- a/LayoutTests/storage/indexeddb/mozilla/indexes-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/indexes-expected.txt
@@ -3,16 +3,9 @@
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
diff --git a/LayoutTests/storage/indexeddb/mozilla/indexes.html b/LayoutTests/storage/indexeddb/mozilla/indexes.html
index 892b3e1..83ed839 100644
--- a/LayoutTests/storage/indexeddb/mozilla/indexes.html
+++ b/LayoutTests/storage/indexeddb/mozilla/indexes.html
@@ -19,16 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt b/LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt
index f50a06a..ad6f958 100644
--- a/LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key-expected.txt
@@ -3,8 +3,9 @@
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 @@
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
diff --git a/LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key.html b/LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key.html
index 5b7bca4..010a827 100644
--- a/LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key.html
+++ b/LayoutTests/storage/indexeddb/mozilla/key-requirements-delete-null-key.html
@@ -19,8 +19,7 @@
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 @@
{
deleteAllObjectStores(db);
objectStore = evalAndLog("objectStore = db.createObjectStore('bar');");
- evalAndExpectException("objectStore.delete(null);", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("objectStore.delete(null);", "IDBDatabaseException.DATA_ERR");
finishJSTest();
}
diff --git a/LayoutTests/storage/indexeddb/mozilla/key-requirements-expected.txt b/LayoutTests/storage/indexeddb/mozilla/key-requirements-expected.txt
index 67b8645..f0fc6be 100644
--- a/LayoutTests/storage/indexeddb/mozilla/key-requirements-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/key-requirements-expected.txt
@@ -3,8 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt b/LayoutTests/storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt
index 4d3bd3a..883c1ff 100644
--- a/LayoutTests/storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/key-requirements-inline-and-passed-expected.txt
@@ -3,9 +3,10 @@
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 @@
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
diff --git a/LayoutTests/storage/indexeddb/mozilla/key-requirements-inline-and-passed.html b/LayoutTests/storage/indexeddb/mozilla/key-requirements-inline-and-passed.html
index f5b2902..ac6cd4d 100644
--- a/LayoutTests/storage/indexeddb/mozilla/key-requirements-inline-and-passed.html
+++ b/LayoutTests/storage/indexeddb/mozilla/key-requirements-inline-and-passed.html
@@ -19,12 +19,11 @@
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 @@
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();
}
diff --git a/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt b/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt
index ea5b251..aaba353 100644
--- a/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-no-key-expected.txt
@@ -3,10 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-no-key.html b/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-no-key.html
index b5865a2..889e9a3 100644
--- a/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-no-key.html
+++ b/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-no-key.html
@@ -19,10 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt b/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt
index 3cf8b5c..0b17eff 100644
--- a/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-key-expected.txt
@@ -3,10 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-key.html b/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-key.html
index cf848d1..16319ca 100644
--- a/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-key.html
+++ b/LayoutTests/storage/indexeddb/mozilla/key-requirements-put-null-key.html
@@ -19,10 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/key-requirements.html b/LayoutTests/storage/indexeddb/mozilla/key-requirements.html
index 80ed958..4e98592 100644
--- a/LayoutTests/storage/indexeddb/mozilla/key-requirements.html
+++ b/LayoutTests/storage/indexeddb/mozilla/key-requirements.html
@@ -19,8 +19,7 @@
function test()
{
- indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
+ removeVendorPrefixes();
name = window.location.pathname;
description = "My Test Database";
diff --git a/LayoutTests/storage/indexeddb/mozilla/object-cursors-expected.txt b/LayoutTests/storage/indexeddb/mozilla/object-cursors-expected.txt
index 8a11945..d4ec3e6 100644
--- a/LayoutTests/storage/indexeddb/mozilla/object-cursors-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/object-cursors-expected.txt
@@ -3,8 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/object-cursors.html b/LayoutTests/storage/indexeddb/mozilla/object-cursors.html
index 229084d..50bb6fa 100644
--- a/LayoutTests/storage/indexeddb/mozilla/object-cursors.html
+++ b/LayoutTests/storage/indexeddb/mozilla/object-cursors.html
@@ -19,8 +19,7 @@
function test()
{
- indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
+ removeVendorPrefixes();
name = window.location.pathname;
description = "My Test Database";
diff --git a/LayoutTests/storage/indexeddb/mozilla/object-identity-expected.txt b/LayoutTests/storage/indexeddb/mozilla/object-identity-expected.txt
index b6a4e97..d120cfc 100644
--- a/LayoutTests/storage/indexeddb/mozilla/object-identity-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/object-identity-expected.txt
@@ -3,8 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/object-identity.html b/LayoutTests/storage/indexeddb/mozilla/object-identity.html
index 5c65d25..8f09330 100644
--- a/LayoutTests/storage/indexeddb/mozilla/object-identity.html
+++ b/LayoutTests/storage/indexeddb/mozilla/object-identity.html
@@ -19,8 +19,7 @@
function test()
{
- indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
+ removeVendorPrefixes();
name = window.location.pathname;
description = "My Test Database";
diff --git a/LayoutTests/storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put-expected.txt b/LayoutTests/storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put-expected.txt
index d1ad501..b803d8f 100644
--- a/LayoutTests/storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put-expected.txt
@@ -3,10 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put.html b/LayoutTests/storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put.html
index ae80520..83fe2f8 100644
--- a/LayoutTests/storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put.html
+++ b/LayoutTests/storage/indexeddb/mozilla/object-store-inline-autoincrement-key-added-on-put.html
@@ -19,10 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/object-store-remove-values-expected.txt b/LayoutTests/storage/indexeddb/mozilla/object-store-remove-values-expected.txt
index f74352d..2d09eda 100644
--- a/LayoutTests/storage/indexeddb/mozilla/object-store-remove-values-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/object-store-remove-values-expected.txt
@@ -3,8 +3,9 @@
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 = [
diff --git a/LayoutTests/storage/indexeddb/mozilla/object-store-remove-values.html b/LayoutTests/storage/indexeddb/mozilla/object-store-remove-values.html
index 6c8d9d6..9b3081c 100644
--- a/LayoutTests/storage/indexeddb/mozilla/object-store-remove-values.html
+++ b/LayoutTests/storage/indexeddb/mozilla/object-store-remove-values.html
@@ -19,8 +19,7 @@
function test()
{
- indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
+ removeVendorPrefixes();
name = window.location.pathname;
description = "My Test Database";
diff --git a/LayoutTests/storage/indexeddb/mozilla/objectstorenames-expected.txt b/LayoutTests/storage/indexeddb/mozilla/objectstorenames-expected.txt
index b1e55ae..cfff31b 100644
--- a/LayoutTests/storage/indexeddb/mozilla/objectstorenames-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/objectstorenames-expected.txt
@@ -3,8 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/objectstorenames.html b/LayoutTests/storage/indexeddb/mozilla/objectstorenames.html
index af6795f..1416290 100644
--- a/LayoutTests/storage/indexeddb/mozilla/objectstorenames.html
+++ b/LayoutTests/storage/indexeddb/mozilla/objectstorenames.html
@@ -19,8 +19,7 @@
function test()
{
- indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
+ removeVendorPrefixes();
name = window.location.pathname;
description = "My Test Database";
diff --git a/LayoutTests/storage/indexeddb/mozilla/odd-result-order-expected.txt b/LayoutTests/storage/indexeddb/mozilla/odd-result-order-expected.txt
index 9bc0fd8..5adc235 100644
--- a/LayoutTests/storage/indexeddb/mozilla/odd-result-order-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/odd-result-order-expected.txt
@@ -3,14 +3,9 @@
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;
diff --git a/LayoutTests/storage/indexeddb/mozilla/odd-result-order.html b/LayoutTests/storage/indexeddb/mozilla/odd-result-order.html
index b449a93..7850c5c 100644
--- a/LayoutTests/storage/indexeddb/mozilla/odd-result-order.html
+++ b/LayoutTests/storage/indexeddb/mozilla/odd-result-order.html
@@ -19,14 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/open-database-null-name-expected.txt b/LayoutTests/storage/indexeddb/mozilla/open-database-null-name-expected.txt
index 738b177..d9c7ac9 100644
--- a/LayoutTests/storage/indexeddb/mozilla/open-database-null-name-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/open-database-null-name-expected.txt
@@ -3,12 +3,9 @@
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'
diff --git a/LayoutTests/storage/indexeddb/mozilla/open-database-null-name.html b/LayoutTests/storage/indexeddb/mozilla/open-database-null-name.html
index b50af92..357d633 100644
--- a/LayoutTests/storage/indexeddb/mozilla/open-database-null-name.html
+++ b/LayoutTests/storage/indexeddb/mozilla/open-database-null-name.html
@@ -19,12 +19,7 @@
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);");
diff --git a/LayoutTests/storage/indexeddb/mozilla/put-get-values-expected.txt b/LayoutTests/storage/indexeddb/mozilla/put-get-values-expected.txt
index caaf6fe..6a7bfff 100644
--- a/LayoutTests/storage/indexeddb/mozilla/put-get-values-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/put-get-values-expected.txt
@@ -3,8 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/put-get-values.html b/LayoutTests/storage/indexeddb/mozilla/put-get-values.html
index e5c7ba9..a50bcc5 100644
--- a/LayoutTests/storage/indexeddb/mozilla/put-get-values.html
+++ b/LayoutTests/storage/indexeddb/mozilla/put-get-values.html
@@ -19,8 +19,7 @@
function test()
{
- indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
+ removeVendorPrefixes();
name = window.location.pathname;
description = "My Test Database";
diff --git a/LayoutTests/storage/indexeddb/mozilla/readonly-transactions-expected.txt b/LayoutTests/storage/indexeddb/mozilla/readonly-transactions-expected.txt
index bdabda7..07060f1 100644
--- a/LayoutTests/storage/indexeddb/mozilla/readonly-transactions-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/readonly-transactions-expected.txt
@@ -3,10 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/readonly-transactions.html b/LayoutTests/storage/indexeddb/mozilla/readonly-transactions.html
index 71aa11e..d319421 100644
--- a/LayoutTests/storage/indexeddb/mozilla/readonly-transactions.html
+++ b/LayoutTests/storage/indexeddb/mozilla/readonly-transactions.html
@@ -19,10 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/readwrite-transactions-expected.txt b/LayoutTests/storage/indexeddb/mozilla/readwrite-transactions-expected.txt
index fd595e6..68d21fe 100644
--- a/LayoutTests/storage/indexeddb/mozilla/readwrite-transactions-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/readwrite-transactions-expected.txt
@@ -3,12 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/readwrite-transactions.html b/LayoutTests/storage/indexeddb/mozilla/readwrite-transactions.html
index 2ddbab4..2813342 100644
--- a/LayoutTests/storage/indexeddb/mozilla/readwrite-transactions.html
+++ b/LayoutTests/storage/indexeddb/mozilla/readwrite-transactions.html
@@ -19,12 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/readyState-expected.txt b/LayoutTests/storage/indexeddb/mozilla/readyState-expected.txt
index 5f95882..fbad79f 100644
--- a/LayoutTests/storage/indexeddb/mozilla/readyState-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/readyState-expected.txt
@@ -3,14 +3,9 @@
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
-IDBRequest = window.IDBRequest || window.webkitIDBRequest;
-PASS IDBRequest == 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)
PASS request.readyState is IDBRequest.LOADING
openSuccess():
diff --git a/LayoutTests/storage/indexeddb/mozilla/readyState.html b/LayoutTests/storage/indexeddb/mozilla/readyState.html
index 979ac89..9fd590a 100644
--- a/LayoutTests/storage/indexeddb/mozilla/readyState.html
+++ b/LayoutTests/storage/indexeddb/mozilla/readyState.html
@@ -19,14 +19,7 @@
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");
- IDBRequest = evalAndLog("IDBRequest = window.IDBRequest || window.webkitIDBRequest;");
- shouldBeFalse("IDBRequest == null");
+ removeVendorPrefixes();
name = window.location.pathname;
description = "My Test Database";
diff --git a/LayoutTests/storage/indexeddb/mozilla/remove-index-expected.txt b/LayoutTests/storage/indexeddb/mozilla/remove-index-expected.txt
index ff6c0d5..f97df04 100644
--- a/LayoutTests/storage/indexeddb/mozilla/remove-index-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/remove-index-expected.txt
@@ -3,8 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/mozilla/remove-index.html b/LayoutTests/storage/indexeddb/mozilla/remove-index.html
index 657970c..a0a859e 100644
--- a/LayoutTests/storage/indexeddb/mozilla/remove-index.html
+++ b/LayoutTests/storage/indexeddb/mozilla/remove-index.html
@@ -19,8 +19,7 @@
function test()
{
- indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
+ removeVendorPrefixes();
name = window.location.pathname;
description = "My Test Database";
diff --git a/LayoutTests/storage/indexeddb/mozilla/remove-objectstore-expected.txt b/LayoutTests/storage/indexeddb/mozilla/remove-objectstore-expected.txt
index e43137d..aa80583 100644
--- a/LayoutTests/storage/indexeddb/mozilla/remove-objectstore-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/remove-objectstore-expected.txt
@@ -3,10 +3,9 @@
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
PASS db.objectStoreNames.length is 0
diff --git a/LayoutTests/storage/indexeddb/mozilla/remove-objectstore.html b/LayoutTests/storage/indexeddb/mozilla/remove-objectstore.html
index cb4c711..a652acc 100644
--- a/LayoutTests/storage/indexeddb/mozilla/remove-objectstore.html
+++ b/LayoutTests/storage/indexeddb/mozilla/remove-objectstore.html
@@ -19,10 +19,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/mozilla/versionchange-abort-expected.txt b/LayoutTests/storage/indexeddb/mozilla/versionchange-abort-expected.txt
index e9a5d3a..75b9207 100644
--- a/LayoutTests/storage/indexeddb/mozilla/versionchange-abort-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/versionchange-abort-expected.txt
@@ -3,8 +3,9 @@
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
initialVersion = db.version;
diff --git a/LayoutTests/storage/indexeddb/mozilla/versionchange-abort.html b/LayoutTests/storage/indexeddb/mozilla/versionchange-abort.html
index 97e4b42..0bc9635 100644
--- a/LayoutTests/storage/indexeddb/mozilla/versionchange-abort.html
+++ b/LayoutTests/storage/indexeddb/mozilla/versionchange-abort.html
@@ -19,8 +19,7 @@
function test()
{
- indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
+ removeVendorPrefixes();
name = window.location.pathname;
description = "My Test Database";
diff --git a/LayoutTests/storage/indexeddb/mozilla/versionchange-expected.txt b/LayoutTests/storage/indexeddb/mozilla/versionchange-expected.txt
index 78a2c60..aa8395a7 100644
--- a/LayoutTests/storage/indexeddb/mozilla/versionchange-expected.txt
+++ b/LayoutTests/storage/indexeddb/mozilla/versionchange-expected.txt
@@ -3,10 +3,9 @@
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;
-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)
db1 = event.target.result
versionChangeEventCount = 0;
diff --git a/LayoutTests/storage/indexeddb/mozilla/versionchange.html b/LayoutTests/storage/indexeddb/mozilla/versionchange.html
index 48ef947..1c77af8 100644
--- a/LayoutTests/storage/indexeddb/mozilla/versionchange.html
+++ b/LayoutTests/storage/indexeddb/mozilla/versionchange.html
@@ -19,10 +19,7 @@
function test()
{
- indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
- IDBTransaction = evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;");
- shouldBeFalse("IDBTransaction == null");
+ removeVendorPrefixes();
name = window.location.pathname;
description = "My Test Database";
diff --git a/LayoutTests/storage/indexeddb/mutating-cursor-expected.txt b/LayoutTests/storage/indexeddb/mutating-cursor-expected.txt
index 2b89b61..e748791 100644
--- a/LayoutTests/storage/indexeddb/mutating-cursor-expected.txt
+++ b/LayoutTests/storage/indexeddb/mutating-cursor-expected.txt
@@ -3,7 +3,10 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-webkitIndexedDB.open('mutating-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('mutating-cursor')
db = event.target.result
db.setVersion('1')
setVersionSuccess():
@@ -16,7 +19,7 @@
objectStore.add(3, 3).onerror = unexpectedErrorCallback
objectStore.add(4, 4).onerror = unexpectedErrorCallback
openForwardCursor()
-trans = db.transaction(['store'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['store'], IDBTransaction.READ_WRITE)
trans.objectStore('store')
objectStore.openCursor()
forwardCursor()
@@ -49,9 +52,9 @@
PASS cursorSteps is 5
forwardCursorComplete()
openReverseCursor()
-trans = db.transaction(['store'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['store'], IDBTransaction.READ_WRITE)
trans.objectStore('store')
-objectStore.openCursor(null, webkitIDBCursor.PREV)
+objectStore.openCursor(null, IDBCursor.PREV)
reverseCursor()
5
PASS cursor.key is cursorSteps
diff --git a/LayoutTests/storage/indexeddb/mutating-cursor.html b/LayoutTests/storage/indexeddb/mutating-cursor.html
index 34f2829..f842c4b 100644
--- a/LayoutTests/storage/indexeddb/mutating-cursor.html
+++ b/LayoutTests/storage/indexeddb/mutating-cursor.html
@@ -14,7 +14,8 @@
function test()
{
- request = evalAndLog("webkitIndexedDB.open('mutating-cursor')");
+ removeVendorPrefixes();
+ request = evalAndLog("indexedDB.open('mutating-cursor')");
request.onsuccess = openSuccess;
request.onerror = unexpectedErrorCallback;
}
@@ -48,7 +49,7 @@
function openForwardCursor()
{
debug("openForwardCursor()");
- evalAndLog("trans = db.transaction(['store'], webkitIDBTransaction.READ_WRITE)");
+ evalAndLog("trans = db.transaction(['store'], IDBTransaction.READ_WRITE)");
trans.onabort = unexpectedAbortCallback;
trans.oncomplete = forwardCursorComplete;
@@ -93,12 +94,12 @@
function openReverseCursor()
{
debug("openReverseCursor()");
- evalAndLog("trans = db.transaction(['store'], webkitIDBTransaction.READ_WRITE)");
+ evalAndLog("trans = db.transaction(['store'], IDBTransaction.READ_WRITE)");
trans.onabort = unexpectedAbortCallback;
trans.oncomplete = reverseCursorComplete;
window.objectStore = evalAndLog("trans.objectStore('store')");
- request = evalAndLog("objectStore.openCursor(null, webkitIDBCursor.PREV)");
+ request = evalAndLog("objectStore.openCursor(null, IDBCursor.PREV)");
request.onsuccess = reverseCursor;
request.onerror = unexpectedErrorCallback;
window.cursorSteps = 6;
diff --git a/LayoutTests/storage/indexeddb/objectStore-required-arguments-expected.txt b/LayoutTests/storage/indexeddb/objectStore-required-arguments-expected.txt
index 467c221..a6cf258 100644
--- a/LayoutTests/storage/indexeddb/objectStore-required-arguments-expected.txt
+++ b/LayoutTests/storage/indexeddb/objectStore-required-arguments-expected.txt
@@ -3,14 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/objectStore-required-arguments.html b/LayoutTests/storage/indexeddb/objectStore-required-arguments.html
index 1f1ca61..1be3d9b 100644
--- a/LayoutTests/storage/indexeddb/objectStore-required-arguments.html
+++ b/LayoutTests/storage/indexeddb/objectStore-required-arguments.html
@@ -13,14 +13,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/objectstore-autoincrement-expected.txt b/LayoutTests/storage/indexeddb/objectstore-autoincrement-expected.txt
index 5e8489b..8a33dc3 100644
--- a/LayoutTests/storage/indexeddb/objectstore-autoincrement-expected.txt
+++ b/LayoutTests/storage/indexeddb/objectstore-autoincrement-expected.txt
@@ -3,7 +3,10 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-webkitIndexedDB.open('objectstore-autoincrement')
+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('objectstore-autoincrement')
openSuccess():
db = event.target.result
db.setVersion('new version')
@@ -24,7 +27,7 @@
PASS storeNames.contains('PlainOldStore') is true
PASS storeNames.length is 4
setVersionCompleted():
-trans = db.transaction(['StoreWithKeyPath', 'StoreWithAutoIncrement', 'PlainOldStore'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['StoreWithKeyPath', 'StoreWithAutoIncrement', 'PlainOldStore'], IDBTransaction.READ_WRITE)
store = trans.objectStore('StoreWithKeyPath')
Insert into object store with auto increment and key path, with key in the object.
store.add({name: 'Jeffersson', number: '7010', id: 3})
@@ -59,12 +62,12 @@
Try adding with no key to object store without auto increment.
Expecting exception from store.add({name: 'Adam'})
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
store.add({name: 'Adam'}, 1)
addAdamSuccess():
PASS event.target.result is 1
testLongKeyPath():
-trans = db.transaction('StoreWithLongKeyPath', webkitIDBTransaction.READ_WRITE)
+trans = db.transaction('StoreWithLongKeyPath', IDBTransaction.READ_WRITE)
store = trans.objectStore('StoreWithLongKeyPath')
store.add({foo: 'bar'})
store.add({foo: 'bar', a: {}})
diff --git a/LayoutTests/storage/indexeddb/objectstore-autoincrement.html b/LayoutTests/storage/indexeddb/objectstore-autoincrement.html
index b1029c4..a1ecbeb 100644
--- a/LayoutTests/storage/indexeddb/objectstore-autoincrement.html
+++ b/LayoutTests/storage/indexeddb/objectstore-autoincrement.html
@@ -12,7 +12,8 @@
function test()
{
- request = evalAndLog("webkitIndexedDB.open('objectstore-autoincrement')");
+ removeVendorPrefixes();
+ request = evalAndLog("indexedDB.open('objectstore-autoincrement')");
request.onsuccess = openSuccess;
request.onerror = unexpectedErrorCallback;
}
@@ -58,7 +59,7 @@
{
debug("setVersionCompleted():");
- window.trans = evalAndLog("trans = db.transaction(['StoreWithKeyPath', 'StoreWithAutoIncrement', 'PlainOldStore'], webkitIDBTransaction.READ_WRITE)");
+ window.trans = evalAndLog("trans = db.transaction(['StoreWithKeyPath', 'StoreWithAutoIncrement', 'PlainOldStore'], IDBTransaction.READ_WRITE)");
trans.onabort = unexpectedAbortCallback;
trans.oncomplete = testLongKeyPath;
@@ -144,7 +145,7 @@
window.store = evalAndLog("store = trans.objectStore('PlainOldStore')");
debug("Try adding with no key to object store without auto increment.");
- evalAndExpectException("store.add({name: 'Adam'})", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("store.add({name: 'Adam'})", "IDBDatabaseException.DATA_ERR");
request = evalAndLog("store.add({name: 'Adam'}, 1)");
request.onsuccess = addAdamSuccess;
request.onerror = unexpectedErrorCallback;
@@ -159,7 +160,7 @@
function testLongKeyPath()
{
debug("testLongKeyPath():");
- trans = evalAndLog("trans = db.transaction('StoreWithLongKeyPath', webkitIDBTransaction.READ_WRITE)");
+ trans = evalAndLog("trans = db.transaction('StoreWithLongKeyPath', IDBTransaction.READ_WRITE)");
trans.onabort = unexpectedAbortCallback;
trans.oncomplete = finishJSTest;
diff --git a/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt b/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt
index f9a90c3..ee8a8da 100644
--- a/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt
+++ b/LayoutTests/storage/indexeddb/objectstore-basics-expected.txt
@@ -3,7 +3,10 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-webkitIndexedDB.open('objectstore-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('objectstore-basics')
openSuccess():
db = event.target.result
db.setVersion('new version')
@@ -45,7 +48,7 @@
Ask for an index that doesn't exist:
index = store.index('asdf')
PASS Exception thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
createIndex():
index = store.createIndex('indexName', 'x', {unique: true})
PASS index !== null is true
@@ -55,7 +58,7 @@
Ask for an index that doesn't exist:
index = store.index('asdf')
PASS Exception thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
db.setVersion("version fail")
PASS db.version is "version fail"
setVersionTrans = event.target.result
@@ -74,7 +77,7 @@
PASS store.indexNames[100] is null
PASS store.indexNames.item(1) is null
PASS store.indexNames.item(100) is null
-transaction = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+transaction = db.transaction(['storeName'], IDBTransaction.READ_WRITE)
store = transaction.objectStore('storeName')
Try to insert data with a Date key:
store.add({x: 'foo'}, testDate)
@@ -88,20 +91,20 @@
PASS event.target.result is "key"
event.target.source.add({x: 'foo'}, 'zzz')
addAgainFailure():
-PASS event.target.errorCode is webkitIDBDatabaseException.CONSTRAINT_ERR
+PASS event.target.errorCode is IDBDatabaseException.CONSTRAINT_ERR
event.preventDefault()
-db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+db.transaction(['storeName'], IDBTransaction.READ_WRITE)
store = transaction.objectStore('storeName')
store.add({x: 'somevalue'}, 'somekey')
Expecting exception from store.add({x: 'othervalue'}, null)
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
-db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+PASS code is IDBDatabaseException.DATA_ERR
+db.transaction(['storeName'], IDBTransaction.READ_WRITE)
store = transaction.objectStore('storeName')
Expecting exception from store.add({x: null}, 'validkey')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
-db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+PASS code is IDBDatabaseException.DATA_ERR
+db.transaction(['storeName'], IDBTransaction.READ_WRITE)
store = transaction.objectStore('storeName')
store.get('key')
getSuccess():
@@ -120,19 +123,19 @@
Passing an invalid key into store.get().
Expecting exception from store.get({})
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
Passing an invalid key into store.delete().
Expecting exception from store.delete({})
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
Passing an invalid key into store.add().
Expecting exception from store.add(null, {})
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
Passing an invalid key into store.put().
Expecting exception from store.put(null, {})
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
testPreConditions():
db.setVersion('precondition version')
@@ -145,53 +148,53 @@
The object store uses in-line keys and the key parameter was provided.
Expecting exception from storeWithInLineKeys.put({key: 1}, 'key')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
The object store uses out-of-line keys and has no key generator and the key parameter was not provided.
Expecting exception from storeWithOutOfLineKeys.put({})
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
The object store uses in-line keys and the result of evaluating the object store's key path yields a value and that value is not a valid key.
Expecting exception from storeWithInLineKeys.put({key: null})
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
The object store uses in-line keys but no key generator and the result of evaluating the object store's key path does not yield a value.
Expecting exception from storeWithInLineKeys.put({})
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
The key parameter was provided but does not contain a valid key.
Expecting exception from storeWithOutOfLineKeys.put({}, null)
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
If there are any indexes referencing this object store whose key path is a string, evaluating their key path on the value parameter yields a value, and that value is not a valid key.
Expecting exception from storeWithIndex.put({indexKey: null}, 'key')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
IDBObjectStore.add()
The object store uses in-line keys and the key parameter was provided.
Expecting exception from storeWithInLineKeys.add({key: 1}, 'key')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
The object store uses out-of-line keys and has no key generator and the key parameter was not provided.
Expecting exception from storeWithOutOfLineKeys.add({})
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
The object store uses in-line keys and the result of evaluating the object store's key path yields a value and that value is not a valid key.
Expecting exception from storeWithInLineKeys.add({key: null})
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
The object store uses in-line keys but no key generator and the result of evaluating the object store's key path does not yield a value.
Expecting exception from storeWithInLineKeys.add({})
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
The key parameter was provided but does not contain a valid key.
Expecting exception from storeWithOutOfLineKeys.add({}, null)
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
If there are any indexes referencing this object store whose key path is a string, evaluating their key path on the value parameter yields a value, and that value is not a valid key.
Expecting exception from storeWithIndex.add({indexKey: null}, 'key')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.DATA_ERR
+PASS code is IDBDatabaseException.DATA_ERR
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/storage/indexeddb/objectstore-basics-workers-expected.txt b/LayoutTests/storage/indexeddb/objectstore-basics-workers-expected.txt
index fdcc46d..6f26880 100644
--- a/LayoutTests/storage/indexeddb/objectstore-basics-workers-expected.txt
+++ b/LayoutTests/storage/indexeddb/objectstore-basics-workers-expected.txt
@@ -4,7 +4,10 @@
Starting worker: resources/objectstore-basics.js
-[Worker] webkitIndexedDB.open('objectstore-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('objectstore-basics')
[Worker] openSuccess():
[Worker] db = event.target.result
[Worker] db.setVersion('new version')
@@ -46,7 +49,7 @@
[Worker] Ask for an index that doesn't exist:
[Worker] index = store.index('asdf')
PASS [Worker] Exception thrown.
-PASS [Worker] code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS [Worker] code is IDBDatabaseException.NOT_FOUND_ERR
[Worker] createIndex():
[Worker] index = store.createIndex('indexName', 'x', {unique: true})
PASS [Worker] index !== null is true
@@ -56,7 +59,7 @@
[Worker] Ask for an index that doesn't exist:
[Worker] index = store.index('asdf')
PASS [Worker] Exception thrown.
-PASS [Worker] code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS [Worker] code is IDBDatabaseException.NOT_FOUND_ERR
[Worker] db.setVersion("version fail")
PASS [Worker] db.version is "version fail"
[Worker] setVersionTrans = event.target.result
@@ -75,7 +78,7 @@
PASS [Worker] store.indexNames[100] is null
PASS [Worker] store.indexNames.item(1) is null
PASS [Worker] store.indexNames.item(100) is null
-[Worker] transaction = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+[Worker] transaction = db.transaction(['storeName'], IDBTransaction.READ_WRITE)
[Worker] store = transaction.objectStore('storeName')
[Worker] Try to insert data with a Date key:
[Worker] store.add({x: 'foo'}, testDate)
@@ -89,20 +92,20 @@
PASS [Worker] event.target.result is "key"
[Worker] event.target.source.add({x: 'foo'}, 'zzz')
[Worker] addAgainFailure():
-PASS [Worker] event.target.errorCode is webkitIDBDatabaseException.CONSTRAINT_ERR
+PASS [Worker] event.target.errorCode is IDBDatabaseException.CONSTRAINT_ERR
[Worker] event.preventDefault()
-[Worker] db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+[Worker] db.transaction(['storeName'], IDBTransaction.READ_WRITE)
[Worker] store = transaction.objectStore('storeName')
[Worker] store.add({x: 'somevalue'}, 'somekey')
[Worker] Expecting exception from store.add({x: 'othervalue'}, null)
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
-[Worker] db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
+[Worker] db.transaction(['storeName'], IDBTransaction.READ_WRITE)
[Worker] store = transaction.objectStore('storeName')
[Worker] Expecting exception from store.add({x: null}, 'validkey')
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
-[Worker] db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
+[Worker] db.transaction(['storeName'], IDBTransaction.READ_WRITE)
[Worker] store = transaction.objectStore('storeName')
[Worker] store.get('key')
[Worker] getSuccess():
@@ -121,19 +124,19 @@
[Worker] Passing an invalid key into store.get().
[Worker] Expecting exception from store.get({})
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
[Worker] Passing an invalid key into store.delete().
[Worker] Expecting exception from store.delete({})
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
[Worker] Passing an invalid key into store.add().
[Worker] Expecting exception from store.add(null, {})
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
[Worker] Passing an invalid key into store.put().
[Worker] Expecting exception from store.put(null, {})
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
[Worker]
[Worker] testPreConditions():
[Worker] db.setVersion('precondition version')
@@ -146,53 +149,53 @@
[Worker] The object store uses in-line keys and the key parameter was provided.
[Worker] Expecting exception from storeWithInLineKeys.put({key: 1}, 'key')
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
[Worker] The object store uses out-of-line keys and has no key generator and the key parameter was not provided.
[Worker] Expecting exception from storeWithOutOfLineKeys.put({})
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
[Worker] The object store uses in-line keys and the result of evaluating the object store's key path yields a value and that value is not a valid key.
[Worker] Expecting exception from storeWithInLineKeys.put({key: null})
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
[Worker] The object store uses in-line keys but no key generator and the result of evaluating the object store's key path does not yield a value.
[Worker] Expecting exception from storeWithInLineKeys.put({})
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
[Worker] The key parameter was provided but does not contain a valid key.
[Worker] Expecting exception from storeWithOutOfLineKeys.put({}, null)
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
[Worker] If there are any indexes referencing this object store whose key path is a string, evaluating their key path on the value parameter yields a value, and that value is not a valid key.
[Worker] Expecting exception from storeWithIndex.put({indexKey: null}, 'key')
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
[Worker]
[Worker] IDBObjectStore.add()
[Worker] The object store uses in-line keys and the key parameter was provided.
[Worker] Expecting exception from storeWithInLineKeys.add({key: 1}, 'key')
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
[Worker] The object store uses out-of-line keys and has no key generator and the key parameter was not provided.
[Worker] Expecting exception from storeWithOutOfLineKeys.add({})
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
[Worker] The object store uses in-line keys and the result of evaluating the object store's key path yields a value and that value is not a valid key.
[Worker] Expecting exception from storeWithInLineKeys.add({key: null})
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
[Worker] The object store uses in-line keys but no key generator and the result of evaluating the object store's key path does not yield a value.
[Worker] Expecting exception from storeWithInLineKeys.add({})
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
[Worker] The key parameter was provided but does not contain a valid key.
[Worker] Expecting exception from storeWithOutOfLineKeys.add({}, null)
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
[Worker] If there are any indexes referencing this object store whose key path is a string, evaluating their key path on the value parameter yields a value, and that value is not a valid key.
[Worker] Expecting exception from storeWithIndex.add({indexKey: null}, 'key')
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.DATA_ERR
+PASS [Worker] code is IDBDatabaseException.DATA_ERR
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/storage/indexeddb/objectstore-clear-expected.txt b/LayoutTests/storage/indexeddb/objectstore-clear-expected.txt
index 4a82493..94aaa91 100644
--- a/LayoutTests/storage/indexeddb/objectstore-clear-expected.txt
+++ b/LayoutTests/storage/indexeddb/objectstore-clear-expected.txt
@@ -3,7 +3,10 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-webkitIndexedDB.open('objectstore-clear')
+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('objectstore-clear')
db = event.target.result
db.setVersion('new version')
trans = event.target.result
diff --git a/LayoutTests/storage/indexeddb/objectstore-clear.html b/LayoutTests/storage/indexeddb/objectstore-clear.html
index 299589f..9c6ec32 100644
--- a/LayoutTests/storage/indexeddb/objectstore-clear.html
+++ b/LayoutTests/storage/indexeddb/objectstore-clear.html
@@ -12,7 +12,8 @@
function test()
{
- request = evalAndLog("webkitIndexedDB.open('objectstore-clear')");
+ removeVendorPrefixes();
+ request = evalAndLog("indexedDB.open('objectstore-clear')");
request.onsuccess = startSetVersion;
request.onerror = unexpectedErrorCallback;
}
diff --git a/LayoutTests/storage/indexeddb/objectstore-count-expected.txt b/LayoutTests/storage/indexeddb/objectstore-count-expected.txt
index 1ef58df..cf881fa 100644
--- a/LayoutTests/storage/indexeddb/objectstore-count-expected.txt
+++ b/LayoutTests/storage/indexeddb/objectstore-count-expected.txt
@@ -3,10 +3,9 @@
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('objectstore-count')
db = event.target.result
db.setVersion('new version')
diff --git a/LayoutTests/storage/indexeddb/objectstore-count.html b/LayoutTests/storage/indexeddb/objectstore-count.html
index 2b43c8b..3ecfad3 100644
--- a/LayoutTests/storage/indexeddb/objectstore-count.html
+++ b/LayoutTests/storage/indexeddb/objectstore-count.html
@@ -12,10 +12,7 @@
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('objectstore-count')");
request.onerror = unexpectedErrorCallback;
request.onsuccess = function() {
diff --git a/LayoutTests/storage/indexeddb/objectstore-cursor-expected.txt b/LayoutTests/storage/indexeddb/objectstore-cursor-expected.txt
index a3f1532..0cab4c8 100644
--- a/LayoutTests/storage/indexeddb/objectstore-cursor-expected.txt
+++ b/LayoutTests/storage/indexeddb/objectstore-cursor-expected.txt
@@ -3,7 +3,10 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-webkitIndexedDB.open('objectstore-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('objectstore-cursor')
db = event.target.result
db.setVersion('new version')
trans = event.target.result
diff --git a/LayoutTests/storage/indexeddb/objectstore-cursor.html b/LayoutTests/storage/indexeddb/objectstore-cursor.html
index b2b1049..a9d69e5 100644
--- a/LayoutTests/storage/indexeddb/objectstore-cursor.html
+++ b/LayoutTests/storage/indexeddb/objectstore-cursor.html
@@ -24,7 +24,7 @@
function openDatabase()
{
- request = evalAndLog("webkitIndexedDB.open('objectstore-cursor')");
+ request = evalAndLog("indexedDB.open('objectstore-cursor')");
request.onsuccess = setVersion;
request.onerror = unexpectedErrorCallback;
}
@@ -150,13 +150,13 @@
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 = objectStore.openCursor(keyRange, ascending ? webkitIDBCursor.NEXT : webkitIDBCursor.PREV);
+ var request = objectStore.openCursor(keyRange, ascending ? IDBCursor.NEXT : IDBCursor.PREV);
request.onsuccess = cursorIteration;
request.onerror = unexpectedErrorCallback;
}
@@ -222,11 +222,12 @@
debug("");
debug(str);
- var request = objectStore.openCursor(null, ascending ? webkitIDBCursor.NEXT : webkitIDBCursor.PREV);
+ var request = objectStore.openCursor(null, ascending ? IDBCursor.NEXT : IDBCursor.PREV);
request.onsuccess = cursorIteration;
request.onerror = unexpectedErrorCallback;
}
+removeVendorPrefixes();
openDatabase(); // The first step.
</script>
diff --git a/LayoutTests/storage/indexeddb/objectstore-removeobjectstore-expected.txt b/LayoutTests/storage/indexeddb/objectstore-removeobjectstore-expected.txt
index 407d36f..bc4bbed 100644
--- a/LayoutTests/storage/indexeddb/objectstore-removeobjectstore-expected.txt
+++ b/LayoutTests/storage/indexeddb/objectstore-removeobjectstore-expected.txt
@@ -3,7 +3,10 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-webkitIndexedDB.open('objectstore-removeobjectstore')
+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('objectstore-removeobjectstore')
db = event.target.result
db.setVersion('new version')
trans = event.target.result
diff --git a/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html b/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html
index 4aa37bd..fb316fd 100644
--- a/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html
+++ b/LayoutTests/storage/indexeddb/objectstore-removeobjectstore.html
@@ -12,7 +12,8 @@
function test()
{
- request = evalAndLog("webkitIndexedDB.open('objectstore-removeobjectstore')");
+ removeVendorPrefixes();
+ request = evalAndLog("indexedDB.open('objectstore-removeobjectstore')");
request.onsuccess = startSetVersion;
request.onerror = unexpectedErrorCallback;
}
diff --git a/LayoutTests/storage/indexeddb/odd-strings-expected.txt b/LayoutTests/storage/indexeddb/odd-strings-expected.txt
index f589804..1555110 100644
--- a/LayoutTests/storage/indexeddb/odd-strings-expected.txt
+++ b/LayoutTests/storage/indexeddb/odd-strings-expected.txt
@@ -3,14 +3,9 @@
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)
db = event.target.result
diff --git a/LayoutTests/storage/indexeddb/odd-strings.html b/LayoutTests/storage/indexeddb/odd-strings.html
index f322e55..ce559fa 100644
--- a/LayoutTests/storage/indexeddb/odd-strings.html
+++ b/LayoutTests/storage/indexeddb/odd-strings.html
@@ -13,14 +13,7 @@
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' },
diff --git a/LayoutTests/storage/indexeddb/open-close-version-expected.txt b/LayoutTests/storage/indexeddb/open-close-version-expected.txt
index 96b0468..d5e9b45 100644
--- a/LayoutTests/storage/indexeddb/open-close-version-expected.txt
+++ b/LayoutTests/storage/indexeddb/open-close-version-expected.txt
@@ -3,8 +3,9 @@
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: setVersion blocked on open handles
window.dbname = 'test1'; window.ver = 1; window.steps = []
diff --git a/LayoutTests/storage/indexeddb/open-close-version.html b/LayoutTests/storage/indexeddb/open-close-version.html
index cdbb0ca..fcc50b3 100644
--- a/LayoutTests/storage/indexeddb/open-close-version.html
+++ b/LayoutTests/storage/indexeddb/open-close-version.html
@@ -81,8 +81,7 @@
}
function test() {
- indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
+ removeVendorPrefixes();
test1();
}
diff --git a/LayoutTests/storage/indexeddb/open-cursor-expected.txt b/LayoutTests/storage/indexeddb/open-cursor-expected.txt
index 3a9e202..ac753ab 100644
--- a/LayoutTests/storage/indexeddb/open-cursor-expected.txt
+++ b/LayoutTests/storage/indexeddb/open-cursor-expected.txt
@@ -3,7 +3,10 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-webkitIndexedDB.open('open-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('open-cursor')
db = event.target.result
db.setVersion('new version')
setVersionSuccess():
diff --git a/LayoutTests/storage/indexeddb/open-cursor.html b/LayoutTests/storage/indexeddb/open-cursor.html
index 6dbec16..09ed798 100644
--- a/LayoutTests/storage/indexeddb/open-cursor.html
+++ b/LayoutTests/storage/indexeddb/open-cursor.html
@@ -20,7 +20,7 @@
function openEmptyCursor()
{
debug("Opening an empty cursor.");
- keyRange = webkitIDBKeyRange.lowerBound("InexistentKey");
+ keyRange = IDBKeyRange.lowerBound("InexistentKey");
request = evalAndLog("objectStore.openCursor(keyRange)");
request.onsuccess = emptyCursorSuccess;
request.onerror = unexpectedErrorCallback;
@@ -48,7 +48,7 @@
function openCursor()
{
debug("Opening cursor");
- keyRange = webkitIDBKeyRange.lowerBound("myKey");
+ keyRange = IDBKeyRange.lowerBound("myKey");
request = evalAndLog("event.target.source.openCursor(keyRange)");
request.onsuccess = cursorSuccess;
request.onerror = unexpectedErrorCallback;
@@ -80,7 +80,8 @@
function test()
{
- request = evalAndLog("webkitIndexedDB.open('open-cursor')");
+ removeVendorPrefixes();
+ request = evalAndLog("indexedDB.open('open-cursor')");
request.onsuccess = openSuccess;
request.onerror = unexpectedErrorCallback;
}
diff --git a/LayoutTests/storage/indexeddb/open-during-transaction-expected.txt b/LayoutTests/storage/indexeddb/open-during-transaction-expected.txt
index 866fe4c..36b685f 100644
--- a/LayoutTests/storage/indexeddb/open-during-transaction-expected.txt
+++ b/LayoutTests/storage/indexeddb/open-during-transaction-expected.txt
@@ -3,10 +3,8 @@
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;
-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
prepare database
openreq1 = indexedDB.open('db1')
diff --git a/LayoutTests/storage/indexeddb/open-during-transaction.html b/LayoutTests/storage/indexeddb/open-during-transaction.html
index 56bd157..b02802a 100644
--- a/LayoutTests/storage/indexeddb/open-during-transaction.html
+++ b/LayoutTests/storage/indexeddb/open-during-transaction.html
@@ -13,11 +13,7 @@
function test()
{
- evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
- evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;");
- shouldBeFalse("IDBTransaction == null");
- debug("");
+ removeVendorPrefixes();
prepareDatabase();
}
diff --git a/LayoutTests/storage/indexeddb/prefetch-bugfix-108071-expected.txt b/LayoutTests/storage/indexeddb/prefetch-bugfix-108071-expected.txt
index 5d81a29..5834c89 100644
--- a/LayoutTests/storage/indexeddb/prefetch-bugfix-108071-expected.txt
+++ b/LayoutTests/storage/indexeddb/prefetch-bugfix-108071-expected.txt
@@ -3,8 +3,9 @@
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.deleteDatabase(DBNAME)
indexedDB.open(DBNAME)
db = event.target.result
@@ -23,7 +24,7 @@
objectStore.add({id: 4, name: "Echo"})
iterateAndDeleteFirstElement():
-trans = db.transaction(['store'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['store'], IDBTransaction.READ_WRITE)
trans.objectStore('store').openCursor()
0: Alpha
trans.objectStore('store').delete(0)
diff --git a/LayoutTests/storage/indexeddb/prefetch-bugfix-108071.html b/LayoutTests/storage/indexeddb/prefetch-bugfix-108071.html
index 2e2e35c..d02621c 100644
--- a/LayoutTests/storage/indexeddb/prefetch-bugfix-108071.html
+++ b/LayoutTests/storage/indexeddb/prefetch-bugfix-108071.html
@@ -16,8 +16,7 @@
function test()
{
- indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
+ removeVendorPrefixes();
DBNAME = 'prefetch-bugfix-108071';
request = evalAndLog("indexedDB.deleteDatabase(DBNAME)");
request.onerror = unexpectedErrorCallback;
@@ -68,7 +67,7 @@
{
debug("iterateAndDeleteFirstElement():");
- evalAndLog("trans = db.transaction(['store'], webkitIDBTransaction.READ_WRITE)");
+ evalAndLog("trans = db.transaction(['store'], IDBTransaction.READ_WRITE)");
trans.onabort = transactionAborted;
trans.oncomplete = unexpectedCompleteCallback;
diff --git a/LayoutTests/storage/indexeddb/queued-commands-expected.txt b/LayoutTests/storage/indexeddb/queued-commands-expected.txt
index 916b588..6253a07 100644
--- a/LayoutTests/storage/indexeddb/queued-commands-expected.txt
+++ b/LayoutTests/storage/indexeddb/queued-commands-expected.txt
@@ -3,7 +3,10 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-webkitIndexedDB.open('queued-commands')
+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('queued-commands')
db = event.target.result
db.setVersion('new version')
setVersionSuccess():
diff --git a/LayoutTests/storage/indexeddb/queued-commands.html b/LayoutTests/storage/indexeddb/queued-commands.html
index ebeeac2..c9730db 100644
--- a/LayoutTests/storage/indexeddb/queued-commands.html
+++ b/LayoutTests/storage/indexeddb/queued-commands.html
@@ -12,7 +12,8 @@
function test()
{
- request = evalAndLog("webkitIndexedDB.open('queued-commands')");
+ removeVendorPrefixes();
+ request = evalAndLog("indexedDB.open('queued-commands')");
request.onsuccess = setVersion;
request.onerror = unexpectedErrorCallback;
}
diff --git a/LayoutTests/storage/indexeddb/readonly-expected.txt b/LayoutTests/storage/indexeddb/readonly-expected.txt
index 34a9ea2..701deee 100644
--- a/LayoutTests/storage/indexeddb/readonly-expected.txt
+++ b/LayoutTests/storage/indexeddb/readonly-expected.txt
@@ -3,14 +3,9 @@
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)
trying to set readonly property request.result
request.result = Infinity
diff --git a/LayoutTests/storage/indexeddb/readonly-properties-expected.txt b/LayoutTests/storage/indexeddb/readonly-properties-expected.txt
index 7e0fc58..c08870f 100644
--- a/LayoutTests/storage/indexeddb/readonly-properties-expected.txt
+++ b/LayoutTests/storage/indexeddb/readonly-properties-expected.txt
@@ -3,14 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/readonly-properties.html b/LayoutTests/storage/indexeddb/readonly-properties.html
index be2590b..2ed337b 100644
--- a/LayoutTests/storage/indexeddb/readonly-properties.html
+++ b/LayoutTests/storage/indexeddb/readonly-properties.html
@@ -25,14 +25,7 @@
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 = "foo";
description = "My Test Database";
diff --git a/LayoutTests/storage/indexeddb/readonly.html b/LayoutTests/storage/indexeddb/readonly.html
index 2d1b3ae..2fa66cd 100644
--- a/LayoutTests/storage/indexeddb/readonly.html
+++ b/LayoutTests/storage/indexeddb/readonly.html
@@ -25,14 +25,7 @@
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 = "foo";
description = "My Test Database";
diff --git a/LayoutTests/storage/indexeddb/request-event-propagation-expected.txt b/LayoutTests/storage/indexeddb/request-event-propagation-expected.txt
index f8c6df7..edc7e537 100644
--- a/LayoutTests/storage/indexeddb/request-event-propagation-expected.txt
+++ b/LayoutTests/storage/indexeddb/request-event-propagation-expected.txt
@@ -3,7 +3,10 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-webkitIndexedDB.open('request-event-propagation')
+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('request-event-propagation')
db = event.target.result
db.setVersion('new version')
setVersionSuccess():
@@ -14,7 +17,7 @@
store = db.createObjectStore('storeName', null)
store.add({x: 'value', y: 'zzz'}, 'key')
Verify that handler fires and that not preventing default will result in an abort
-trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)
trans.onabort = transactionAborted
trans.oncomplete = unexpectedCompleteCallback
trans.onerror = allowDefault
@@ -25,7 +28,7 @@
PASS handlerFired is true
Verifing error
-trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)
trans.onabort = transactionAborted2
trans.oncomplete = unexpectedAbortCallback
trans.addEventListener('error', errorCaptureCallback, true)
@@ -92,7 +95,7 @@
PASS dbBubbleFired is true
Verifing success.
-trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)
trans.oncomplete = transactionComplete
trans.onabort = unexpectedAbortCallback
trans.addEventListener('success', successCaptureCallback, true)
diff --git a/LayoutTests/storage/indexeddb/request-event-propagation.html b/LayoutTests/storage/indexeddb/request-event-propagation.html
index 113fc8c..1766b62 100644
--- a/LayoutTests/storage/indexeddb/request-event-propagation.html
+++ b/LayoutTests/storage/indexeddb/request-event-propagation.html
@@ -12,7 +12,8 @@
function test()
{
- request = evalAndLog("webkitIndexedDB.open('request-event-propagation')");
+ removeVendorPrefixes();
+ request = evalAndLog("indexedDB.open('request-event-propagation')");
request.onsuccess = setVersion;
request.onerror = unexpectedErrorCallback;
}
@@ -44,7 +45,7 @@
function startTest()
{
debug("Verify that handler fires and that not preventing default will result in an abort");
- trans = evalAndLog("trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)");
+ trans = evalAndLog("trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)");
evalAndLog("trans.onabort = transactionAborted");
evalAndLog("trans.oncomplete = unexpectedCompleteCallback");
evalAndLog("trans.onerror = allowDefault");
@@ -66,7 +67,7 @@
shouldBeTrue("handlerFired");
debug("");
debug("Verifing error");
- 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 = unexpectedAbortCallback");
evalAndLog("trans.addEventListener('error', errorCaptureCallback, true)");
@@ -169,7 +170,7 @@
shouldBeTrue("dbBubbleFired");
debug("");
debug("Verifing success.");
- trans = evalAndLog("trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)");
+ trans = evalAndLog("trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)");
evalAndLog("trans.oncomplete = transactionComplete");
evalAndLog("trans.onabort = unexpectedAbortCallback");
evalAndLog("trans.addEventListener('success', successCaptureCallback, true)");
diff --git a/LayoutTests/storage/indexeddb/resources/basics.js b/LayoutTests/storage/indexeddb/resources/basics.js
index 8887832..93837ad 100644
--- a/LayoutTests/storage/indexeddb/resources/basics.js
+++ b/LayoutTests/storage/indexeddb/resources/basics.js
@@ -7,25 +7,20 @@
function test()
{
- shouldBeTrue("'webkitIndexedDB' in self");
- shouldBeFalse("webkitIndexedDB == null");
-
- shouldBeTrue("'webkitIDBCursor' in self");
- shouldBeFalse("webkitIDBCursor == null");
-
- request = evalAndLog("webkitIndexedDB.open('basics')");
+ removeVendorPrefixes();
+ request = evalAndLog("indexedDB.open('basics')");
shouldBeTrue("'result' in request");
- evalAndExpectException("request.result", "webkitIDBDatabaseException.NOT_ALLOWED_ERR");
+ evalAndExpectException("request.result", "IDBDatabaseException.NOT_ALLOWED_ERR");
shouldBeTrue("'errorCode' in request");
- evalAndExpectException("request.errorCode", "webkitIDBDatabaseException.NOT_ALLOWED_ERR");
+ evalAndExpectException("request.errorCode", "IDBDatabaseException.NOT_ALLOWED_ERR");
shouldBeTrue("'webkitErrorMessage' in request");
- evalAndExpectException("request.webkitErrorMessage", "webkitIDBDatabaseException.NOT_ALLOWED_ERR");
+ evalAndExpectException("request.webkitErrorMessage", "IDBDatabaseException.NOT_ALLOWED_ERR");
shouldBeTrue("'source' in request");
- shouldBe("request.source", "webkitIndexedDB");
+ shouldBe("request.source", "indexedDB");
shouldBeTrue("'transaction' in request");
shouldBeNull("request.transaction");
shouldBeTrue("'readyState' in request");
- shouldBe("request.readyState", "webkitIDBRequest.LOADING");
+ shouldBe("request.readyState", "IDBRequest.LOADING");
shouldBeTrue("'onsuccess' in request");
shouldBeNull("request.onsuccess");
shouldBeTrue("'onerror' in request");
@@ -46,11 +41,11 @@
shouldBeTrue("'webkitErrorMessage' in event.target");
shouldBeUndefined("event.target.webkitErrorMessage");
shouldBeTrue("'source' in event.target");
- shouldBe("request.source", "webkitIndexedDB");
+ shouldBe("request.source", "indexedDB");
shouldBeTrue("'transaction' in event.target");
shouldBeNull("event.target.transaction");
shouldBeTrue("'readyState' in request");
- shouldBe("event.target.readyState", "webkitIDBRequest.DONE");
+ shouldBe("event.target.readyState", "IDBRequest.DONE");
shouldBeTrue("'onsuccess' in event.target");
shouldBeTrue("'onerror' in event.target");
shouldBe("event.target.LOADING", "1");
diff --git a/LayoutTests/storage/indexeddb/resources/index-basics.js b/LayoutTests/storage/indexeddb/resources/index-basics.js
index 596311e..2d3ff46 100644
--- a/LayoutTests/storage/indexeddb/resources/index-basics.js
+++ b/LayoutTests/storage/indexeddb/resources/index-basics.js
@@ -7,7 +7,8 @@
function test()
{
- request = evalAndLog("webkitIndexedDB.open('index-basics')");
+ removeVendorPrefixes();
+ request = evalAndLog("indexedDB.open('index-basics')");
request.onsuccess = setVersion;
request.onerror = unexpectedErrorCallback;
}
diff --git a/LayoutTests/storage/indexeddb/resources/objectstore-basics.js b/LayoutTests/storage/indexeddb/resources/objectstore-basics.js
index ff4c03d..31b7616 100644
--- a/LayoutTests/storage/indexeddb/resources/objectstore-basics.js
+++ b/LayoutTests/storage/indexeddb/resources/objectstore-basics.js
@@ -7,7 +7,8 @@
function test()
{
- request = evalAndLog("webkitIndexedDB.open('objectstore-basics')");
+ removeVendorPrefixes();
+ request = evalAndLog("indexedDB.open('objectstore-basics')");
request.onsuccess = openSuccess;
request.onerror = unexpectedErrorCallback;
}
@@ -76,7 +77,7 @@
} catch (err) {
testPassed("Exception thrown.");
code = err.code;
- shouldBe("code", "webkitIDBDatabaseException.NOT_FOUND_ERR");
+ shouldBe("code", "IDBDatabaseException.NOT_FOUND_ERR");
}
createIndex();
@@ -99,7 +100,7 @@
} catch (err) {
testPassed("Exception thrown.");
code = err.code
- shouldBe("code", "webkitIDBDatabaseException.NOT_FOUND_ERR");
+ shouldBe("code", "IDBDatabaseException.NOT_FOUND_ERR");
}
trans.oncomplete = testSetVersionAbort;
}
@@ -148,7 +149,7 @@
function addData()
{
- var transaction = evalAndLog("transaction = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)");
+ var transaction = evalAndLog("transaction = db.transaction(['storeName'], IDBTransaction.READ_WRITE)");
transaction.onabort = unexpectedAbortCallback;
self.store = evalAndLog("store = transaction.objectStore('storeName')");
@@ -195,24 +196,24 @@
{
event = evt;
debug("addAgainFailure():");
- shouldBe("event.target.errorCode", "webkitIDBDatabaseException.CONSTRAINT_ERR");
+ shouldBe("event.target.errorCode", "IDBDatabaseException.CONSTRAINT_ERR");
evalAndLog("event.preventDefault()");
- 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')");
evalAndLog("store.add({x: 'somevalue'}, 'somekey')");
- evalAndExpectException("store.add({x: 'othervalue'}, null)", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("store.add({x: 'othervalue'}, null)", "IDBDatabaseException.DATA_ERR");
- 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')");
- evalAndExpectException("store.add({x: null}, 'validkey')", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("store.add({x: null}, 'validkey')", "IDBDatabaseException.DATA_ERR");
- 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')");
@@ -263,16 +264,16 @@
var store = evalAndLog("store = event.target.source");
debug("Passing an invalid key into store.get().");
- evalAndExpectException("store.get({})", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("store.get({})", "IDBDatabaseException.DATA_ERR");
debug("Passing an invalid key into store.delete().");
- evalAndExpectException("store.delete({})", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("store.delete({})", "IDBDatabaseException.DATA_ERR");
debug("Passing an invalid key into store.add().");
- evalAndExpectException("store.add(null, {})", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("store.add(null, {})", "IDBDatabaseException.DATA_ERR");
debug("Passing an invalid key into store.put().");
- evalAndExpectException("store.put(null, {})", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("store.put(null, {})", "IDBDatabaseException.DATA_ERR");
testPreConditions();
}
@@ -292,42 +293,42 @@
debug("");
debug("IDBObjectStore.put()");
debug("The object store uses in-line keys and the key parameter was provided.");
- evalAndExpectException("storeWithInLineKeys.put({key: 1}, 'key')", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("storeWithInLineKeys.put({key: 1}, 'key')", "IDBDatabaseException.DATA_ERR");
debug("The object store uses out-of-line keys and has no key generator and the key parameter was not provided.");
- evalAndExpectException("storeWithOutOfLineKeys.put({})", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("storeWithOutOfLineKeys.put({})", "IDBDatabaseException.DATA_ERR");
debug("The object store uses in-line keys and the result of evaluating the object store's key path yields a value and that value is not a valid key.");
- evalAndExpectException("storeWithInLineKeys.put({key: null})", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("storeWithInLineKeys.put({key: null})", "IDBDatabaseException.DATA_ERR");
debug("The object store uses in-line keys but no key generator and the result of evaluating the object store's key path does not yield a value.");
- evalAndExpectException("storeWithInLineKeys.put({})", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("storeWithInLineKeys.put({})", "IDBDatabaseException.DATA_ERR");
debug("The key parameter was provided but does not contain a valid key.");
- evalAndExpectException("storeWithOutOfLineKeys.put({}, null)", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("storeWithOutOfLineKeys.put({}, null)", "IDBDatabaseException.DATA_ERR");
debug("If there are any indexes referencing this object store whose key path is a string, evaluating their key path on the value parameter yields a value, and that value is not a valid key.");
- evalAndExpectException("storeWithIndex.put({indexKey: null}, 'key')", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("storeWithIndex.put({indexKey: null}, 'key')", "IDBDatabaseException.DATA_ERR");
debug("");
debug("IDBObjectStore.add()");
debug("The object store uses in-line keys and the key parameter was provided.");
- evalAndExpectException("storeWithInLineKeys.add({key: 1}, 'key')", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("storeWithInLineKeys.add({key: 1}, 'key')", "IDBDatabaseException.DATA_ERR");
debug("The object store uses out-of-line keys and has no key generator and the key parameter was not provided.");
- evalAndExpectException("storeWithOutOfLineKeys.add({})", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("storeWithOutOfLineKeys.add({})", "IDBDatabaseException.DATA_ERR");
debug("The object store uses in-line keys and the result of evaluating the object store's key path yields a value and that value is not a valid key.");
- evalAndExpectException("storeWithInLineKeys.add({key: null})", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("storeWithInLineKeys.add({key: null})", "IDBDatabaseException.DATA_ERR");
debug("The object store uses in-line keys but no key generator and the result of evaluating the object store's key path does not yield a value.");
- evalAndExpectException("storeWithInLineKeys.add({})", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("storeWithInLineKeys.add({})", "IDBDatabaseException.DATA_ERR");
debug("The key parameter was provided but does not contain a valid key.");
- evalAndExpectException("storeWithOutOfLineKeys.add({}, null)", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("storeWithOutOfLineKeys.add({}, null)", "IDBDatabaseException.DATA_ERR");
debug("If there are any indexes referencing this object store whose key path is a string, evaluating their key path on the value parameter yields a value, and that value is not a valid key.");
- evalAndExpectException("storeWithIndex.add({indexKey: null}, 'key')", "webkitIDBDatabaseException.DATA_ERR");
+ evalAndExpectException("storeWithIndex.add({indexKey: null}, 'key')", "IDBDatabaseException.DATA_ERR");
finishJSTest();
};
diff --git a/LayoutTests/storage/indexeddb/resources/shared.js b/LayoutTests/storage/indexeddb/resources/shared.js
index 52c3f53..c3ab798 100644
--- a/LayoutTests/storage/indexeddb/resources/shared.js
+++ b/LayoutTests/storage/indexeddb/resources/shared.js
@@ -24,6 +24,24 @@
};
}
+function removeVendorPrefixes()
+{
+ IDBCursor = self.IDBCursor || self.webkitIDBCursor;
+ IDBDatabase = self.IDBDatabase || self.webkitIDBDatabase;
+ IDBDatabaseError = self.IDBDatabaseError || self.webkitIDBDatabaseError;
+ IDBDatabaseException = self.IDBDatabaseException || self.webkitIDBDatabaseException;
+ IDBFactory = self.IDBFactory || self.webkitIDBFactory;
+ IDBIndex = self.IDBIndex || self.webkitIDBIndex;
+ IDBKeyRange = self.IDBKeyRange || self.webkitIDBKeyRange;
+ IDBObjectStore = self.IDBObjectStore || self.webkitIDBObjectStore;
+ IDBRequest = self.IDBRequest || self.webkitIDBRequest;
+ IDBTransaction = self.IDBTransaction || self.webkitIDBTransaction;
+
+ indexedDB = evalAndLog("indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;");
+ shouldBeTrue("Boolean(indexedDB && IDBCursor && IDBDatabase && IDBDatabaseError && IDBDatabaseException && IDBFactory && IDBIndex && IDBKeyRange && IDBObjectStore && IDBRequest && IDBTransaction)");
+ debug("");
+}
+
function unexpectedSuccessCallback()
{
testFailed("Success function called unexpectedly.");
diff --git a/LayoutTests/storage/indexeddb/resources/transaction-abort-workers.js b/LayoutTests/storage/indexeddb/resources/transaction-abort-workers.js
index 191b4ea..e504895 100644
--- a/LayoutTests/storage/indexeddb/resources/transaction-abort-workers.js
+++ b/LayoutTests/storage/indexeddb/resources/transaction-abort-workers.js
@@ -7,13 +7,9 @@
function test()
{
- shouldBeTrue("'webkitIndexedDB' in self");
- shouldBeFalse("webkitIndexedDB == null");
+ removeVendorPrefixes();
- shouldBeTrue("'webkitIDBCursor' in self");
- shouldBeFalse("webkitIDBCursor == null");
-
- evalAndLog("request = webkitIndexedDB.open('transaction-abort-worker')");
+ evalAndLog("request = indexedDB.open('transaction-abort-worker')");
request.onerror = unexpectedErrorCallback;
request.onsuccess = function () {
evalAndLog("db = request.result");
@@ -43,7 +39,7 @@
function transactionAborted()
{
testPassed("Transaction aborted");
- evalAndExpectException("store.get(0)", "webkitIDBDatabaseException.TRANSACTION_INACTIVE_ERR");
+ evalAndExpectException("store.get(0)", "IDBDatabaseException.TRANSACTION_INACTIVE_ERR");
recursionTest();
}
@@ -76,7 +72,7 @@
function transactionCompleted()
{
testPassed("transaction completed");
- evalAndExpectException("store.get(0)", "webkitIDBDatabaseException.TRANSACTION_INACTIVE_ERR");
+ evalAndExpectException("store.get(0)", "IDBDatabaseException.TRANSACTION_INACTIVE_ERR");
debug("");
debug("trying a timeout callback:");
@@ -93,7 +89,7 @@
transaction.oncomplete = unexpectedCompleteCallback;
transaction.onabort = function () {
testPassed("transaction started in setTimeout() callback aborted");
- evalAndExpectException("store.get(0)", "webkitIDBDatabaseException.TRANSACTION_INACTIVE_ERR");
+ evalAndExpectException("store.get(0)", "IDBDatabaseException.TRANSACTION_INACTIVE_ERR");
errorTest();
};
@@ -125,7 +121,7 @@
function errorTransactionAborted()
{
testPassed("Transaction aborted");
- evalAndExpectException("store.get(0)", "webkitIDBDatabaseException.TRANSACTION_INACTIVE_ERR");
+ evalAndExpectException("store.get(0)", "IDBDatabaseException.TRANSACTION_INACTIVE_ERR");
finishJSTest();
}
diff --git a/LayoutTests/storage/indexeddb/setVersion-null-expected.txt b/LayoutTests/storage/indexeddb/setVersion-null-expected.txt
index c190d44..aa421d3 100644
--- a/LayoutTests/storage/indexeddb/setVersion-null-expected.txt
+++ b/LayoutTests/storage/indexeddb/setVersion-null-expected.txt
@@ -3,14 +3,9 @@
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
db.setVersion(null);
diff --git a/LayoutTests/storage/indexeddb/setVersion-null.html b/LayoutTests/storage/indexeddb/setVersion-null.html
index deafbea..85e6a82 100644
--- a/LayoutTests/storage/indexeddb/setVersion-null.html
+++ b/LayoutTests/storage/indexeddb/setVersion-null.html
@@ -13,14 +13,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/setVersion-undefined-expected.txt b/LayoutTests/storage/indexeddb/setVersion-undefined-expected.txt
index 51dccb1..a45e0c2 100644
--- a/LayoutTests/storage/indexeddb/setVersion-undefined-expected.txt
+++ b/LayoutTests/storage/indexeddb/setVersion-undefined-expected.txt
@@ -3,14 +3,9 @@
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
PASS db.setVersion(); threw exception TypeError: Not enough arguments.
diff --git a/LayoutTests/storage/indexeddb/setVersion-undefined.html b/LayoutTests/storage/indexeddb/setVersion-undefined.html
index 92df9ff..23700be 100644
--- a/LayoutTests/storage/indexeddb/setVersion-undefined.html
+++ b/LayoutTests/storage/indexeddb/setVersion-undefined.html
@@ -13,14 +13,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/set_version_blocked-expected.txt b/LayoutTests/storage/indexeddb/set_version_blocked-expected.txt
index e2736c9..177f8b98 100644
--- a/LayoutTests/storage/indexeddb/set_version_blocked-expected.txt
+++ b/LayoutTests/storage/indexeddb/set_version_blocked-expected.txt
@@ -3,9 +3,11 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS IndexedDB == null is false
-IndexedDB.open('set-version-blocked')
-IndexedDB.open('set-version-blocked')
+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('set-version-blocked')
+indexedDB.open('set-version-blocked')
connections[0].setVersion('version 1')
seen_blocked_event = true
PASS blocked_event.version is "version 1"
diff --git a/LayoutTests/storage/indexeddb/set_version_blocked.html b/LayoutTests/storage/indexeddb/set_version_blocked.html
index 8fb6432..9a82822 100644
--- a/LayoutTests/storage/indexeddb/set_version_blocked.html
+++ b/LayoutTests/storage/indexeddb/set_version_blocked.html
@@ -13,17 +13,13 @@
connections = []
function test()
{
- if ('webkitIndexedDB' in window)
- IndexedDB = webkitIndexedDB;
- else if ('mozIndexedDB' in window)
- IndexedDB = mozIndexedDB;
- shouldBeFalse("IndexedDB == null");
+ removeVendorPrefixes();
openDBConnection();
}
function openDBConnection()
{
- request = evalAndLog("IndexedDB.open('set-version-blocked')");
+ request = evalAndLog("indexedDB.open('set-version-blocked')");
request.onsuccess = openSuccess;
request.onerror = unexpectedErrorCallback;
}
diff --git a/LayoutTests/storage/indexeddb/set_version_queue-expected.txt b/LayoutTests/storage/indexeddb/set_version_queue-expected.txt
index edaa022..7939912 100644
--- a/LayoutTests/storage/indexeddb/set_version_queue-expected.txt
+++ b/LayoutTests/storage/indexeddb/set_version_queue-expected.txt
@@ -3,10 +3,9 @@
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
-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('set-version-queue')
indexedDB.open('set-version-queue')
indexedDB.open('set-version-queue')
diff --git a/LayoutTests/storage/indexeddb/set_version_queue.html b/LayoutTests/storage/indexeddb/set_version_queue.html
index c3c73da..ff560af 100644
--- a/LayoutTests/storage/indexeddb/set_version_queue.html
+++ b/LayoutTests/storage/indexeddb/set_version_queue.html
@@ -13,10 +13,7 @@
connections = []
function test()
{
- evalAndLog("window.indexedDB = window.indexedDB || window.webkitIndexedDB");
- shouldBeTrue("indexedDB != null");
- evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException");
- shouldBeTrue("IDBDatabaseException != null");
+ removeVendorPrefixes();
openDBConnection();
}
diff --git a/LayoutTests/storage/indexeddb/structured-clone-expected.txt b/LayoutTests/storage/indexeddb/structured-clone-expected.txt
index 8e069f7..f964d22 100644
--- a/LayoutTests/storage/indexeddb/structured-clone-expected.txt
+++ b/LayoutTests/storage/indexeddb/structured-clone-expected.txt
@@ -4,10 +4,9 @@
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
+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
+
Prepare Database
indexedDB.deleteDatabase('structured-clone')
diff --git a/LayoutTests/storage/indexeddb/structured-clone.html b/LayoutTests/storage/indexeddb/structured-clone.html
index 4c005ae..a333a69 100644
--- a/LayoutTests/storage/indexeddb/structured-clone.html
+++ b/LayoutTests/storage/indexeddb/structured-clone.html
@@ -23,10 +23,7 @@
function test()
{
- evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB");
- shouldBeTrue("indexedDB != null");
- evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction");
- shouldBeTrue("IDBTransaction != null");
+ removeVendorPrefixes();
prepareDatabase();
}
diff --git a/LayoutTests/storage/indexeddb/transaction-abort-expected.txt b/LayoutTests/storage/indexeddb/transaction-abort-expected.txt
index 7bd3b6e..3e3daf8 100644
--- a/LayoutTests/storage/indexeddb/transaction-abort-expected.txt
+++ b/LayoutTests/storage/indexeddb/transaction-abort-expected.txt
@@ -3,12 +3,9 @@
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
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction
-PASS IDBTransaction != 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('name')
db = event.target.result
db.setVersion('new version')
diff --git a/LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion-cross-frame-expected.txt b/LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion-cross-frame-expected.txt
index 37c4455..33acdf5 100644
--- a/LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion-cross-frame-expected.txt
+++ b/LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion-cross-frame-expected.txt
@@ -3,14 +3,15 @@
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('transaction-abort-with-js-recursion-cross-frame')
+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('transaction-abort-with-js-recursion-cross-frame')
db = event.target.result
db.setVersion('new version')
-pendingTransaction = db.transaction(['objectStore'], webkitIDBTransaction.READ_WRITE)
+pendingTransaction = db.transaction(['objectStore'], IDBTransaction.READ_WRITE)
Start re-entrant JS
-transaction = db.transaction(['objectStore'], webkitIDBTransaction.READ_WRITE)
+transaction = db.transaction(['objectStore'], IDBTransaction.READ_WRITE)
End re-entrant JS
store = pendingTransaction.objectStore('objectStore')
PASS store !== undefined is true
diff --git a/LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion-cross-frame.html b/LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion-cross-frame.html
index 7654590..079d12b 100644
--- a/LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion-cross-frame.html
+++ b/LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion-cross-frame.html
@@ -20,10 +20,8 @@
description("Test that pending transactions are not aborted during recursive JS calls until all JS (in all frames) is finished.");
function setup() {
- shouldBeTrue("'webkitIndexedDB' in window");
- shouldBeFalse("webkitIndexedDB == null");
-
- request = evalAndLog("webkitIndexedDB.open('transaction-abort-with-js-recursion-cross-frame')");
+ removeVendorPrefixes();
+ request = evalAndLog("indexedDB.open('transaction-abort-with-js-recursion-cross-frame')");
request.onsuccess = setVersion;
request.onerror = unexpectedErrorCallback;
}
@@ -38,7 +36,7 @@
function click() {
store = db.createObjectStore('objectStore', null);
body.onclick = test;
- var pendingTransaction = evalAndLog("pendingTransaction = db.transaction(['objectStore'], webkitIDBTransaction.READ_WRITE)");
+ var pendingTransaction = evalAndLog("pendingTransaction = db.transaction(['objectStore'], IDBTransaction.READ_WRITE)");
pendingTransaction.onsuccess = unexpectedErrorCallback;
pendingTransaction.onerror = unexpectedErrorCallback;
pendingTransaction.onabort = abortCallback;
@@ -53,7 +51,7 @@
function test()
{
debug("Start re-entrant JS");
- transaction = evalAndLog("transaction = db.transaction(['objectStore'], webkitIDBTransaction.READ_WRITE)");
+ transaction = evalAndLog("transaction = db.transaction(['objectStore'], IDBTransaction.READ_WRITE)");
debug("End re-entrant JS");
}
diff --git a/LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion-expected.txt b/LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion-expected.txt
index 7a1ffaf..9f3bbae 100644
--- a/LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion-expected.txt
+++ b/LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion-expected.txt
@@ -3,14 +3,15 @@
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('transaction-abort-with-js-recursion')
+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('transaction-abort-with-js-recursion')
db = event.target.result
db.setVersion('new version')
-pendingTransaction = db.transaction(['objectStore'], webkitIDBTransaction.READ_WRITE)
+pendingTransaction = db.transaction(['objectStore'], IDBTransaction.READ_WRITE)
Start re-entrant JS
-transaction = db.transaction(['objectStore'], webkitIDBTransaction.READ_WRITE)
+transaction = db.transaction(['objectStore'], IDBTransaction.READ_WRITE)
End re-entrant JS
store = pendingTransaction.objectStore('objectStore')
PASS store !== undefined is true
diff --git a/LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion.html b/LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion.html
index 1731b757..798e827 100644
--- a/LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion.html
+++ b/LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion.html
@@ -16,10 +16,9 @@
description("Test that pending transactions are not aborted during recursive JS calls until all JS is finished.");
function setup() {
- shouldBeTrue("'webkitIndexedDB' in window");
- shouldBeFalse("webkitIndexedDB == null");
+ removeVendorPrefixes();
- request = evalAndLog("webkitIndexedDB.open('transaction-abort-with-js-recursion')");
+ request = evalAndLog("indexedDB.open('transaction-abort-with-js-recursion')");
request.onsuccess = setVersion;
request.onerror = unexpectedErrorCallback;
}
@@ -34,7 +33,7 @@
function click() {
store = db.createObjectStore('objectStore', null);
body.onclick = test;
- var pendingTransaction = evalAndLog("pendingTransaction = db.transaction(['objectStore'], webkitIDBTransaction.READ_WRITE)");
+ var pendingTransaction = evalAndLog("pendingTransaction = db.transaction(['objectStore'], IDBTransaction.READ_WRITE)");
pendingTransaction.onsuccess = unexpectedErrorCallback;
pendingTransaction.onerror = unexpectedErrorCallback;
pendingTransaction.onabort = abortCallback;
@@ -49,7 +48,7 @@
function test()
{
debug("Start re-entrant JS");
- transaction = evalAndLog("transaction = db.transaction(['objectStore'], webkitIDBTransaction.READ_WRITE)");
+ transaction = evalAndLog("transaction = db.transaction(['objectStore'], IDBTransaction.READ_WRITE)");
debug("End re-entrant JS");
}
diff --git a/LayoutTests/storage/indexeddb/transaction-abort-workers-expected.txt b/LayoutTests/storage/indexeddb/transaction-abort-workers-expected.txt
index dc40202..337c10a 100644
--- a/LayoutTests/storage/indexeddb/transaction-abort-workers-expected.txt
+++ b/LayoutTests/storage/indexeddb/transaction-abort-workers-expected.txt
@@ -4,11 +4,10 @@
Starting worker: resources/transaction-abort-workers.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] request = webkitIndexedDB.open('transaction-abort-worker')
+[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] request = indexedDB.open('transaction-abort-worker')
[Worker] db = request.result
[Worker] request = db.setVersion('1')
[Worker] Deleted all object stores.
@@ -21,7 +20,7 @@
PASS [Worker] Transaction aborted
[Worker] Expecting exception from store.get(0)
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.TRANSACTION_INACTIVE_ERR
+PASS [Worker] code is IDBDatabaseException.TRANSACTION_INACTIVE_ERR
[Worker]
[Worker] recursionTest():
[Worker] transaction = db.transaction('store')
@@ -49,7 +48,7 @@
PASS [Worker] transaction completed
[Worker] Expecting exception from store.get(0)
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.TRANSACTION_INACTIVE_ERR
+PASS [Worker] code is IDBDatabaseException.TRANSACTION_INACTIVE_ERR
[Worker]
[Worker] trying a timeout callback:
[Worker] setTimeout(timeoutTest, 0)
@@ -60,7 +59,7 @@
PASS [Worker] transaction started in setTimeout() callback aborted
[Worker] Expecting exception from store.get(0)
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.TRANSACTION_INACTIVE_ERR
+PASS [Worker] code is IDBDatabaseException.TRANSACTION_INACTIVE_ERR
[Worker]
[Worker] errorTest():
[Worker] self.old_onerror = self.onerror
@@ -75,7 +74,7 @@
PASS [Worker] Transaction aborted
[Worker] Expecting exception from store.get(0)
PASS [Worker] Exception was thrown.
-PASS [Worker] code is webkitIDBDatabaseException.TRANSACTION_INACTIVE_ERR
+PASS [Worker] code is IDBDatabaseException.TRANSACTION_INACTIVE_ERR
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/storage/indexeddb/transaction-abort.html b/LayoutTests/storage/indexeddb/transaction-abort.html
index 697b2dc..5fa9002 100644
--- a/LayoutTests/storage/indexeddb/transaction-abort.html
+++ b/LayoutTests/storage/indexeddb/transaction-abort.html
@@ -12,12 +12,7 @@
function test()
{
- evalAndLog("window.indexedDB = window.indexedDB || window.webkitIndexedDB");
- shouldBeTrue("indexedDB != null");
- evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction");
- shouldBeTrue("IDBTransaction != null");
- evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException");
- shouldBeTrue("IDBDatabaseException != null");
+ removeVendorPrefixes();
request = evalAndLog("indexedDB.open('name')");
request.onsuccess = setVersion;
diff --git a/LayoutTests/storage/indexeddb/transaction-after-close-expected.txt b/LayoutTests/storage/indexeddb/transaction-after-close-expected.txt
index 238e159..d7a46e3 100644
--- a/LayoutTests/storage/indexeddb/transaction-after-close-expected.txt
+++ b/LayoutTests/storage/indexeddb/transaction-after-close-expected.txt
@@ -3,9 +3,10 @@
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('transaction-after-close')
+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('transaction-after-close')
openSuccess():
db = event.target.result
request = db.setVersion('version 1')
@@ -14,17 +15,17 @@
request = store.put('x', 'y')
PASS Put success
running first transaction
-currentTransaction = db.transaction(['store'], webkitIDBTransaction.READ_WRITE)
+currentTransaction = db.transaction(['store'], IDBTransaction.READ_WRITE)
objectStore.put('a', 'b')
db.close()
-Expecting exception from db.transaction(['store'], webkitIDBTransaction.READ_WRITE)
+Expecting exception from db.transaction(['store'], IDBTransaction.READ_WRITE)
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
verify that we can reopen the db after calling close
-webkitIndexedDB.open('transaction-after-close')
+indexedDB.open('transaction-after-close')
second_db = event.target.result
-currentTransaction = second_db.transaction(['store'], webkitIDBTransaction.READ_WRITE)
+currentTransaction = second_db.transaction(['store'], IDBTransaction.READ_WRITE)
request = store.put('1', '2')
PASS final put success
PASS successfullyParsed is true
diff --git a/LayoutTests/storage/indexeddb/transaction-after-close.html b/LayoutTests/storage/indexeddb/transaction-after-close.html
index d050ca3..965c0a9 100644
--- a/LayoutTests/storage/indexeddb/transaction-after-close.html
+++ b/LayoutTests/storage/indexeddb/transaction-after-close.html
@@ -12,10 +12,9 @@
function test()
{
- shouldBeTrue("'webkitIndexedDB' in window");
- shouldBeFalse("webkitIndexedDB == null");
+ removeVendorPrefixes();
- request = evalAndLog("webkitIndexedDB.open('transaction-after-close')");
+ request = evalAndLog("indexedDB.open('transaction-after-close')");
request.onsuccess = openSuccess;
request.onerror = unexpectedErrorCallback;
}
@@ -49,7 +48,7 @@
function runFirstRegularTransaction()
{
debug("running first transaction")
- currentTransaction = evalAndLog("currentTransaction = db.transaction(['store'], webkitIDBTransaction.READ_WRITE)");
+ currentTransaction = evalAndLog("currentTransaction = db.transaction(['store'], IDBTransaction.READ_WRITE)");
currentTransaction.onabort = unexpectedAbortCallback;
currentTransaction.oncomplete = firstTransactionComplete;
objectStore = currentTransaction.objectStore('store');
@@ -60,18 +59,18 @@
function firstTransactionComplete()
{
evalAndLog("db.close()");
- evalAndExpectException("db.transaction(['store'], webkitIDBTransaction.READ_WRITE)", "webkitIDBDatabaseException.NOT_ALLOWED_ERR");
+ evalAndExpectException("db.transaction(['store'], IDBTransaction.READ_WRITE)", "IDBDatabaseException.NOT_ALLOWED_ERR");
debug("")
debug("verify that we can reopen the db after calling close")
- request = evalAndLog("webkitIndexedDB.open('transaction-after-close')");
+ request = evalAndLog("indexedDB.open('transaction-after-close')");
request.onsuccess = onSecondOpen
request.onerror = unexpectedErrorCallback;
}
function onSecondOpen() {
second_db = evalAndLog("second_db = event.target.result");
- currentTransaction = evalAndLog("currentTransaction = second_db.transaction(['store'], webkitIDBTransaction.READ_WRITE)");
+ currentTransaction = evalAndLog("currentTransaction = second_db.transaction(['store'], IDBTransaction.READ_WRITE)");
store = currentTransaction.objectStore('store');
request = evalAndLog("request = store.put('1', '2')");
request.onsuccess = onFinalPutSuccess;
diff --git a/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt b/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt
index 57b72db..72c90f9 100644
--- a/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt
+++ b/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt
@@ -3,9 +3,10 @@
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('transaction-and-objectstore-calls', '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('transaction-and-objectstore-calls', 'description')
db = event.target.result
result = db.setVersion('version 1')
trans = event.target.result
@@ -19,70 +20,70 @@
trans.objectStore('a')
Expecting exception from trans.objectStore('b')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
Expecting exception from trans.objectStore('x')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
trans = db.transaction(['a'])
trans.objectStore('a')
Expecting exception from trans.objectStore('b')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
Expecting exception from trans.objectStore('x')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
trans = db.transaction(['b'])
trans.objectStore('b')
Expecting exception from trans.objectStore('a')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
Expecting exception from trans.objectStore('x')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
trans = db.transaction(['a', 'b'])
trans.objectStore('a')
trans.objectStore('b')
Expecting exception from trans.objectStore('x')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
trans = db.transaction(['b', 'a'])
trans.objectStore('a')
trans.objectStore('b')
Expecting exception from trans.objectStore('x')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
Passing a string as the first argument is a shortcut for just one object store:
trans = db.transaction('a')
trans.objectStore('a')
Expecting exception from trans.objectStore('b')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
Expecting exception from trans.objectStore('x')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
PASS trans = db.transaction() threw exception TypeError: Type error.
Expecting exception from db.transaction(['x'])
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
Expecting exception from db.transaction(['x'])
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
Expecting exception from db.transaction(['a', 'x'])
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
Expecting exception from db.transaction(['x', 'x'])
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
Expecting exception from db.transaction(['a', 'x', 'b'])
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
Exception thrown when no stores specified:
Expecting exception from db.transaction([])
@@ -92,10 +93,10 @@
{} coerces to a string - so no match, but not a type error:
Expecting exception from db.transaction({})
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
Expecting exception from db.transaction({mode:0})
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
Overriding the default string coercion makes these work:
db.transaction({toString:function(){return 'a';}})
@@ -103,10 +104,10 @@
... but you still need to specify a real store:
Expecting exception from db.transaction([{toString:function(){return 'x';}}])
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
Expecting exception from db.transaction([{toString:function(){return 'x';}}])
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR
+PASS code is IDBDatabaseException.NOT_FOUND_ERR
trans = db.transaction(['store'])
PASS trans != null is true
@@ -118,10 +119,10 @@
PASS store != null is true
Expecting exception from trans.objectStore('store')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
Expecting exception from store.index('index')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
+PASS code is IDBDatabaseException.NOT_ALLOWED_ERR
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls.html b/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls.html
index c0775ca..e0be997 100644
--- a/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls.html
+++ b/LayoutTests/storage/indexeddb/transaction-and-objectstore-calls.html
@@ -12,10 +12,9 @@
function test()
{
- shouldBeTrue("'webkitIndexedDB' in window");
- shouldBeFalse("webkitIndexedDB == null");
+ removeVendorPrefixes();
- request = evalAndLog("webkitIndexedDB.open('transaction-and-objectstore-calls', 'description')");
+ request = evalAndLog("indexedDB.open('transaction-and-objectstore-calls', 'description')");
request.onsuccess = openSuccess;
request.onerror = unexpectedErrorCallback;
}
@@ -44,49 +43,49 @@
{
trans = evalAndLog("trans = db.transaction(['a'])");
evalAndLog("trans.objectStore('a')");
- evalAndExpectException("trans.objectStore('b')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
- evalAndExpectException("trans.objectStore('x')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("trans.objectStore('b')", "IDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("trans.objectStore('x')", "IDBDatabaseException.NOT_FOUND_ERR");
debug("");
trans = evalAndLog("trans = db.transaction(['a'])");
evalAndLog("trans.objectStore('a')");
- evalAndExpectException("trans.objectStore('b')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
- evalAndExpectException("trans.objectStore('x')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("trans.objectStore('b')", "IDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("trans.objectStore('x')", "IDBDatabaseException.NOT_FOUND_ERR");
debug("");
trans = evalAndLog("trans = db.transaction(['b'])");
evalAndLog("trans.objectStore('b')");
- evalAndExpectException("trans.objectStore('a')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
- evalAndExpectException("trans.objectStore('x')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("trans.objectStore('a')", "IDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("trans.objectStore('x')", "IDBDatabaseException.NOT_FOUND_ERR");
debug("");
trans = evalAndLog("trans = db.transaction(['a', 'b'])");
evalAndLog("trans.objectStore('a')");
evalAndLog("trans.objectStore('b')");
- evalAndExpectException("trans.objectStore('x')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("trans.objectStore('x')", "IDBDatabaseException.NOT_FOUND_ERR");
debug("");
trans = evalAndLog("trans = db.transaction(['b', 'a'])");
evalAndLog("trans.objectStore('a')");
evalAndLog("trans.objectStore('b')");
- evalAndExpectException("trans.objectStore('x')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("trans.objectStore('x')", "IDBDatabaseException.NOT_FOUND_ERR");
debug("");
debug("Passing a string as the first argument is a shortcut for just one object store:");
trans = evalAndLog("trans = db.transaction('a')");
evalAndLog("trans.objectStore('a')");
- evalAndExpectException("trans.objectStore('b')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
- evalAndExpectException("trans.objectStore('x')", "webkitIDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("trans.objectStore('b')", "IDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("trans.objectStore('x')", "IDBDatabaseException.NOT_FOUND_ERR");
debug("");
shouldThrow("trans = db.transaction()");
debug("");
- evalAndExpectException("db.transaction(['x'])", "webkitIDBDatabaseException.NOT_FOUND_ERR");
- evalAndExpectException("db.transaction(['x'])", "webkitIDBDatabaseException.NOT_FOUND_ERR");
- evalAndExpectException("db.transaction(['a', 'x'])", "webkitIDBDatabaseException.NOT_FOUND_ERR");
- evalAndExpectException("db.transaction(['x', 'x'])", "webkitIDBDatabaseException.NOT_FOUND_ERR");
- evalAndExpectException("db.transaction(['a', 'x', 'b'])", "webkitIDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("db.transaction(['x'])", "IDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("db.transaction(['x'])", "IDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("db.transaction(['a', 'x'])", "IDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("db.transaction(['x', 'x'])", "IDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("db.transaction(['a', 'x', 'b'])", "IDBDatabaseException.NOT_FOUND_ERR");
debug("");
debug("Exception thrown when no stores specified:");
@@ -94,16 +93,16 @@
debug("");
debug("{} coerces to a string - so no match, but not a type error:");
- evalAndExpectException("db.transaction({})", "webkitIDBDatabaseException.NOT_FOUND_ERR");
- evalAndExpectException("db.transaction({mode:0})", "webkitIDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("db.transaction({})", "IDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("db.transaction({mode:0})", "IDBDatabaseException.NOT_FOUND_ERR");
debug("");
debug("Overriding the default string coercion makes these work:");
evalAndLog("db.transaction({toString:function(){return 'a';}})");
evalAndLog("db.transaction([{toString:function(){return 'a';}}])");
debug("... but you still need to specify a real store:");
- evalAndExpectException("db.transaction([{toString:function(){return 'x';}}])", "webkitIDBDatabaseException.NOT_FOUND_ERR");
- evalAndExpectException("db.transaction([{toString:function(){return 'x';}}])", "webkitIDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("db.transaction([{toString:function(){return 'x';}}])", "IDBDatabaseException.NOT_FOUND_ERR");
+ evalAndExpectException("db.transaction([{toString:function(){return 'x';}}])", "IDBDatabaseException.NOT_FOUND_ERR");
debug("");
trans = evalAndLog("trans = db.transaction(['store'])");
@@ -121,8 +120,8 @@
debug("transaction complete, ensuring methods fail");
shouldBeTrue("trans != null");
shouldBeTrue("store != null");
- evalAndExpectException("trans.objectStore('store')", "webkitIDBDatabaseException.NOT_ALLOWED_ERR");
- evalAndExpectException("store.index('index')", "webkitIDBDatabaseException.NOT_ALLOWED_ERR");
+ evalAndExpectException("trans.objectStore('store')", "IDBDatabaseException.NOT_ALLOWED_ERR");
+ evalAndExpectException("store.index('index')", "IDBDatabaseException.NOT_ALLOWED_ERR");
finishJSTest();
}
diff --git a/LayoutTests/storage/indexeddb/transaction-basics-expected.txt b/LayoutTests/storage/indexeddb/transaction-basics-expected.txt
index 9c8c4e3..31f07b9 100644
--- a/LayoutTests/storage/indexeddb/transaction-basics-expected.txt
+++ b/LayoutTests/storage/indexeddb/transaction-basics-expected.txt
@@ -3,12 +3,8 @@
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
-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('transaction-basics')
openSuccess():
diff --git a/LayoutTests/storage/indexeddb/transaction-basics.html b/LayoutTests/storage/indexeddb/transaction-basics.html
index 7c5bb42..9f5950a 100644
--- a/LayoutTests/storage/indexeddb/transaction-basics.html
+++ b/LayoutTests/storage/indexeddb/transaction-basics.html
@@ -12,13 +12,7 @@
function test()
{
- evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB");
- shouldBeTrue("indexedDB != null");
- evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction");
- shouldBeTrue("IDBTransaction != null");
- evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException");
- shouldBeTrue("IDBDatabaseException != null");
- debug("");
+ removeVendorPrefixes();
request = evalAndLog("indexedDB.open('transaction-basics')");
request.onsuccess = openSuccess;
diff --git a/LayoutTests/storage/indexeddb/transaction-crash-on-abort-expected.txt b/LayoutTests/storage/indexeddb/transaction-crash-on-abort-expected.txt
index 6d33820..9b43e5a 100644
--- a/LayoutTests/storage/indexeddb/transaction-crash-on-abort-expected.txt
+++ b/LayoutTests/storage/indexeddb/transaction-crash-on-abort-expected.txt
@@ -3,9 +3,10 @@
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('transaction-crash-on-abort')
+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('transaction-crash-on-abort')
openSuccess():
db = event.target.result
db.setVersion('1.0')
diff --git a/LayoutTests/storage/indexeddb/transaction-crash-on-abort.html b/LayoutTests/storage/indexeddb/transaction-crash-on-abort.html
index 92c60f3..3953379 100644
--- a/LayoutTests/storage/indexeddb/transaction-crash-on-abort.html
+++ b/LayoutTests/storage/indexeddb/transaction-crash-on-abort.html
@@ -12,10 +12,9 @@
function test()
{
- shouldBeTrue("'webkitIndexedDB' in window");
- shouldBeFalse("webkitIndexedDB == null");
+ removeVendorPrefixes();
- request = evalAndLog("webkitIndexedDB.open('transaction-crash-on-abort')");
+ request = evalAndLog("indexedDB.open('transaction-crash-on-abort')");
request.onsuccess = openSuccess;
request.onerror = unexpectedErrorCallback;
}
diff --git a/LayoutTests/storage/indexeddb/transaction-event-propagation-expected.txt b/LayoutTests/storage/indexeddb/transaction-event-propagation-expected.txt
index d42061a..428a749 100644
--- a/LayoutTests/storage/indexeddb/transaction-event-propagation-expected.txt
+++ b/LayoutTests/storage/indexeddb/transaction-event-propagation-expected.txt
@@ -3,7 +3,10 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-webkitIndexedDB.open('transaction-event-propagation')
+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('transaction-event-propagation')
db = event.target.result
db.setVersion('new version')
trans = event.target.result
@@ -13,7 +16,7 @@
store = db.createObjectStore('storeName', null)
store.add({x: 'value', y: 'zzz'}, 'key')
Verifing abort
-trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)
trans.onabort = abortFiredCallback
trans.oncomplete = unexpectedAbortCallback
db.addEventListener('abort', dbAbortCaptureCallback, true)
@@ -45,7 +48,7 @@
PASS event.currentTarget is db
Verifing success.
-trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)
+trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)
trans.oncomplete = completeFiredCallback
trans.onabort = unexpectedAbortCallback
db.removeEventListener('abort', dbAbortCaptureCallback, true)
diff --git a/LayoutTests/storage/indexeddb/transaction-event-propagation.html b/LayoutTests/storage/indexeddb/transaction-event-propagation.html
index a7de6ec..c36729e 100644
--- a/LayoutTests/storage/indexeddb/transaction-event-propagation.html
+++ b/LayoutTests/storage/indexeddb/transaction-event-propagation.html
@@ -12,7 +12,8 @@
function test()
{
- request = evalAndLog("webkitIndexedDB.open('transaction-event-propagation')");
+ removeVendorPrefixes();
+ request = evalAndLog("indexedDB.open('transaction-event-propagation')");
request.onsuccess = setVersion;
request.onerror = unexpectedErrorCallback;
}
@@ -43,7 +44,7 @@
function startTest()
{
debug("Verifing abort");
- trans = evalAndLog("trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)");
+ trans = evalAndLog("trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)");
evalAndLog("trans.onabort = abortFiredCallback");
evalAndLog("trans.oncomplete = unexpectedAbortCallback");
evalAndLog("db.addEventListener('abort', dbAbortCaptureCallback, true)");
@@ -93,7 +94,7 @@
dbBubbleFired1 = true;
debug("");
debug("Verifing success.");
- trans = evalAndLog("trans = db.transaction(['storeName'], webkitIDBTransaction.READ_WRITE)");
+ trans = evalAndLog("trans = db.transaction(['storeName'], IDBTransaction.READ_WRITE)");
evalAndLog("trans.oncomplete = completeFiredCallback");
evalAndLog("trans.onabort = unexpectedAbortCallback");
evalAndLog("db.removeEventListener('abort', dbAbortCaptureCallback, true)");
diff --git a/LayoutTests/storage/indexeddb/transaction-read-only-expected.txt b/LayoutTests/storage/indexeddb/transaction-read-only-expected.txt
index 20f129f..c7670e9 100644
--- a/LayoutTests/storage/indexeddb/transaction-read-only-expected.txt
+++ b/LayoutTests/storage/indexeddb/transaction-read-only-expected.txt
@@ -3,9 +3,10 @@
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('transaction-read-only')
+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('transaction-read-only')
openSuccess():
db = event.target.result
result = db.setVersion('version 1')
@@ -15,17 +16,17 @@
trans = db.transaction('store')
Expecting exception from trans.objectStore('store').put('a', 'b')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.READ_ONLY_ERR
+PASS code is IDBDatabaseException.READ_ONLY_ERR
trans = db.transaction('store')
Expecting exception from trans.objectStore('store').delete('x')
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.READ_ONLY_ERR
+PASS code is IDBDatabaseException.READ_ONLY_ERR
trans = db.transaction('store')
cur = trans.objectStore('store').openCursor()
PASS !event.target.result is false
Expecting exception from event.target.result.delete()
PASS Exception was thrown.
-PASS code is webkitIDBDatabaseException.READ_ONLY_ERR
+PASS code is IDBDatabaseException.READ_ONLY_ERR
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/storage/indexeddb/transaction-read-only.html b/LayoutTests/storage/indexeddb/transaction-read-only.html
index 1d7b2a0..4067a81 100644
--- a/LayoutTests/storage/indexeddb/transaction-read-only.html
+++ b/LayoutTests/storage/indexeddb/transaction-read-only.html
@@ -12,10 +12,9 @@
function test()
{
- shouldBeTrue("'webkitIndexedDB' in window");
- shouldBeFalse("webkitIndexedDB == null");
+ removeVendorPrefixes();
- request = evalAndLog("webkitIndexedDB.open('transaction-read-only')");
+ request = evalAndLog("indexedDB.open('transaction-read-only')");
request.onsuccess = openSuccess;
request.onerror = unexpectedErrorCallback;
}
@@ -42,10 +41,10 @@
function setVersionDone()
{
trans = evalAndLog("trans = db.transaction('store')");
- evalAndExpectException("trans.objectStore('store').put('a', 'b')", "webkitIDBDatabaseException.READ_ONLY_ERR");
+ evalAndExpectException("trans.objectStore('store').put('a', 'b')", "IDBDatabaseException.READ_ONLY_ERR");
trans = evalAndLog("trans = db.transaction('store')");
- evalAndExpectException("trans.objectStore('store').delete('x')", "webkitIDBDatabaseException.READ_ONLY_ERR");
+ evalAndExpectException("trans.objectStore('store').delete('x')", "IDBDatabaseException.READ_ONLY_ERR");
trans = evalAndLog("trans = db.transaction('store')");
cur = evalAndLog("cur = trans.objectStore('store').openCursor()");
@@ -56,7 +55,7 @@
function gotCursor()
{
shouldBeFalse("!event.target.result");
- evalAndExpectException("event.target.result.delete()", "webkitIDBDatabaseException.READ_ONLY_ERR");
+ evalAndExpectException("event.target.result.delete()", "IDBDatabaseException.READ_ONLY_ERR");
finishJSTest();
}
diff --git a/LayoutTests/storage/indexeddb/transaction-rollback-expected.txt b/LayoutTests/storage/indexeddb/transaction-rollback-expected.txt
index 3990aac..f55b668 100644
--- a/LayoutTests/storage/indexeddb/transaction-rollback-expected.txt
+++ b/LayoutTests/storage/indexeddb/transaction-rollback-expected.txt
@@ -3,9 +3,10 @@
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('transaction-rollback')
+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('transaction-rollback')
openSuccess():
db = event.target.result
request = db.setVersion('version 1')
@@ -15,7 +16,7 @@
db.createObjectStore('myObjectStore')
PASS db.objectStoreNames.length is 1
setVersionComplete():
-transaction = db.transaction(['myObjectStore'], webkitIDBTransaction.READ_WRITE)
+transaction = db.transaction(['myObjectStore'], IDBTransaction.READ_WRITE)
store = transaction.objectStore('myObjectStore')
store.add('rollbackValue', 'rollbackKey123')
addSuccess():
@@ -25,7 +26,7 @@
cursor = event.target.result
abortCallback():
Transaction was aborted.
-transaction = db.transaction(['myObjectStore'], webkitIDBTransaction.READ)
+transaction = db.transaction(['myObjectStore'], IDBTransaction.READ)
store = transaction.objectStore('myObjectStore')
store.get('rollbackKey123')
getSuccess():
diff --git a/LayoutTests/storage/indexeddb/transaction-rollback.html b/LayoutTests/storage/indexeddb/transaction-rollback.html
index 3c930d0..7162a50 100644
--- a/LayoutTests/storage/indexeddb/transaction-rollback.html
+++ b/LayoutTests/storage/indexeddb/transaction-rollback.html
@@ -12,10 +12,9 @@
function test()
{
- shouldBeTrue("'webkitIndexedDB' in window");
- shouldBeFalse("webkitIndexedDB == null");
+ removeVendorPrefixes();
- request = evalAndLog("webkitIndexedDB.open('transaction-rollback')");
+ request = evalAndLog("indexedDB.open('transaction-rollback')");
request.onsuccess = openSuccess;
request.onerror = unexpectedErrorCallback;
}
@@ -45,7 +44,7 @@
{
debug("setVersionComplete():");
- window.transaction = evalAndLog("transaction = db.transaction(['myObjectStore'], webkitIDBTransaction.READ_WRITE)");
+ window.transaction = evalAndLog("transaction = db.transaction(['myObjectStore'], IDBTransaction.READ_WRITE)");
transaction.onabort = abortCallback;
transaction.oncomplete = unexpectedCompleteCallback;
@@ -78,7 +77,7 @@
debug("abortCallback():");
debug('Transaction was aborted.');
- window.transaction = evalAndLog("transaction = db.transaction(['myObjectStore'], webkitIDBTransaction.READ)");
+ window.transaction = evalAndLog("transaction = db.transaction(['myObjectStore'], IDBTransaction.READ)");
window.store = evalAndLog("store = transaction.objectStore('myObjectStore')");
request = evalAndLog("store.get('rollbackKey123')");
request.onerror = unexpectedErrorCallback;
diff --git a/LayoutTests/storage/indexeddb/transaction-storeNames-required-expected.txt b/LayoutTests/storage/indexeddb/transaction-storeNames-required-expected.txt
index 8727794..921cecb 100644
--- a/LayoutTests/storage/indexeddb/transaction-storeNames-required-expected.txt
+++ b/LayoutTests/storage/indexeddb/transaction-storeNames-required-expected.txt
@@ -3,14 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/transaction-storeNames-required.html b/LayoutTests/storage/indexeddb/transaction-storeNames-required.html
index fabe489..354f110 100644
--- a/LayoutTests/storage/indexeddb/transaction-storeNames-required.html
+++ b/LayoutTests/storage/indexeddb/transaction-storeNames-required.html
@@ -13,14 +13,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/two-version-changes-expected.txt b/LayoutTests/storage/indexeddb/two-version-changes-expected.txt
index e27734b..005a6a1 100644
--- a/LayoutTests/storage/indexeddb/two-version-changes-expected.txt
+++ b/LayoutTests/storage/indexeddb/two-version-changes-expected.txt
@@ -3,8 +3,9 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.mozIDBTransaction;
+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 == null is false
PASS IDBTransaction == null is false
window.state = 'starting'
diff --git a/LayoutTests/storage/indexeddb/two-version-changes.html b/LayoutTests/storage/indexeddb/two-version-changes.html
index 555071a..e80eafe 100644
--- a/LayoutTests/storage/indexeddb/two-version-changes.html
+++ b/LayoutTests/storage/indexeddb/two-version-changes.html
@@ -12,8 +12,7 @@
function test() {
- indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- IDBTransaction = evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.mozIDBTransaction;");
+ removeVendorPrefixes();
shouldBeFalse("indexedDB == null");
shouldBeFalse("IDBTransaction == null");
diff --git a/LayoutTests/storage/indexeddb/value-undefined-expected.txt b/LayoutTests/storage/indexeddb/value-undefined-expected.txt
index 32cdffc..c262065 100644
--- a/LayoutTests/storage/indexeddb/value-undefined-expected.txt
+++ b/LayoutTests/storage/indexeddb/value-undefined-expected.txt
@@ -3,14 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/value-undefined.html b/LayoutTests/storage/indexeddb/value-undefined.html
index 7c643a0..ba967a5 100644
--- a/LayoutTests/storage/indexeddb/value-undefined.html
+++ b/LayoutTests/storage/indexeddb/value-undefined.html
@@ -13,14 +13,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/values-odd-types-expected.txt b/LayoutTests/storage/indexeddb/values-odd-types-expected.txt
index cacd279..0b1d834 100644
--- a/LayoutTests/storage/indexeddb/values-odd-types-expected.txt
+++ b/LayoutTests/storage/indexeddb/values-odd-types-expected.txt
@@ -3,14 +3,9 @@
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')
diff --git a/LayoutTests/storage/indexeddb/values-odd-types.html b/LayoutTests/storage/indexeddb/values-odd-types.html
index a062d96..148e884 100644
--- a/LayoutTests/storage/indexeddb/values-odd-types.html
+++ b/LayoutTests/storage/indexeddb/values-odd-types.html
@@ -13,14 +13,7 @@
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";
diff --git a/LayoutTests/storage/indexeddb/version-change-abort-expected.txt b/LayoutTests/storage/indexeddb/version-change-abort-expected.txt
index 5253590..9f1c255 100644
--- a/LayoutTests/storage/indexeddb/version-change-abort-expected.txt
+++ b/LayoutTests/storage/indexeddb/version-change-abort-expected.txt
@@ -1,13 +1,11 @@
-CONSOLE MESSAGE: line 82: Uncaught Error: This should *NOT* be caught!
+CONSOLE MESSAGE: line 78: Uncaught Error: This should *NOT* be caught!
Ensure that aborted VERSION_CHANGE transactions are completely rolled back
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
-IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
-PASS indexedDB == null is false
-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('version-change-abort')
db = event.target.result
diff --git a/LayoutTests/storage/indexeddb/version-change-abort.html b/LayoutTests/storage/indexeddb/version-change-abort.html
index 4f065f0..b5b29ed 100644
--- a/LayoutTests/storage/indexeddb/version-change-abort.html
+++ b/LayoutTests/storage/indexeddb/version-change-abort.html
@@ -13,11 +13,7 @@
function test() {
- evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;");
- shouldBeFalse("indexedDB == null");
- shouldBeFalse("IDBTransaction == null");
- debug("");
+ removeVendorPrefixes();
openDBConnection();
}
diff --git a/LayoutTests/storage/indexeddb/version-change-exclusive-expected.txt b/LayoutTests/storage/indexeddb/version-change-exclusive-expected.txt
index 389e67b..b1ce7d0 100644
--- a/LayoutTests/storage/indexeddb/version-change-exclusive-expected.txt
+++ b/LayoutTests/storage/indexeddb/version-change-exclusive-expected.txt
@@ -3,8 +3,9 @@
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('version-change-exclusive')
db = event.target.result
diff --git a/LayoutTests/storage/indexeddb/version-change-exclusive.html b/LayoutTests/storage/indexeddb/version-change-exclusive.html
index d76a70b..8ddb62c 100644
--- a/LayoutTests/storage/indexeddb/version-change-exclusive.html
+++ b/LayoutTests/storage/indexeddb/version-change-exclusive.html
@@ -12,8 +12,7 @@
function test() {
- indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
+ removeVendorPrefixes();
openDBConnection();
}
diff --git a/LayoutTests/storage/indexeddb/versionchangerequest-activedomobject-expected.txt b/LayoutTests/storage/indexeddb/versionchangerequest-activedomobject-expected.txt
index 32c99bb..d470387 100644
--- a/LayoutTests/storage/indexeddb/versionchangerequest-activedomobject-expected.txt
+++ b/LayoutTests/storage/indexeddb/versionchangerequest-activedomobject-expected.txt
@@ -3,8 +3,9 @@
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.dbname = 'versionchangerequest-activedomobject'
diff --git a/LayoutTests/storage/indexeddb/versionchangerequest-activedomobject.html b/LayoutTests/storage/indexeddb/versionchangerequest-activedomobject.html
index 207a45b..f1b5cdd 100644
--- a/LayoutTests/storage/indexeddb/versionchangerequest-activedomobject.html
+++ b/LayoutTests/storage/indexeddb/versionchangerequest-activedomobject.html
@@ -12,8 +12,7 @@
description("Ensure that IDBVersionChangeRequest objects are not GC'd if they have pending events");
function test() {
- evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
- shouldBeFalse("indexedDB == null");
+ removeVendorPrefixes();
debug("");
evalAndLog("window.dbname = 'versionchangerequest-activedomobject'");