Modern IDB: Make storage/indexeddb/modern tests more modern.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jan 2016 22:27:08 +0000 (22:27 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jan 2016 22:27:08 +0000 (22:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=153284

Reviewed by Alex Christensen.

* storage/indexeddb/modern/abort-requests-cancelled-expected.txt:
* storage/indexeddb/modern/aborted-put-expected.txt:
* storage/indexeddb/modern/autoincrement-abort-expected.txt:
* storage/indexeddb/modern/basic-add-expected.txt:
* storage/indexeddb/modern/basic-put-expected.txt:
* storage/indexeddb/modern/create-index-failures-expected.txt:
* storage/indexeddb/modern/createobjectstore-basic-expected.txt:
* storage/indexeddb/modern/createobjectstore-failures-expected.txt:
* storage/indexeddb/modern/cursor-1-expected.txt:
* storage/indexeddb/modern/cursor-2-expected.txt:
* storage/indexeddb/modern/cursor-3-expected.txt:
* storage/indexeddb/modern/cursor-4-expected.txt:
* storage/indexeddb/modern/cursor-5-expected.txt:
* storage/indexeddb/modern/cursor-6-expected.txt:
* storage/indexeddb/modern/cursor-7-expected.txt:
* storage/indexeddb/modern/cursor-8-expected.txt:
* storage/indexeddb/modern/date-basic-expected.txt:
* storage/indexeddb/modern/deletedatabase-1-expected.txt:
* storage/indexeddb/modern/deletedatabase-2-expected.txt:
* storage/indexeddb/modern/deleteindex-1-expected.txt:
* storage/indexeddb/modern/deleteindex-2-expected.txt:
* storage/indexeddb/modern/deleteobjectstore-1-expected.txt:
* storage/indexeddb/modern/double-abort-expected.txt:
* storage/indexeddb/modern/get-index-failures-expected.txt:
* storage/indexeddb/modern/get-keyrange-expected.txt:
* storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt:
* storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt:
* storage/indexeddb/modern/idbindex-properties-basic-expected.txt:
* storage/indexeddb/modern/idbobjectstore-clear-1-expected.txt:
* storage/indexeddb/modern/idbobjectstore-clear-2-expected.txt:
* storage/indexeddb/modern/idbobjectstore-count-1-expected.txt:
* storage/indexeddb/modern/idbobjectstore-count-failures-expected.txt:
* storage/indexeddb/modern/idbobjectstore-delete-1-expected.txt:
* storage/indexeddb/modern/idbobjectstore-delete-2-expected.txt:
* storage/indexeddb/modern/idbobjectstore-delete-failures-expected.txt:
* storage/indexeddb/modern/idbobjectstore-get-failures-expected.txt:
* storage/indexeddb/modern/idbobjectstore-put-and-clear-failures-expected.txt:
* storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt:
* storage/indexeddb/modern/index-1-expected.txt:
* storage/indexeddb/modern/index-2-expected.txt:
* storage/indexeddb/modern/index-3-expected.txt:
* storage/indexeddb/modern/index-4-expected.txt:
* storage/indexeddb/modern/index-5-expected.txt:
* storage/indexeddb/modern/index-cursor-1-expected.txt:
* storage/indexeddb/modern/index-cursor-2-expected.txt:
* storage/indexeddb/modern/index-cursor-3-expected.txt:
* storage/indexeddb/modern/index-get-count-basic-expected.txt:
* storage/indexeddb/modern/index-get-count-failures-expected.txt:
* storage/indexeddb/modern/keypath-basic-expected.txt:
* storage/indexeddb/modern/objectstore-attributes-expected.txt:
* storage/indexeddb/modern/objectstore-cursor-advance-failures-expected.txt:
* storage/indexeddb/modern/objectstore-cursor-continue-failures-expected.txt:
* storage/indexeddb/modern/opencursor-failures-expected.txt:
* storage/indexeddb/modern/opendatabase-success-after-versionchange-expected.txt:
* storage/indexeddb/modern/opendatabase-versions-expected.txt:
* storage/indexeddb/modern/resources/abort-requests-cancelled.js:
* storage/indexeddb/modern/resources/aborted-put.js:
* storage/indexeddb/modern/resources/autoincrement-abort.js:
* storage/indexeddb/modern/resources/basic-add.js:
* storage/indexeddb/modern/resources/basic-put.js:
* storage/indexeddb/modern/resources/create-index-failures.js:
* storage/indexeddb/modern/resources/createobjectstore-basic.js:
* storage/indexeddb/modern/resources/createobjectstore-failures.js:
* storage/indexeddb/modern/resources/cursor-1.js:
* storage/indexeddb/modern/resources/cursor-2.js:
* storage/indexeddb/modern/resources/cursor-3.js:
* storage/indexeddb/modern/resources/cursor-4.js:
* storage/indexeddb/modern/resources/cursor-5.js:
* storage/indexeddb/modern/resources/cursor-6.js:
* storage/indexeddb/modern/resources/cursor-7.js:
* storage/indexeddb/modern/resources/cursor-8.js:
* storage/indexeddb/modern/resources/date-basic.js:
* storage/indexeddb/modern/resources/deletedatabase-1.js:
* storage/indexeddb/modern/resources/deletedatabase-2.js:
* storage/indexeddb/modern/resources/deletedatabase-null-name-exception.js:
* storage/indexeddb/modern/resources/deletedatabase-request-event.js:
* storage/indexeddb/modern/resources/deletedatabase-request.js:
* storage/indexeddb/modern/resources/deleteindex-1.js:
* storage/indexeddb/modern/resources/deleteindex-2.js:
* storage/indexeddb/modern/resources/deleteobjectstore-1.js:
* storage/indexeddb/modern/resources/double-abort.js:
* storage/indexeddb/modern/resources/double-open.js:
* storage/indexeddb/modern/resources/get-index-failures.js:
* storage/indexeddb/modern/resources/get-keyrange.js:
* storage/indexeddb/modern/resources/idbdatabase-deleteobjectstore-failures.js:
* storage/indexeddb/modern/resources/idbdatabase-transaction-failures.js:
* storage/indexeddb/modern/resources/idbindex-properties-basic.js:
* storage/indexeddb/modern/resources/idbobjectstore-clear-1.js:
* storage/indexeddb/modern/resources/idbobjectstore-clear-2.js:
* storage/indexeddb/modern/resources/idbobjectstore-count-1.js:
* storage/indexeddb/modern/resources/idbobjectstore-count-failures.js:
* storage/indexeddb/modern/resources/idbobjectstore-delete-1.js:
* storage/indexeddb/modern/resources/idbobjectstore-delete-2.js:
* storage/indexeddb/modern/resources/idbobjectstore-delete-failures.js:
* storage/indexeddb/modern/resources/idbobjectstore-get-failures.js:
* storage/indexeddb/modern/resources/idbobjectstore-put-and-clear-failures.js:
* storage/indexeddb/modern/resources/idbtransaction-objectstore-failures.js:
* storage/indexeddb/modern/resources/index-1.js:
* storage/indexeddb/modern/resources/index-2.js:
* storage/indexeddb/modern/resources/index-3.js:
* storage/indexeddb/modern/resources/index-4.js:
* storage/indexeddb/modern/resources/index-5.js:
* storage/indexeddb/modern/resources/index-cursor-1.js:
* storage/indexeddb/modern/resources/index-cursor-2.js:
* storage/indexeddb/modern/resources/index-cursor-3.js:
* storage/indexeddb/modern/resources/index-get-count-basic.js:
* storage/indexeddb/modern/resources/index-get-count-failures.js:
* storage/indexeddb/modern/resources/keypath-basic.js:
* storage/indexeddb/modern/resources/objectstore-attributes.js:
* storage/indexeddb/modern/resources/objectstore-cursor-advance-failures.js:
* storage/indexeddb/modern/resources/objectstore-cursor-continue-failures.js:
* storage/indexeddb/modern/resources/opencursor-failures.js:
* storage/indexeddb/modern/resources/opendatabase-request-event.js:
* storage/indexeddb/modern/resources/opendatabase-request.js:
* storage/indexeddb/modern/resources/opendatabase-success-after-versionchange.js:
* storage/indexeddb/modern/resources/opendatabase-versions.js:
* storage/indexeddb/modern/resources/request-readystate.js:
* storage/indexeddb/modern/resources/transaction-scheduler-1.js:
* storage/indexeddb/modern/resources/transaction-scheduler-2.js:
* storage/indexeddb/modern/resources/transaction-scheduler-3.js:
* storage/indexeddb/modern/resources/transaction-scheduler-5.js:
* storage/indexeddb/modern/resources/transaction-scheduler-6.js:
* storage/indexeddb/modern/resources/versionchange-abort-then-reopen.js:
* storage/indexeddb/modern/resources/versionchange-event.js:
* storage/indexeddb/modern/transaction-scheduler-1-expected.txt:
* storage/indexeddb/modern/transaction-scheduler-2-expected.txt:
* storage/indexeddb/modern/transaction-scheduler-3-expected.txt:
* storage/indexeddb/modern/transaction-scheduler-5-expected.txt:
* storage/indexeddb/modern/transaction-scheduler-6-expected.txt:
* storage/indexeddb/modern/versionchange-abort-then-reopen-expected.txt:
* storage/indexeddb/modern/versionchange-event-expected.txt:

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

132 files changed:
LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/modern/abort-requests-cancelled-expected.txt
LayoutTests/storage/indexeddb/modern/aborted-put-expected.txt
LayoutTests/storage/indexeddb/modern/autoincrement-abort-expected.txt
LayoutTests/storage/indexeddb/modern/basic-add-expected.txt
LayoutTests/storage/indexeddb/modern/basic-put-expected.txt
LayoutTests/storage/indexeddb/modern/create-index-failures-expected.txt
LayoutTests/storage/indexeddb/modern/createobjectstore-basic-expected.txt
LayoutTests/storage/indexeddb/modern/createobjectstore-failures-expected.txt
LayoutTests/storage/indexeddb/modern/cursor-1-expected.txt
LayoutTests/storage/indexeddb/modern/cursor-2-expected.txt
LayoutTests/storage/indexeddb/modern/cursor-3-expected.txt
LayoutTests/storage/indexeddb/modern/cursor-4-expected.txt
LayoutTests/storage/indexeddb/modern/cursor-5-expected.txt
LayoutTests/storage/indexeddb/modern/cursor-6-expected.txt
LayoutTests/storage/indexeddb/modern/cursor-7-expected.txt
LayoutTests/storage/indexeddb/modern/cursor-8-expected.txt
LayoutTests/storage/indexeddb/modern/date-basic-expected.txt
LayoutTests/storage/indexeddb/modern/deletedatabase-1-expected.txt
LayoutTests/storage/indexeddb/modern/deletedatabase-2-expected.txt
LayoutTests/storage/indexeddb/modern/deleteindex-1-expected.txt
LayoutTests/storage/indexeddb/modern/deleteindex-2-expected.txt
LayoutTests/storage/indexeddb/modern/deleteobjectstore-1-expected.txt
LayoutTests/storage/indexeddb/modern/double-abort-expected.txt
LayoutTests/storage/indexeddb/modern/get-index-failures-expected.txt
LayoutTests/storage/indexeddb/modern/get-keyrange-expected.txt
LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt
LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt
LayoutTests/storage/indexeddb/modern/idbindex-properties-basic-expected.txt
LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1-expected.txt
LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2-expected.txt
LayoutTests/storage/indexeddb/modern/idbobjectstore-count-1-expected.txt
LayoutTests/storage/indexeddb/modern/idbobjectstore-count-failures-expected.txt
LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-1-expected.txt
LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-2-expected.txt
LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-failures-expected.txt
LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures-expected.txt
LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures-expected.txt
LayoutTests/storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt
LayoutTests/storage/indexeddb/modern/index-1-expected.txt
LayoutTests/storage/indexeddb/modern/index-2-expected.txt
LayoutTests/storage/indexeddb/modern/index-3-expected.txt
LayoutTests/storage/indexeddb/modern/index-4-expected.txt
LayoutTests/storage/indexeddb/modern/index-5-expected.txt
LayoutTests/storage/indexeddb/modern/index-cursor-1-expected.txt
LayoutTests/storage/indexeddb/modern/index-cursor-2-expected.txt
LayoutTests/storage/indexeddb/modern/index-cursor-3-expected.txt
LayoutTests/storage/indexeddb/modern/index-get-count-basic-expected.txt
LayoutTests/storage/indexeddb/modern/index-get-count-failures-expected.txt
LayoutTests/storage/indexeddb/modern/keypath-basic-expected.txt
LayoutTests/storage/indexeddb/modern/objectstore-attributes-expected.txt
LayoutTests/storage/indexeddb/modern/objectstore-cursor-advance-failures-expected.txt
LayoutTests/storage/indexeddb/modern/objectstore-cursor-continue-failures-expected.txt
LayoutTests/storage/indexeddb/modern/opencursor-failures-expected.txt
LayoutTests/storage/indexeddb/modern/opendatabase-success-after-versionchange-expected.txt
LayoutTests/storage/indexeddb/modern/opendatabase-versions-expected.txt
LayoutTests/storage/indexeddb/modern/resources/abort-requests-cancelled.js
LayoutTests/storage/indexeddb/modern/resources/aborted-put.js
LayoutTests/storage/indexeddb/modern/resources/autoincrement-abort.js
LayoutTests/storage/indexeddb/modern/resources/basic-add.js
LayoutTests/storage/indexeddb/modern/resources/basic-put.js
LayoutTests/storage/indexeddb/modern/resources/create-index-failures.js
LayoutTests/storage/indexeddb/modern/resources/createobjectstore-basic.js
LayoutTests/storage/indexeddb/modern/resources/createobjectstore-failures.js
LayoutTests/storage/indexeddb/modern/resources/cursor-1.js
LayoutTests/storage/indexeddb/modern/resources/cursor-2.js
LayoutTests/storage/indexeddb/modern/resources/cursor-3.js
LayoutTests/storage/indexeddb/modern/resources/cursor-4.js
LayoutTests/storage/indexeddb/modern/resources/cursor-5.js
LayoutTests/storage/indexeddb/modern/resources/cursor-6.js
LayoutTests/storage/indexeddb/modern/resources/cursor-7.js
LayoutTests/storage/indexeddb/modern/resources/cursor-8.js
LayoutTests/storage/indexeddb/modern/resources/date-basic.js
LayoutTests/storage/indexeddb/modern/resources/deletedatabase-1.js
LayoutTests/storage/indexeddb/modern/resources/deletedatabase-2.js
LayoutTests/storage/indexeddb/modern/resources/deletedatabase-null-name-exception.js
LayoutTests/storage/indexeddb/modern/resources/deletedatabase-request-event.js
LayoutTests/storage/indexeddb/modern/resources/deletedatabase-request.js
LayoutTests/storage/indexeddb/modern/resources/deleteindex-1.js
LayoutTests/storage/indexeddb/modern/resources/deleteindex-2.js
LayoutTests/storage/indexeddb/modern/resources/deleteobjectstore-1.js
LayoutTests/storage/indexeddb/modern/resources/double-abort.js
LayoutTests/storage/indexeddb/modern/resources/double-open.js
LayoutTests/storage/indexeddb/modern/resources/get-index-failures.js
LayoutTests/storage/indexeddb/modern/resources/get-keyrange.js
LayoutTests/storage/indexeddb/modern/resources/idbdatabase-deleteobjectstore-failures.js
LayoutTests/storage/indexeddb/modern/resources/idbdatabase-transaction-failures.js
LayoutTests/storage/indexeddb/modern/resources/idbindex-properties-basic.js
LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-clear-1.js
LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-clear-2.js
LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-count-1.js
LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-count-failures.js
LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-delete-1.js
LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-delete-2.js
LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-delete-failures.js
LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-get-failures.js
LayoutTests/storage/indexeddb/modern/resources/idbobjectstore-put-and-clear-failures.js
LayoutTests/storage/indexeddb/modern/resources/idbtransaction-objectstore-failures.js
LayoutTests/storage/indexeddb/modern/resources/index-1.js
LayoutTests/storage/indexeddb/modern/resources/index-2.js
LayoutTests/storage/indexeddb/modern/resources/index-3.js
LayoutTests/storage/indexeddb/modern/resources/index-4.js
LayoutTests/storage/indexeddb/modern/resources/index-5.js
LayoutTests/storage/indexeddb/modern/resources/index-cursor-1.js
LayoutTests/storage/indexeddb/modern/resources/index-cursor-2.js
LayoutTests/storage/indexeddb/modern/resources/index-cursor-3.js
LayoutTests/storage/indexeddb/modern/resources/index-get-count-basic.js
LayoutTests/storage/indexeddb/modern/resources/index-get-count-failures.js
LayoutTests/storage/indexeddb/modern/resources/keypath-basic.js
LayoutTests/storage/indexeddb/modern/resources/objectstore-attributes.js
LayoutTests/storage/indexeddb/modern/resources/objectstore-cursor-advance-failures.js
LayoutTests/storage/indexeddb/modern/resources/objectstore-cursor-continue-failures.js
LayoutTests/storage/indexeddb/modern/resources/opencursor-failures.js
LayoutTests/storage/indexeddb/modern/resources/opendatabase-request-event.js
LayoutTests/storage/indexeddb/modern/resources/opendatabase-request.js
LayoutTests/storage/indexeddb/modern/resources/opendatabase-success-after-versionchange.js
LayoutTests/storage/indexeddb/modern/resources/opendatabase-versions.js
LayoutTests/storage/indexeddb/modern/resources/request-readystate.js
LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-1.js
LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-2.js
LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-3.js
LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-5.js
LayoutTests/storage/indexeddb/modern/resources/transaction-scheduler-6.js
LayoutTests/storage/indexeddb/modern/resources/versionchange-abort-then-reopen.js
LayoutTests/storage/indexeddb/modern/resources/versionchange-event.js
LayoutTests/storage/indexeddb/modern/transaction-scheduler-1-expected.txt
LayoutTests/storage/indexeddb/modern/transaction-scheduler-2-expected.txt
LayoutTests/storage/indexeddb/modern/transaction-scheduler-3-expected.txt
LayoutTests/storage/indexeddb/modern/transaction-scheduler-5-expected.txt
LayoutTests/storage/indexeddb/modern/transaction-scheduler-6-expected.txt
LayoutTests/storage/indexeddb/modern/versionchange-abort-then-reopen-expected.txt
LayoutTests/storage/indexeddb/modern/versionchange-event-expected.txt

index 1d6cbed..0b9925b 100644 (file)
@@ -1,3 +1,142 @@
+2016-01-20  Brady Eidson  <beidson@apple.com>
+
+        Modern IDB: Make storage/indexeddb/modern tests more modern.
+        https://bugs.webkit.org/show_bug.cgi?id=153284
+
+        Reviewed by Alex Christensen.
+
+        * storage/indexeddb/modern/abort-requests-cancelled-expected.txt:
+        * storage/indexeddb/modern/aborted-put-expected.txt:
+        * storage/indexeddb/modern/autoincrement-abort-expected.txt:
+        * storage/indexeddb/modern/basic-add-expected.txt:
+        * storage/indexeddb/modern/basic-put-expected.txt:
+        * storage/indexeddb/modern/create-index-failures-expected.txt:
+        * storage/indexeddb/modern/createobjectstore-basic-expected.txt:
+        * storage/indexeddb/modern/createobjectstore-failures-expected.txt:
+        * storage/indexeddb/modern/cursor-1-expected.txt:
+        * storage/indexeddb/modern/cursor-2-expected.txt:
+        * storage/indexeddb/modern/cursor-3-expected.txt:
+        * storage/indexeddb/modern/cursor-4-expected.txt:
+        * storage/indexeddb/modern/cursor-5-expected.txt:
+        * storage/indexeddb/modern/cursor-6-expected.txt:
+        * storage/indexeddb/modern/cursor-7-expected.txt:
+        * storage/indexeddb/modern/cursor-8-expected.txt:
+        * storage/indexeddb/modern/date-basic-expected.txt:
+        * storage/indexeddb/modern/deletedatabase-1-expected.txt:
+        * storage/indexeddb/modern/deletedatabase-2-expected.txt:
+        * storage/indexeddb/modern/deleteindex-1-expected.txt:
+        * storage/indexeddb/modern/deleteindex-2-expected.txt:
+        * storage/indexeddb/modern/deleteobjectstore-1-expected.txt:
+        * storage/indexeddb/modern/double-abort-expected.txt:
+        * storage/indexeddb/modern/get-index-failures-expected.txt:
+        * storage/indexeddb/modern/get-keyrange-expected.txt:
+        * storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt:
+        * storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt:
+        * storage/indexeddb/modern/idbindex-properties-basic-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-clear-1-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-clear-2-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-count-1-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-count-failures-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-delete-1-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-delete-2-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-delete-failures-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-get-failures-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-put-and-clear-failures-expected.txt:
+        * storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt:
+        * storage/indexeddb/modern/index-1-expected.txt:
+        * storage/indexeddb/modern/index-2-expected.txt:
+        * storage/indexeddb/modern/index-3-expected.txt:
+        * storage/indexeddb/modern/index-4-expected.txt:
+        * storage/indexeddb/modern/index-5-expected.txt:
+        * storage/indexeddb/modern/index-cursor-1-expected.txt:
+        * storage/indexeddb/modern/index-cursor-2-expected.txt:
+        * storage/indexeddb/modern/index-cursor-3-expected.txt:
+        * storage/indexeddb/modern/index-get-count-basic-expected.txt:
+        * storage/indexeddb/modern/index-get-count-failures-expected.txt:
+        * storage/indexeddb/modern/keypath-basic-expected.txt:
+        * storage/indexeddb/modern/objectstore-attributes-expected.txt:
+        * storage/indexeddb/modern/objectstore-cursor-advance-failures-expected.txt:
+        * storage/indexeddb/modern/objectstore-cursor-continue-failures-expected.txt:
+        * storage/indexeddb/modern/opencursor-failures-expected.txt:
+        * storage/indexeddb/modern/opendatabase-success-after-versionchange-expected.txt:
+        * storage/indexeddb/modern/opendatabase-versions-expected.txt:
+        * storage/indexeddb/modern/resources/abort-requests-cancelled.js:
+        * storage/indexeddb/modern/resources/aborted-put.js:
+        * storage/indexeddb/modern/resources/autoincrement-abort.js:
+        * storage/indexeddb/modern/resources/basic-add.js:
+        * storage/indexeddb/modern/resources/basic-put.js:
+        * storage/indexeddb/modern/resources/create-index-failures.js:
+        * storage/indexeddb/modern/resources/createobjectstore-basic.js:
+        * storage/indexeddb/modern/resources/createobjectstore-failures.js:
+        * storage/indexeddb/modern/resources/cursor-1.js:
+        * storage/indexeddb/modern/resources/cursor-2.js:
+        * storage/indexeddb/modern/resources/cursor-3.js:
+        * storage/indexeddb/modern/resources/cursor-4.js:
+        * storage/indexeddb/modern/resources/cursor-5.js:
+        * storage/indexeddb/modern/resources/cursor-6.js:
+        * storage/indexeddb/modern/resources/cursor-7.js:
+        * storage/indexeddb/modern/resources/cursor-8.js:
+        * storage/indexeddb/modern/resources/date-basic.js:
+        * storage/indexeddb/modern/resources/deletedatabase-1.js:
+        * storage/indexeddb/modern/resources/deletedatabase-2.js:
+        * storage/indexeddb/modern/resources/deletedatabase-null-name-exception.js:
+        * storage/indexeddb/modern/resources/deletedatabase-request-event.js:
+        * storage/indexeddb/modern/resources/deletedatabase-request.js:
+        * storage/indexeddb/modern/resources/deleteindex-1.js:
+        * storage/indexeddb/modern/resources/deleteindex-2.js:
+        * storage/indexeddb/modern/resources/deleteobjectstore-1.js:
+        * storage/indexeddb/modern/resources/double-abort.js:
+        * storage/indexeddb/modern/resources/double-open.js:
+        * storage/indexeddb/modern/resources/get-index-failures.js:
+        * storage/indexeddb/modern/resources/get-keyrange.js:
+        * storage/indexeddb/modern/resources/idbdatabase-deleteobjectstore-failures.js:
+        * storage/indexeddb/modern/resources/idbdatabase-transaction-failures.js:
+        * storage/indexeddb/modern/resources/idbindex-properties-basic.js:
+        * storage/indexeddb/modern/resources/idbobjectstore-clear-1.js:
+        * storage/indexeddb/modern/resources/idbobjectstore-clear-2.js:
+        * storage/indexeddb/modern/resources/idbobjectstore-count-1.js:
+        * storage/indexeddb/modern/resources/idbobjectstore-count-failures.js:
+        * storage/indexeddb/modern/resources/idbobjectstore-delete-1.js:
+        * storage/indexeddb/modern/resources/idbobjectstore-delete-2.js:
+        * storage/indexeddb/modern/resources/idbobjectstore-delete-failures.js:
+        * storage/indexeddb/modern/resources/idbobjectstore-get-failures.js:
+        * storage/indexeddb/modern/resources/idbobjectstore-put-and-clear-failures.js:
+        * storage/indexeddb/modern/resources/idbtransaction-objectstore-failures.js:
+        * storage/indexeddb/modern/resources/index-1.js:
+        * storage/indexeddb/modern/resources/index-2.js:
+        * storage/indexeddb/modern/resources/index-3.js:
+        * storage/indexeddb/modern/resources/index-4.js:
+        * storage/indexeddb/modern/resources/index-5.js:
+        * storage/indexeddb/modern/resources/index-cursor-1.js:
+        * storage/indexeddb/modern/resources/index-cursor-2.js:
+        * storage/indexeddb/modern/resources/index-cursor-3.js:
+        * storage/indexeddb/modern/resources/index-get-count-basic.js:
+        * storage/indexeddb/modern/resources/index-get-count-failures.js:
+        * storage/indexeddb/modern/resources/keypath-basic.js:
+        * storage/indexeddb/modern/resources/objectstore-attributes.js:
+        * storage/indexeddb/modern/resources/objectstore-cursor-advance-failures.js:
+        * storage/indexeddb/modern/resources/objectstore-cursor-continue-failures.js:
+        * storage/indexeddb/modern/resources/opencursor-failures.js:
+        * storage/indexeddb/modern/resources/opendatabase-request-event.js:
+        * storage/indexeddb/modern/resources/opendatabase-request.js:
+        * storage/indexeddb/modern/resources/opendatabase-success-after-versionchange.js:
+        * storage/indexeddb/modern/resources/opendatabase-versions.js:
+        * storage/indexeddb/modern/resources/request-readystate.js:
+        * storage/indexeddb/modern/resources/transaction-scheduler-1.js:
+        * storage/indexeddb/modern/resources/transaction-scheduler-2.js:
+        * storage/indexeddb/modern/resources/transaction-scheduler-3.js:
+        * storage/indexeddb/modern/resources/transaction-scheduler-5.js:
+        * storage/indexeddb/modern/resources/transaction-scheduler-6.js:
+        * storage/indexeddb/modern/resources/versionchange-abort-then-reopen.js:
+        * storage/indexeddb/modern/resources/versionchange-event.js:
+        * storage/indexeddb/modern/transaction-scheduler-1-expected.txt:
+        * storage/indexeddb/modern/transaction-scheduler-2-expected.txt:
+        * storage/indexeddb/modern/transaction-scheduler-3-expected.txt:
+        * storage/indexeddb/modern/transaction-scheduler-5-expected.txt:
+        * storage/indexeddb/modern/transaction-scheduler-6-expected.txt:
+        * storage/indexeddb/modern/versionchange-abort-then-reopen-expected.txt:
+        * storage/indexeddb/modern/versionchange-event-expected.txt:
+
 2016-01-20  Saam barati  <sbarati@apple.com>
 
         Web Inspector: Hook the sampling profiler into the Timelines UI
index 660384a..052bd84 100644 (file)
@@ -3,6 +3,10 @@ This test makes sure that un-handled requests in a transaction receive onerror c
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Error handling: "objectStore.put({ bar: 'A' }, 1);" (error)
 Error handling: "objectStore.put({ bar: 'B' }, 2);" (error)
index 434e970..edd4b3c 100644 (file)
@@ -3,6 +3,10 @@ This test creates some object stores, putting some values in them, committing th
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 First upgrade needed: Old version - 0 New version - 1
 [object IDBTransaction] - versionchange
 [object IDBDatabase]
index 5a4a9c4..98ab13a 100644 (file)
@@ -3,6 +3,10 @@ This test creates a new database with an objectstore that autoincrements. It the
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Initial upgrade versionchange transaction complete
 Opening readwrite transaction to bump the key generator, but it will be aborted
index bf2221c..ac57179 100644 (file)
@@ -3,6 +3,10 @@ This test does basic testing of IDBObjectStore.add(), making sure that an attemp
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Upgrade needed: Old version - 0 New version - 1
 [object IDBTransaction] - versionchange
 [object IDBDatabase]
index c658c7f..3450b69 100644 (file)
@@ -1,3 +1,7 @@
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Upgrade needed: Old version - 0 New version - 1
 [object IDBTransaction] - versionchange
 [object IDBDatabase]
index 7d41d7f..6c70cd6 100644 (file)
@@ -3,6 +3,10 @@ This tests some obvious failures that can happen while calling IDBObjectStore.cr
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Failed to create index with null name
 Failed to create index with invalid key path
index 596d259..806f77e 100644 (file)
@@ -3,6 +3,10 @@ This test starts some version change transactions, creates some object stores, a
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Object store names:
 FirstAbortedObjectStore
index 78a4770..a0290eb 100644 (file)
@@ -3,6 +3,10 @@ This test exercises the obvious ways that IDBDatabase.createObjectStore can fail
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Failed to create object store with both autoincrement and an empty keypath: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.
 Object store names:
index f938aa1..97b9cdb 100644 (file)
@@ -3,6 +3,10 @@ This tests basic IDBCursor functionality
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Success opening cursor
 Cursor is: [object IDBCursorWithValue]
index 98cf577..915f39e 100644 (file)
@@ -3,6 +3,10 @@ This test checks basic functionality walking a "next" and "prev" cursor on an ob
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Success iterating next cursor
 Cursor is: [object IDBCursorWithValue]
index 5500fc5..67d72d2 100644 (file)
@@ -3,6 +3,10 @@ This test various uses of advance() and continue() on a "next" cursor.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Success iterating cursor
 Cursor is: [object IDBCursorWithValue]
index 7ead92b..48275a0 100644 (file)
@@ -3,6 +3,10 @@ This test various uses of advance() and continue() on a "prev" cursor.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Success iterating cursor
 Cursor is: [object IDBCursorWithValue]
index 89efd3f..3ebabc1 100644 (file)
@@ -3,6 +3,10 @@ This tests iterating a "next" cursor in a read-write transaction while changing
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Cursor open at key 0
 Record 0 deleted, even though that's where the cursor currently points.
index 0849cd7..250c2b8 100644 (file)
@@ -3,6 +3,10 @@ This tests iterating a "prev" cursor in a read-write transaction while changing
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Cursor open at key 2
 Record 2 deleted, even though that's where the cursor currently points.
index 28eb11e..e8aa2be 100644 (file)
@@ -3,6 +3,10 @@ This tests iterating a "next" cursor in a read-write transaction combined with c
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Cursor open at key 0
 Object store cleared.
index d6ac5c2..3b5cd64 100644 (file)
@@ -3,6 +3,10 @@ This tests iterating a "prev" cursor in a read-write transaction while changing
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Cursor open at key 2
 Object store cleared.
index 87210c9..6397b89 100644 (file)
@@ -3,6 +3,10 @@ This tests using Date objects as keys and values.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Initial upgrade versionchange transaction complete
 Success getting key 'Fri Nov 04 1955 17:00:00 GMT-0700 (PDT)' of type object, result is 'Flux capacitor' of type string
index e611894..c58b6b9 100644 (file)
@@ -3,6 +3,10 @@ This tests that if deleteDatabase is called while there is already an open conne
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade old version - 0 new version - 1
 Version change complete
 Requesting deleteDatabase
index b92c73f..62427c7 100644 (file)
@@ -3,6 +3,10 @@ This tests that if deleteDatabase is called while there is already an open conne
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade old version - 0 new version - 1
 Requesting deleteDatabase
 First connection received versionchange event: oldVersion 1, newVersion null
index 4c02a88..a42d45d 100644 (file)
@@ -3,6 +3,10 @@ This tests deleting an index and then committing the transaction.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Count is: 2
 Cursor at record: A / 1
index 9919a81..57a3d13 100644 (file)
@@ -3,6 +3,10 @@ This tests deleting an index and then aborting the transaction.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Count is: 2
 Cursor at record: A / 1
index 6e53fe8..0c98d31 100644 (file)
@@ -3,6 +3,10 @@ This test creates an object store then populates it, then commits that transacti
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Initial upgrade versionchange transaction complete
 Second upgrade needed: Old version - 1 New version - 2
index 325ab06..1b162b2 100644 (file)
@@ -3,6 +3,10 @@ This test aborts the same transaction twice, making the appropriate exception is
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Second abort failed: Error: Failed to execute 'abort' on 'IDBTransaction': The transaction is inactive or finished.
 Initial upgrade versionchange transaction aborted
index f35a0bb..c9f5a0c 100644 (file)
@@ -3,6 +3,10 @@ This tests some obvious failures that can happen while calling IDBObjectStore.in
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Initial upgrade versionchange transaction complete
 Got an index as expected: [object IDBIndex]
index b5b7724..6714036 100644 (file)
@@ -3,6 +3,10 @@ This test exercises IDBObjectStore.get() with an IDBKeyRange as the parameter.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Initial upgrade versionchange transaction complete
 Success getting keyRange [-1 (Closed), undefined (Open)]
index cf3af1f..102325b 100644 (file)
@@ -3,6 +3,10 @@ This tests some obvious failures that can happen while calling IDBDatabase.delet
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Initial upgrade versionchange transaction complete
 readwrite put success - about to try to delete an objectstore
index 77fd498..6456220 100644 (file)
@@ -3,6 +3,10 @@ This tests some obvious failures that can happen while calling IDBDatabase.trans
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Upgrade needed: Old version - 0 New version - 1
 Failed to start a transaction while a versionChange transaction was in progress - Error: Failed to execute 'transaction' on 'IDBDatabase': A version change transaction is running.
 versionchange transaction completed
index 5afd159..c37b558 100644 (file)
@@ -3,6 +3,10 @@ This tests getting basic properties on an IDBIndex.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 TestIndex1
 [object IDBObjectStore]
index 6a163c6..8435648 100644 (file)
@@ -3,6 +3,10 @@ This test creates an object store then populates it. It then clears it and makes
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Initial upgrade versionchange transaction complete
 Success opening database connection - Starting readwrite transaction
index 8cf9a8a..dd356ab 100644 (file)
@@ -3,6 +3,10 @@ This test creates an object store then populates it, then commits that transacti
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Initial upgrade versionchange transaction complete
 Success opening database connection - Starting readwrite transaction
index b9d27a6..2954301 100644 (file)
@@ -3,6 +3,10 @@ This test exercises various uses of IDBObjectStore.count()
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Count is: 1
 Count is: 0
index aed372e..72bfc47 100644 (file)
@@ -3,6 +3,10 @@ This tests some obvious failures that can happen while calling IDBObjectStore.co
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Failed to count records in object store with an invalid key
 Failed to count records in object store that's been deleted
index 1c18f30..f491d7d 100644 (file)
@@ -3,6 +3,10 @@ This test exercises various uses of IDBObjectStore.delete()
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Count is 113
 Initial upgrade versionchange transaction complete
index 671118d..8eb85b1 100644 (file)
@@ -3,6 +3,10 @@ This test exercises IDBObjectStore.delete() followed by an abort to make sure th
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Initial upgrade versionchange transaction complete
 After delete, record for "foo" has value: undefined
index 16d6a52..a0c42d1 100644 (file)
@@ -3,6 +3,10 @@ This tests some obvious failures that can happen while calling IDBObjectStore.de
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Failed to delete record from object store with an invalid key
 Failed to delete record from object store that has been deleted
index d2ebb00..6deaafb 100644 (file)
@@ -3,6 +3,10 @@ This tests some obvious failures that can happen while calling IDBObjectStore.ge
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Failed to get record from object store with an invalid key
 Failed to get record from object store that has been deleted
index e05eec6..dd3b76d 100644 (file)
@@ -3,6 +3,10 @@ This tests some obvious failures that can happen while calling IDBObjectStore.pu
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Failed to put record into object store with an invalid key
 Failed to put record into object store that has been deleted
index 8b01359..edde57c 100644 (file)
@@ -3,6 +3,10 @@ This tests some obvious failures that can happen while calling transaction.objec
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Upgrade needed: Old version - 0 New version - 1
 [object IDBTransaction] - versionchange
 [object IDBDatabase]
index 6d6f3bc..1fed99f 100644 (file)
@@ -3,6 +3,10 @@ This tests the expected values from some more complex index situations.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 get "good" result is: [object Object]
 bar is good
index 59830dc..62d4f4d 100644 (file)
@@ -3,6 +3,10 @@ This tests indexes are left in appropriate states after aborted transactions.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 get "good" result is: [object Object]
 bar is good
index 3e3777a..8457b7f 100644 (file)
@@ -3,6 +3,10 @@ This test exercises the "unique" constraint of indexes.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 First put success
 Value of 1 is: [object Object]
index a160dbd..dc38e22 100644 (file)
@@ -3,6 +3,10 @@ This tests that indexes added to an object store with existing records are popul
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Count is: 18
 Cursor at record: A / 1
index 9707e65..5fbd548 100644 (file)
@@ -3,6 +3,10 @@ This tests creating an index on an object store that already has records, and th
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Error getting cursor count
 Error opening or iterating cursor
index 8e1b826..b1b6f20 100644 (file)
@@ -3,6 +3,10 @@ This tests cursors that iterate over entire indexes.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 
 Starting a new cursor: testCursorDirection(index1, 'next')
index 0240cb0..77f18a4 100644 (file)
@@ -3,6 +3,10 @@ This tests cursors that iterate over parts of indexes.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 
 Starting a new cursor: testCursorDirection('next', IDBKeyRange.bound('B', 'D', true, true))
index 6e752ba..c8ffd24 100644 (file)
@@ -3,6 +3,10 @@ This tests that index cursors properly handle changing indexes.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Starting a new cursor: testCursorDirection(index, 'next')
 TestIndex1 count is: 18
index 345faaa..49f7d24 100644 (file)
@@ -3,6 +3,10 @@ This tests the most basic operation of the IDBIndex methods get(), getKey(), and
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 get result is: [object Object]
 bar is good
index fa191bb..1fc0dc5 100644 (file)
@@ -3,6 +3,10 @@ This tests some obvious failures that can happen while calling the IDBIndex meth
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Failed to get with a null key
 Failed to getKey with a null key
index bf97fb4..4a9ae31 100644 (file)
@@ -3,6 +3,10 @@ This test creates some object stores with keypaths. It then puts some values in
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 object put SUCCESS - foo1
 array put SUCCESS - foo2
index c0f8249..3becfb8 100644 (file)
@@ -3,6 +3,10 @@ This test exercises the readonly attributes on an IDBObjectStore.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 First upgrade needed: Old version - 0 New version - 1
 [object IDBTransaction] - versionchange
 [object IDBDatabase]
index 824b0a7..ccba7a6 100644 (file)
@@ -3,6 +3,10 @@ This tests some obvious failures that can happen while calling IDBCursor.advance
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Failed to advance object store cursor with undefined count argument
 Failed to advance object store cursor with '0' count argument
index d0625d8..47bb8f7 100644 (file)
@@ -3,6 +3,10 @@ This tests some obvious failures that can happen while calling IDBCursor.continu
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Failed to continue a 'next' object store cursor to a key less than the current key
 Failed to continue object store cursor with invalid key
index b681d0d..cdf1417 100644 (file)
@@ -3,6 +3,10 @@ This tests some obvious failures that can happen while opening cursors.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Failed to open object store cursor with invalid keypath
 Failed to open object store cursor with invalid direction
index 3c5546d..dbf307d 100644 (file)
@@ -3,6 +3,10 @@ This test verifies that: - Opening a new database results in the onupgradeneeded
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 upgradeneeded: old version - 0 new version - 1
 [object IDBTransaction]
 Version change complete
index c907f92..e0d9ed9 100644 (file)
@@ -3,7 +3,10 @@ This test creates a new database with the default version, commits that versionc
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-[object IDBOpenDBRequest] (firstPhase)
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 upgradeneeded (firstPhase): old version - 0 new version - 1
 [object IDBTransaction]
 Version change complete (firstPhase). Database version is now - 1
index 3ea975a..77952fe 100644 (file)
@@ -1,9 +1,7 @@
 description("This test makes sure that un-handled requests in a transaction receive onerror callbacks when the transaction is aborted.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -32,45 +30,44 @@ function setupRequest(code)
     }   
 }
 
-startTest();
+var dbname;
 
-function startTest() {
-    var createRequest = window.indexedDB.open("AbortRequestsCancelledDatabase", 1);
-    createRequest.onupgradeneeded = function(event) {
-        debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
+function prepareDatabase(event) {
+    debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-        var versionTransaction = createRequest.transaction;
-        var database = event.target.result;
-        objectStore = database.createObjectStore("TestObjectStore");
-        setupRequest("objectStore.put({ bar: 'A' }, 1);");
-        setupRequest("objectStore.put({ bar: 'B' }, 2);");
-        setupRequest("objectStore.put({ bar: 'C' }, 3);");
+    var versionTransaction = event.target.transaction;
+    var database = event.target.result;
+    event.target.onerror = null;
+    dbname = database.name;
+    objectStore = database.createObjectStore("TestObjectStore");
+    setupRequest("objectStore.put({ bar: 'A' }, 1);");
+    setupRequest("objectStore.put({ bar: 'B' }, 2);");
+    setupRequest("objectStore.put({ bar: 'C' }, 3);");
 
-        versionTransaction.abort();
+    versionTransaction.abort();
 
-        versionTransaction.onabort = function(event) {
-            debug("Initial upgrade versionchange transaction aborted");
-            database.close();
-            continueTest1();
-        }
+    versionTransaction.onabort = function(event) {
+        debug("Initial upgrade versionchange transaction aborted");
+        database.close();
+        continueTest1();
+    }
 
-        versionTransaction.oncomplete = function(event) {
-            debug("Initial upgrade versionchange transaction unexpected complete");
-            done();
-        }
+    versionTransaction.oncomplete = function(event) {
+        debug("Initial upgrade versionchange transaction unexpected complete");
+        done();
+    }
 
-        versionTransaction.onerror = function(event) {
-            debug("Initial upgrade versionchange transaction error " + event);
-        }
+    versionTransaction.onerror = function(event) {
+        debug("Initial upgrade versionchange transaction error " + event);
     }
 }
 
 function continueTest1() {
-    var createRequest = window.indexedDB.open("AbortRequestsCancelledDatabase", 1);
+    var createRequest = window.indexedDB.open(dbname, 1);
     createRequest.onupgradeneeded = function(event) {
         debug("Second upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-        var versionTransaction = createRequest.transaction;
+        var versionTransaction = event.target.transaction;
         database = event.target.result;
         objectStore = database.createObjectStore("TestObjectStore");
     
index df09171..7bd661d 100644 (file)
@@ -2,24 +2,24 @@ description("This test creates some object stores, putting some values in them,
 In a new transaction, it then overwrites those values, but then aborts the transaction. \
 Finally it verifies everything is set up from the first transaction, and nothing from the aborted one committed.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
 
-var request = window.indexedDB.open("AbortedPutTestDatabase");
 
 function done()
 {
     finishJSTest();
 }
 
-request.onupgradeneeded = function(event)
+var dbname;
+
+function prepareDatabase(event)
 {
     debug("First upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
     
-    var tx = request.transaction;
+    event.target.onerror = null;
+    var tx = event.target.transaction;
     var db = event.target.result;
+    dbname = db.name;
 
     debug(tx + " - " + tx.mode);
     debug(db);
@@ -77,7 +77,7 @@ request.onupgradeneeded = function(event)
 
 function continueTest1()
 {
-    var request = window.indexedDB.open("AbortedPutTestDatabase", 2);
+    var request = window.indexedDB.open(dbname, 2);
 
     request.onupgradeneeded = function(event) {
         debug("Second upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
@@ -146,7 +146,7 @@ function continueTest1()
 
 function continueTest2()
 {
-    var request = window.indexedDB.open("AbortedPutTestDatabase", 2);
+    var request = window.indexedDB.open(dbname, 2);
 
     request.onupgradeneeded = function(event) {
         debug("Third upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
index f1d2b50..594b9fd 100644 (file)
@@ -3,25 +3,21 @@ It then puts some things in that object store, checking the keys that were used.
 But it then aborts that transaction. \
 Then it opens a new one and puts something in it, double checking that the key generator was reverted when the above transaction was aborted.");
 
+indexedDBTest(prepareDatabase);
 
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("AutoincrementAbortDatabase", 1);
 var database;
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     var objectStore = database.createObjectStore('TestObjectStore', { autoIncrement: true });
     
index 6abc7c2..4225c0b 100644 (file)
@@ -1,21 +1,18 @@
 description("This test does basic testing of IDBObjectStore.add(), making sure that an attempt to overwrite an already-existing key fails with the appropriate error.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
 
-var request = window.indexedDB.open("NewDatabaseAddTestDatabase");
 
 function done()
 {
     finishJSTest();
 }
 
-request.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
     
-    var tx = request.transaction;
+    var tx = event.target.transaction;
     var db = event.target.result;
 
     debug(tx + " - " + tx.mode);
index 03b61c9..5ac7df2 100644 (file)
@@ -1,20 +1,17 @@
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
 
-var request = window.indexedDB.open("NewDatabasePutTestDatabase");
 
 function done()
 {
     finishJSTest();
 }
 
-request.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
     
-    var tx = request.transaction;
+    var tx = event.target.transaction;
     var db = event.target.result;
 
     debug(tx + " - " + tx.mode);
index 19ef45e..0099c50 100644 (file)
@@ -1,9 +1,7 @@
 description("This tests some obvious failures that can happen while calling IDBObjectStore.createIndex().");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -15,13 +13,13 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("IDBObjectStoreCreateIndexFailuresDatabase", 1);
 var database;
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
 
index dd562ed..a1d40b1 100644 (file)
@@ -1,10 +1,8 @@
 description("This test starts some version change transactions, creates some object stores, and variably commits or aborts the version change transactions. \
 At various stages it verifies the object stores in the database are as-expected.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -19,13 +17,16 @@ function dumpObjectStores(database) {
     }
 }
 
-var createRequest = window.indexedDB.open("CreateObjectStoreTestDatabase", 1);
-
-createRequest.onupgradeneeded = function(event) {
+var dbname;
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    event.target.onerror = null;
+
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
+    dbname = database.name;
     var objectStore = database.createObjectStore("FirstAbortedObjectStore");
     var request = objectStore.put("foo", "bar");
 
@@ -59,12 +60,12 @@ createRequest.onupgradeneeded = function(event) {
 
 function continueTest1()
 {
-    createRequest = window.indexedDB.open("CreateObjectStoreTestDatabase", 1);
+    createRequest = window.indexedDB.open(dbname, 1);
 
     createRequest.onupgradeneeded = function(event) {
         debug("Second upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-        var versionTransaction = createRequest.transaction;
+        var versionTransaction = event.target.transaction;
         var database = event.target.result;
         dumpObjectStores(database);
         var objectStore = database.createObjectStore("FirstCommittedObjectStore");
@@ -90,12 +91,12 @@ function continueTest1()
 
 function continueTest2()
 {
-    createRequest = window.indexedDB.open("CreateObjectStoreTestDatabase", 2);
+    createRequest = window.indexedDB.open(dbname, 2);
 
     createRequest.onupgradeneeded = function(event) {
         debug("Third upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-        var versionTransaction = createRequest.transaction;
+        var versionTransaction = event.target.transaction;
         var database = event.target.result;
         var objectStore = database.createObjectStore("SecondCommittedObjectStore");
 
@@ -122,7 +123,7 @@ function continueTest2()
 
 function continueTest3()
 {
-    createRequest = window.indexedDB.open("CreateObjectStoreTestDatabase", 3);
+    createRequest = window.indexedDB.open(dbname, 3);
 
     createRequest.onupgradeneeded = function(event) {
         debug("Fourth upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
index 5450064..32ce4af 100644 (file)
@@ -1,9 +1,7 @@
 description("This test exercises the obvious ways that IDBDatabase.createObjectStore can fail.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -18,14 +16,14 @@ function dumpObjectStores(database) {
     }
 }
 
-var createRequest = window.indexedDB.open("CreateObjectStoreFailuresTestDatabase", 1);
 var database;
 var versionTransaction;
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    versionTransaction = createRequest.transaction;
+    versionTransaction = event.target.transaction;
     database = event.target.result;
 
     try {
index 3802aff..112a7c2 100644 (file)
@@ -1,9 +1,7 @@
 description("This tests basic IDBCursor functionality");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -15,8 +13,6 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("Cursor1Database", 1);
-
 function logCursor(cursor)
 {
     debug("Cursor is: " + cursor);
@@ -54,10 +50,11 @@ function testCursorDirection(direction)
     setupRequest(request);
 }
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
     objectStore = database.createObjectStore("TestObjectStore");
     index = objectStore.createIndex("TestIndex1", "bar");
index c64aefa..4b88913 100644 (file)
@@ -1,9 +1,7 @@
 description("This test checks basic functionality walking a \"next\" and \"prev\" cursor on an object store with some records.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -15,8 +13,6 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("Cursor2Database", 1);
-
 function logCursor(cursor)
 {
     debug("Cursor is: " + cursor);
@@ -51,10 +47,11 @@ function setupRequest(request)
     } 
 }
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
     objectStore = database.createObjectStore("TestObjectStore");
 
index 7c6bad1..5c29ac3 100644 (file)
@@ -1,9 +1,7 @@
 description("This test various uses of advance() and continue() on a \"next\" cursor.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -15,8 +13,6 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("Cursor3Database", 1);
-
 function logCursor(cursor)
 {
     debug("Cursor is: " + cursor);
@@ -61,10 +57,11 @@ function setupRequest2(request)
     } 
 }
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
     objectStore = database.createObjectStore("TestObjectStore");
 
index 606f29e..73426d9 100644 (file)
@@ -1,9 +1,7 @@
 description("This test various uses of advance() and continue() on a \"prev\" cursor.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -15,8 +13,6 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("Cursor4Database", 1);
-
 function logCursor(cursor)
 {
     debug("Cursor is: " + cursor);
@@ -61,10 +57,11 @@ function setupRequest2(request)
     } 
 }
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
     objectStore = database.createObjectStore("TestObjectStore");
 
index 2c78bc8..b49638d 100644 (file)
@@ -1,9 +1,7 @@
 description("This tests iterating a \"next\" cursor in a read-write transaction while changing records.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -15,12 +13,11 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("Cursor5Database", 1);
-
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
 
index ec03dc4..f6b76d0 100644 (file)
@@ -1,9 +1,7 @@
 description("This tests iterating a \"prev\" cursor in a read-write transaction while changing records.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -15,12 +13,11 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("Cursor6Database", 1);
-
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
 
index 60951e7..6c719e4 100644 (file)
@@ -1,9 +1,7 @@
 description("This tests iterating a \"next\" cursor in a read-write transaction combined with clearing the object store.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -15,12 +13,11 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("Cursor7Database", 1);
-
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
 
index 50465e5..6c3bc4f 100644 (file)
@@ -1,9 +1,7 @@
 description("This tests iterating a \"prev\" cursor in a read-write transaction while changing records.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -15,12 +13,11 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("Cursor8Database", 1);
-
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
 
index dec0b95..0b795a5 100644 (file)
@@ -1,26 +1,24 @@
 description("This tests using Date objects as keys and values.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("DateBasicDatabase", 1);
 var database;
 
 var date1 = new Date("1955-11-05T00:00:00");
 var date2 = new Date("1955-11-12T18:00:00");
 var date3 = new Date("2015-10-21T16:00:00");
     
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
 
index 1fd071a..3e50009 100644 (file)
@@ -1,9 +1,7 @@
 description("This tests that if deleteDatabase is called while there is already an open connection to the database that the open connection gets the appropriate versionChange event.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase, openSuccess);
+
 
 function done()
 {
@@ -15,27 +13,22 @@ function log(message)
     debug(message);
 }
 
-var request = window.indexedDB.open("DeleteDatabase1TestDatabase");
-request.onsuccess = function()
-{
+function openSuccess() {
     debug("open db success");
 }
-request.onerror = function(e)
-{
-    debug("Unexpected error");
-       done();
-}
 
-request.onupgradeneeded = function(e)
+var dbname;
+function prepareDatabase(e)
 {
     debug("Initial upgrade old version - " + e.oldVersion + " new version - " + e.newVersion);
     
-    var versionTransaction = request.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
+    dbname = database.name;
     var objectStore = database.createObjectStore("TestObjectStore");
     objectStore.put("This is a record", 1);
         
-    request.transaction.oncomplete = function()
+    event.target.transaction.oncomplete = function()
     {
         debug("Version change complete");
         database.onversionchange = function(e)
@@ -45,12 +38,12 @@ request.onupgradeneeded = function(e)
         }
         continueTest1();
     }
-    request.transaction.onabort = function()
+    event.target.transaction.onabort = function()
     {
         debug("Version change unexpected abort");
         done();
     }
-    request.transaction.onerror = function()
+    event.target.transaction.onerror = function()
     {
         debug("Version change unexpected error");
         done();
@@ -60,7 +53,7 @@ request.onupgradeneeded = function(e)
 function continueTest1()
 {
     debug("Requesting deleteDatabase");
-    var request = window.indexedDB.deleteDatabase("DeleteDatabase1TestDatabase");
+    var request = window.indexedDB.deleteDatabase(dbname);
     request.onsuccess = function(e)
     {
         debug("Delete database success: oldVersion " + e.oldVersion + ", newVersion " + e.newVersion);
@@ -81,7 +74,7 @@ function continueTest1()
 function continueTest2()
 {
     debug("Recreating database to make sure it's new and empty");
-    var request = window.indexedDB.open("DeleteDatabase1TestDatabase");
+    var request = window.indexedDB.open(dbname);
 
     request.onupgradeneeded = function(e)
     {
index a52622e..377859d 100644 (file)
@@ -1,10 +1,7 @@
 description("This tests that if deleteDatabase is called while there is already an open connection to the database that the open connection gets the appropriate versionChange event. \
 That open connection also has an in-progress transaction at the time it gets the versionChange event.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase, successCallback);
 
 function done()
 {
@@ -18,22 +15,23 @@ function log(message)
 
 var stopSpinning = false;
 
-var request = window.indexedDB.open("DeleteDatabase2TestDatabase");
-request.onsuccess = function()
+function successCallback()
 {
     debug("open db success");
 }
-request.onerror = function(e)
-{
-    debug("Open request error: " + request.error.name);
-}
 
-request.onupgradeneeded = function(e)
+var dbname;
+function prepareDatabase(e)
 {
     debug("Initial upgrade old version - " + e.oldVersion + " new version - " + e.newVersion);
     
-    var versionTransaction = request.transaction;
+    event.target.onerror = function(e) {
+        debug("Open request error: " + event.target.error.name);
+    }
+
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
+    dbname = database.name;
     var objectStore = database.createObjectStore("TestObjectStore");
     objectStore.put("This is a record", 1);
     
@@ -55,17 +53,17 @@ request.onupgradeneeded = function(e)
         window.setTimeout(shutErDown, 0);
     }
         
-    request.transaction.oncomplete = function()
+    event.target.transaction.oncomplete = function()
     {
         debug("First version change complete");
     }
     
-    request.transaction.onabort = function()
+    event.target.transaction.onabort = function()
     {
         debug("Version change unexpected abort");
         done();
     }
-    request.transaction.onerror = function()
+    event.target.transaction.onerror = function()
     {
         debug("Version change unexpected error");
         done();
@@ -77,7 +75,7 @@ request.onupgradeneeded = function(e)
 function continueTest1()
 {
     debug("Requesting deleteDatabase");
-    var request = window.indexedDB.deleteDatabase("DeleteDatabase2TestDatabase");
+    var request = window.indexedDB.deleteDatabase(dbname);
     request.onsuccess = function(e)
     {
         debug("Delete database success: oldVersion " + e.oldVersion + ", newVersion " + e.newVersion);
@@ -98,7 +96,7 @@ function continueTest1()
 function continueTest2()
 {
     debug("Recreating database to make sure it's new and empty");
-    var request = window.indexedDB.open("DeleteDatabase2TestDatabase");
+    var request = window.indexedDB.open(dbname);
 
     request.onupgradeneeded = function(e)
     {
index 7b3f727..95ae93a 100644 (file)
@@ -1,9 +1,5 @@
 description("This test calls deleteDatabase on window.indexedDB with a null database name, making sure there is an exception.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
 
 function done()
 {
index 4fb6f9f..23b8dbc 100644 (file)
@@ -1,9 +1,5 @@
 description("This test calls deleteDatabase on window.indexedDB and verifies that an event is fired at the request.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
 
 function done()
 {
index 2c7e489..c44192a 100644 (file)
@@ -1,9 +1,5 @@
 description("This test calls deleteDatabase on window.indexedDB and verifies that an IDBOpenDBRequest object is returned.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
 
 function done()
 {
index 8b871ba..056f4e5 100644 (file)
@@ -1,9 +1,7 @@
 description("This tests deleting an index and then committing the transaction.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -45,11 +43,11 @@ function checkIndexValues()
     } 
 }
 
-var createRequest = window.indexedDB.open("DeleteIndex1Database", 1);
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     objectStore = database.createObjectStore("TestObjectStore");
     objectStore.put({ bar: "A" }, 1);
index 0e9b32e..82d51a5 100644 (file)
@@ -1,9 +1,7 @@
 description("This tests deleting an index and then aborting the transaction.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -42,12 +40,15 @@ function checkIndexValues()
     } 
 }
 
-var createRequest = window.indexedDB.open("DeleteIndex2Database", 1);
-createRequest.onupgradeneeded = function(event) {
+var dbname;
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    event.target.onerror = null;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
+    dbname = database.name;
     objectStore = database.createObjectStore("TestObjectStore");
     objectStore.put({ bar: "A" }, 1);
     objectStore.put({ bar: "A" }, 2);
@@ -74,12 +75,12 @@ createRequest.onupgradeneeded = function(event) {
 }
 
 function continueTest1() {
-    var createRequest = window.indexedDB.open("DeleteIndex2Database", 2);
+    var createRequest = window.indexedDB.open(dbname, 2);
     createRequest.onupgradeneeded = function(event) {
         debug("Second upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
         database = event.target.result;
-        var versionTransaction = createRequest.transaction;
+        var versionTransaction = event.target.transaction;
         objectStore = versionTransaction.objectStore("TestObjectStore");
         objectStore.deleteIndex("TestIndex1");
         debug("Deleted the index");
@@ -104,11 +105,11 @@ function continueTest1() {
 }
 
 function continueTest2() {
-    var createRequest = window.indexedDB.open("DeleteIndex2Database", 3);
+    var createRequest = window.indexedDB.open(dbname, 3);
     createRequest.onupgradeneeded = function(event) {
         debug("Third upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-        var versionTransaction = createRequest.transaction;
+        var versionTransaction = event.target.transaction;
         objectStore = versionTransaction.objectStore("TestObjectStore");
         index = objectStore.index("TestIndex1");
     
index 24f50e1..d28a18c 100644 (file)
@@ -2,23 +2,23 @@ description("This test creates an object store then populates it, then commits t
 It then deletes it, but aborts that transaction. \
 Finally it checks to make sure everything from step 1 is there as expected.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("DeleteObjectStore1Database", 1);
-
-createRequest.onupgradeneeded = function(event) {
+var dbname;
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    event.target.onerror = null;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
+    dbname = database.name;
     var objectStore = database.createObjectStore("TestObjectStore");
     for (var i = 0; i < 10; ++i)
         objectStore.put("AH AH AH AH AH", i + " puts");
@@ -46,7 +46,7 @@ function getChecker(event) {
 
 function continueTest1()
 {
-    var openRequest = window.indexedDB.open("DeleteObjectStore1Database", 2);
+    var openRequest = window.indexedDB.open(dbname, 2);
 
     openRequest.onerror = function(event) {
         debug("Request error - " + event);
@@ -90,7 +90,7 @@ function continueTest1()
 
 function continueTest2()
 {
-    var openRequest = window.indexedDB.open("DeleteObjectStore1Database", 1);
+    var openRequest = window.indexedDB.open(dbname, 1);
 
     openRequest.onerror = function(event) {
         debug("Request unexpected error - " + event);
index 87eb787..24fe1dc 100644 (file)
@@ -1,21 +1,18 @@
 description("This test aborts the same transaction twice, making the appropriate exception is thrown.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("DoubleAbortTestDatabase", 1);
-
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
 
     versionTransaction.abort();
index 01d8ca3..ab24d2a 100644 (file)
@@ -15,13 +15,15 @@ if (testRunner) {
     testRunner.waitUntilDone();
 }
 
-var req1 = indexedDB.open("testDB");
+var dbname = "TestDB" + Date();
+
+var req1 = indexedDB.open(dbname);
 req1.onerror = function() {
     debug("First request unexpected error");
     done();
 }
 
-var req2 = indexedDB.open("testDB");
+var req2 = indexedDB.open(dbname);
 req2.onsuccess = function() {
     debug("Second request done");
     done();
index 318a2de..e05181a 100644 (file)
@@ -1,9 +1,7 @@
 description("This tests some obvious failures that can happen while calling IDBObjectStore.index().");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -15,14 +13,15 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("IDBObjectStoreGetIndexFailuresDatabase", 1);
 var database;
-
-createRequest.onupgradeneeded = function(event) {
+var dbname;
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
+    dbname = database.name;
     var objectStore = database.createObjectStore("TestObjectStore");
     objectStore.createIndex("TestIndex", "foo");
     
@@ -81,11 +80,11 @@ function continueTest1()
 
 function continueTest2()
 {
-    var createRequest = window.indexedDB.open("IDBObjectStoreGetIndexFailuresDatabase", 2);
+    var createRequest = window.indexedDB.open(dbname, 2);
     createRequest.onupgradeneeded = function(event) {
         debug("Second upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-        var versionTransaction = createRequest.transaction;
+        var versionTransaction = event.target.transaction;
         var database = event.target.result;
         var objectStore = versionTransaction.objectStore("TestObjectStore");
         database.deleteObjectStore("TestObjectStore");
index 94eae87..040f219 100644 (file)
@@ -1,26 +1,23 @@
 description("This test exercises IDBObjectStore.get() with an IDBKeyRange as the parameter.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("GetKeyRangeDatabase", 1);
 var database;
 
 var date1 = new Date("1955-11-05T00:00:00");
 var date2 = new Date("1955-11-12T18:00:00");
 var date3 = new Date("2015-10-21T16:00:00");
     
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event) {
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
 
index c637a4b..770ea06 100644 (file)
@@ -1,23 +1,22 @@
 description("This tests some obvious failures that can happen while calling IDBDatabase.deleteObjectStore()");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("IDBDatabaseDeleteObjectStoreFailuresDatabase", 1);
 var database;
-
-createRequest.onupgradeneeded = function(event) {
+var dbname;
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
+    dbname = database.name;
     var objectStore = database.createObjectStore("TestObjectStore");
     var request = objectStore.put("bar", "foo");
 
@@ -71,7 +70,7 @@ function continueTest1()
 
 function continueTest2()
 {
-    var openRequest = window.indexedDB.open("IDBDatabaseDeleteObjectStoreFailuresDatabase", 2);
+    var openRequest = window.indexedDB.open(dbname, 2);
 
     openRequest.onerror = function(event) {
         debug("Request unexpected error - " + event);
@@ -89,7 +88,7 @@ function continueTest2()
     openRequest.onupgradeneeded = function(event) {
         debug("Second upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
     
-        var versionTransaction = openRequest.transaction;
+        var versionTransaction = event.target.transaction;
         database = event.target.result;
 
         try {
index efa1cc4..e962fdb 100644 (file)
@@ -1,22 +1,20 @@
 description("This tests some obvious failures that can happen while calling IDBDatabase.transaction()");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("IDBDatabaseTransactionFailuresDatabase");
 var database;
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
     var request = objectStore.put("foo", "bar");
index a4d6530..13916ee 100644 (file)
@@ -1,9 +1,7 @@
 description("This tests getting basic properties on an IDBIndex.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -25,15 +23,15 @@ function logIndex(index)
     debug(index.unique);
 }
 
-var createRequest = window.indexedDB.open("IDBIndexPropertiesBasicDatabase", 1);
 var database;
 
 var indexes = new Array();
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
     
index a98d4c3..19fc51a 100644 (file)
@@ -1,23 +1,24 @@
 description("This test creates an object store then populates it. \
 It then clears it and makes sure it has nothing left in it.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("IDBObjectStoreClearDatabase", 1);
-
-createRequest.onupgradeneeded = function(event) {
+var dbname;
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    event.target.onerror = null;
+
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
+    dbname = database.name
     var objectStore = database.createObjectStore("TestObjectStore", { autoIncrement: true });
     var request = objectStore.put("bar1");
     var request = objectStore.put("bar2");
@@ -52,7 +53,7 @@ function getChecker(event) {
 
 function continueTest1()
 {
-    var openRequest = window.indexedDB.open("IDBObjectStoreClearDatabase", 1);
+    var openRequest = window.indexedDB.open(dbname, 1);
 
     openRequest.onerror = function(event) {
         debug("Request unexpected error - " + event);
index fedaf61..8dd41e0 100644 (file)
@@ -2,23 +2,24 @@ description("This test creates an object store then populates it, then commits t
 It then clears it, but aborts that transaction. \
 Finally it checks to make sure everything from step 1 is still in there.");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("IDBObjectStoreClear2Database", 1);
-
-createRequest.onupgradeneeded = function(event) {
+var dbname;
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    event.target.onerror = null;
+
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
+    dbname = database.name;
     var objectStore = database.createObjectStore("TestObjectStore", { autoIncrement: true });
     var request = objectStore.put("bar1");
     var request = objectStore.put("bar2");
@@ -53,7 +54,7 @@ function getChecker(event) {
 
 function continueTest1()
 {
-    var openRequest = window.indexedDB.open("IDBObjectStoreClear2Database", 1);
+    var openRequest = window.indexedDB.open(dbname, 1);
 
     openRequest.onerror = function(event) {
         debug("Request unexpected error - " + event);
@@ -118,7 +119,7 @@ function continueTest1()
 
 function continueTest2()
 {
-    var openRequest = window.indexedDB.open("IDBObjectStoreClear2Database", 1);
+    var openRequest = window.indexedDB.open(dbname, 1);
 
     openRequest.onerror = function(event) {
         debug("Request unexpected error - " + event);
index 8f59ed8..5334288 100644 (file)
@@ -1,16 +1,13 @@
 description("This test exercises various uses of IDBObjectStore.count()");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("IDBObjectStoreCount1Database", 1);
 var database;
 var objectStore;
 
@@ -40,10 +37,11 @@ function getCounts()
     getCount(7);    
 }
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     objectStore = database.createObjectStore("TestObjectStore");
     
index 1aa6ea3..e31c8ff 100644 (file)
@@ -1,22 +1,20 @@
 description("This tests some obvious failures that can happen while calling IDBObjectStore.count().");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("IDBObjectStoreCountFailuresDatabase", 1);
 var database;
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
     var request = objectStore.put("bar", "foo");
index 0b3e335..f5b9ade 100644 (file)
@@ -1,10 +1,7 @@
 description("This test exercises various uses of IDBObjectStore.delete()");
 
+indexedDBTest(prepareDatabase);
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
 
 function log(message)
 {
@@ -24,7 +21,6 @@ function done()
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("IDBObjectStoreDelete1Database", 1);
 var database;
 var objectStore;
 
@@ -37,10 +33,11 @@ var date6 = new Date("2000-01-02T00:00:00");
 var date7 = new Date("2000-01-03T00:00:00");
 var date8 = new Date("2000-01-04T00:00:00");
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     objectStore = database.createObjectStore("TestObjectStore");
     
index fe7276a..b685fc2 100644 (file)
@@ -1,10 +1,7 @@
 description("This test exercises IDBObjectStore.delete() followed by an abort to make sure the delete is un-done.");
 
+indexedDBTest(prepareDatabase);
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
 
 function log(message)
 {
@@ -24,13 +21,13 @@ function done()
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("IDBObjectStoreDelete2Database", 1);
 var database;
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     database.createObjectStore("TestObjectStore").put("bar", "foo");
 
index 0dcd2a9..505aec4 100644 (file)
@@ -1,10 +1,7 @@
 description("This tests some obvious failures that can happen while calling IDBObjectStore.delete().");
 
+indexedDBTest(prepareDatabase);
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
 
 function log(message)
 {
@@ -16,13 +13,13 @@ function done()
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("IDBObjectStoreDeleteFailuresDatabase", 1);
 var database;
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
     var request = objectStore.put("bar", "foo");
index 48d31fa..98218b9 100644 (file)
@@ -1,22 +1,20 @@
 description("This tests some obvious failures that can happen while calling IDBObjectStore.get().");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("IDBObjectStoreGetFailuresDatabase", 1);
 var database;
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
     var request = objectStore.put("bar", "foo");
index 652e138..81f18f4 100644 (file)
@@ -1,22 +1,20 @@
 description("This tests some obvious failures that can happen while calling IDBObjectStore.put() and IDBObjectStore.clear().");
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("IDBObjectStorePutAndClearFailuresDatabase", 1);
 var database;
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
     var request = objectStore.put("bar", "foo");
index 2be7c13..3a889f5 100644 (file)
@@ -1,23 +1,18 @@
 description("This tests some obvious failures that can happen while calling transaction.objectStore()");
 
+indexedDBTest(prepareDatabase);
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-var request = window.indexedDB.open("TransactionObjectStoreFailuresTestDatabase");
 
 function done()
 {
     finishJSTest();
 }
 
-request.onupgradeneeded = function(event)
+function prepareDatabase(event)
 {
     debug("Upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
     
-    var tx = request.transaction;
+    var tx = event.target.transaction;
     var db = event.target.result;
 
     debug(tx + " - " + tx.mode);
@@ -73,4 +68,3 @@ request.onupgradeneeded = function(event)
         done();
     }
 }
-
index 78a10d0..4799f3f 100644 (file)
@@ -1,8 +1,7 @@
 description("This tests the expected values from some more complex index situations.");
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -14,8 +13,6 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("Index1Database", 1);
-
 function checkKey(index, key)
 {
     var request1 = index.get(key);
@@ -55,10 +52,11 @@ function checkIndex(index)
     }
 }
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
     var index1 = objectStore.createIndex("TestIndex1", "bar");
index 49ad6e0..fd979e4 100644 (file)
@@ -1,8 +1,7 @@
 description("This tests indexes are left in appropriate states after aborted transactions.");
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -14,8 +13,6 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("Index2Database", 1);
-
 function checkKey(index, key)
 {
     var request1 = index.get(key);
@@ -49,10 +46,11 @@ function checkIndex(index)
 
 var database;
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
     var index1 = objectStore.createIndex("TestIndex1", "bar");
index 4e916cd..48b26fc 100644 (file)
@@ -1,8 +1,7 @@
 description("This test exercises the \"unique\" constraint of indexes.");
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -14,7 +13,6 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("Index3Database", 1);
 var objectStore;
 
 function checkObjectStore()
@@ -41,10 +39,11 @@ function checkIndex(index, name)
     }
 }
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
     objectStore = database.createObjectStore("TestObjectStore");
     var i1 = objectStore.createIndex("TestIndex1", "bar", { unique: true });
index 9263d87..1c04bf8 100644 (file)
@@ -1,8 +1,7 @@
 description("This tests that indexes added to an object store with existing records are populated upon their creation.");
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -42,11 +41,11 @@ function checkIndexValues()
     } 
 }
 
-var createRequest = window.indexedDB.open("Index4Database", 1);
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
     objectStore = database.createObjectStore("TestObjectStore");
     objectStore.put({ bar: "A" }, 1);
index f4de387..0e35a42 100644 (file)
@@ -1,8 +1,7 @@
 description("This tests creating an index on an object store that already has records, and those records would violate the unique constraint of the index. (The index creation should fail).");
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -44,11 +43,11 @@ function checkIndexValues()
     } 
 }
 
-var createRequest = window.indexedDB.open("Index5Database", 1);
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
     objectStore = database.createObjectStore("TestObjectStore");
     objectStore.put({ bar: "A" }, 1);
index 3702fd6..720d5f5 100644 (file)
@@ -1,8 +1,7 @@
 description("This tests cursors that iterate over entire indexes.");
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -75,11 +74,11 @@ function startNextCursor()
     eval(command);
 }
     
-var createRequest = window.indexedDB.open("IndexCursor1Database", 1);
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
     index1 = objectStore.createIndex("TestIndex1", "bar");
index f6f568a..c26413f 100644 (file)
@@ -1,8 +1,7 @@
 description("This tests cursors that iterate over parts of indexes.");
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -85,11 +84,11 @@ function startNextCursor()
     eval(command);
 }
     
-var createRequest = window.indexedDB.open("IndexCursor2Database", 1);
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
     index = objectStore.createIndex("TestIndex1", "bar");
index 73a3606..d0f44ec 100644 (file)
@@ -1,8 +1,7 @@
 description("This tests that index cursors properly handle changing indexes.");
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -142,11 +141,11 @@ function populateObjectStore()
     objectStore.put({ bar: "I" }, 18);  
 }
 
-var createRequest = window.indexedDB.open("IndexCursor3Database", 1);
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
     objectStore = database.createObjectStore("TestObjectStore");
     index = objectStore.createIndex("TestIndex1", "bar");
index d6d5d56..84d5eb8 100644 (file)
@@ -1,8 +1,7 @@
 description("This tests the most basic operation of the IDBIndex methods get(), getKey(), and count().");
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -14,12 +13,11 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("IndexGetCountBasicDatabase", 1);
-
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
     var index = objectStore.createIndex("TestIndex", "bar");
index 5e37a6a..27bcbaa 100644 (file)
@@ -1,8 +1,7 @@
 description("This tests some obvious failures that can happen while calling the IDBIndex methods get(), getKey(), and count().");
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -14,14 +13,14 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("IndexGetCountFailuresDatabase", 1);
 var database;
 var index;
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
     index = objectStore.createIndex("TestIndex", "foo");
index b364c7f..4b09f44 100644 (file)
@@ -1,22 +1,18 @@
 description("This test creates some object stores with keypaths. It then puts some values in them. It makes sure the keys used are as expected.");
 
+indexedDBTest(prepareDatabase);
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("KeypathBasicTestDatabase", 1);
-
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;    
     var objectStore1 = database.createObjectStore("OS1", { keyPath: "foo" });
     var objectStore2 = database.createObjectStore("OS2", { keyPath: "foo.bar" });
index 4953b7b..76870d1 100644 (file)
@@ -1,10 +1,7 @@
 description("This test exercises the readonly attributes on an IDBObjectStore.");
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
 
-var request = window.indexedDB.open("ObjectStoreAttributesTestDatabase");
+indexedDBTest(prepareDatabase);
+
 
 function log(message)
 {
@@ -18,11 +15,11 @@ function done()
 
 var database;
 
-request.onupgradeneeded = function(event)
+function prepareDatabase(event)
 {
     debug("First upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
     
-    var tx = request.transaction;
+    var tx = event.target.transaction;
     database = event.target.result;
 
     debug(tx + " - " + tx.mode);
index 4bcee80..1151c20 100644 (file)
@@ -1,8 +1,7 @@
 description("This tests some obvious failures that can happen while calling IDBCursor.advance() on object store cursors.");
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -14,13 +13,13 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("IDBAdvanceFailuresDatabase", 1);
 var database;
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
     for (var i = 0; i < 10; ++i)
index 5244540..0ccf5e7 100644 (file)
@@ -1,8 +1,7 @@
 description("This tests some obvious failures that can happen while calling IDBCursor.continue() on object store cursors.");
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -14,13 +13,13 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("IDBContinueFailuresDatabase", 1);
 var database;
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
     for (var i = 0; i < 10; ++i)
index 7435f67..8652ab7 100644 (file)
@@ -1,8 +1,7 @@
 description("This tests some obvious failures that can happen while opening cursors.");
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+
+indexedDBTest(prepareDatabase);
+
 
 function done()
 {
@@ -14,15 +13,15 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("OpenCursorFailuresDatabase", 1);
 var database;
 var objectStore;
 var index;
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     objectStore = database.createObjectStore("TestObjectStore");
     index = objectStore.createIndex("TestIndex", "bar");
index e88c939..e84a316 100644 (file)
@@ -1,29 +1,26 @@
 description("This test calls open on window.indexedDB in various ways, verifying that IDBOpenDBRequest objects are returned when expected and exceptions are thrown when expected.");
 
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
 function done()
 {
     finishJSTest();
 }
 
+var dbname = "TestDatabase" + Date();
+
 try {
-    window.indexedDB.open("TestDatabase", 0);
+    window.indexedDB.open(dbname, 0);
 } catch (e) {
     debug("Caught exception " + e);
 }
 
 try {
-    window.indexedDB.open("TestDatabase", -1);
+    window.indexedDB.open(dbname, -1);
 } catch (e) {
     debug("Caught exception " + e);
 }
 
-var request = window.indexedDB.open("TestDatabase");
+var request = window.indexedDB.open(dbname);
 debug(request);
 
 request.onsuccess = function()
index f801327..cbf1062 100644 (file)
@@ -1,17 +1,12 @@
 description("This test calls open on window.indexedDB in various ways, verifying that IDBOpenDBRequest objects are returned when expected and exceptions are thrown when expected.");
 
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
 function done()
 {
     finishJSTest();
 }
 
-var request = window.indexedDB.open("TestDatabase");
+var request = window.indexedDB.open("OpenDatabaseRequestTestDatabase" + Date());
 debug(request);
 
 request = window.indexedDB.open("");
index a518bf3..4489fb8 100644 (file)
@@ -2,10 +2,9 @@ description("This test verifies that: \
     - Opening a new database results in the onupgradeneeded handler being called on the IDBOpenDBRequest. \
     - The versionchange transaction representing the upgrade commits successfully. \
     - After that transaction commits, the onsuccess handler on the original IDBOpenDBRequest is called.");
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+
+indexedDBTest(prepareDatabase, openSuccess);
+
 
 function done()
 {
@@ -19,34 +18,29 @@ function log(message)
 
 var request = window.indexedDB.open("OpenDatabaseSuccessAfterVersionChangeDatabase");
 
-request.onsuccess = function()
+function openSuccess()
 {
     debug("Got the onsuccess handler as expected.");
        done();
 }
-request.onerror = function(e)
-{
-    debug("Unexpected onerror handler called");
-       done();
-}
 
-request.onupgradeneeded = function(e)
+function prepareDatabase(e)
 {
     debug("upgradeneeded: old version - " + e.oldVersion + " new version - " + e.newVersion);
-    debug(request.transaction);
+    debug(e.target.transaction);
     
-    request.transaction.oncomplete = function()
+    e.target.transaction.oncomplete = function()
     {
         debug("Version change complete");
     }
     
-    request.transaction.onabort = function()
+    e.target.transaction.onabort = function()
     {
         debug("Version change unexpected abort");
         done();
     }
     
-    request.transaction.onerror = function()
+    e.target.transaction.onerror = function()
     {
         debug("Version change unexpected error");
         done();
index ca5ad30..429843b 100644 (file)
@@ -1,16 +1,12 @@
 description("This test creates a new database with the default version, commits that versionchange transaction, and then reopens it at different versions to make sure the IDBOpenDBRequests behave appropriately.");
 
-
+indexedDBTest(prepareDatabase, openSuccessful);
 
 function log(msg)
 {
     document.getElementById("logger").innerHTML += msg + "";
 }
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
 
 function done()
 {
@@ -18,35 +14,36 @@ function done()
 }
 
 var request = window.indexedDB.open("VersionTestDatabase");
-debug(request + " (firstPhase)");
 
-request.onsuccess = function()
+function openSuccessful()
 {
     debug("First version change successful");
 }
-request.onerror = function(e)
-{
-    debug("Open request error (firstPhase) " + request.error.name);
-}
 
-request.onupgradeneeded = function(e)
+var dbname;
+function prepareDatabase(e)
 {
     var database = event.target.result;
+    dbname = database.name;
+
+    event.target.onerror = function(e) {
+        debug("Open request error (firstPhase) " + event.target.error.name);
+    }
 
     debug("upgradeneeded (firstPhase): old version - " + e.oldVersion + " new version - " + e.newVersion);
     debug(request.transaction);
-    request.transaction.oncomplete = function()
+    event.target.transaction.oncomplete = function()
     {
         debug("Version change complete (firstPhase). Database version is now - " + database.version);
         database.close();
         secondPhase();
     }
-    request.transaction.onabort = function()
+    event.target.transaction.onabort = function()
     {
         debug("Version change transaction unexpected abort! (firstPhase)");
         done();
     }
-    request.transaction.onerror = function()
+    event.target.transaction.onerror = function()
     {
         debug("Version change transaction unexpected error! (firstPhase)");
         done();
@@ -55,7 +52,7 @@ request.onupgradeneeded = function(e)
 
 function secondPhase()
 {
-    var request = window.indexedDB.open("VersionTestDatabase", 1);
+    var request = window.indexedDB.open(dbname, 1);
     debug(request + " (secondPhase)");
     request.onsuccess = function()
     {
@@ -78,7 +75,7 @@ function secondPhase()
 
 function thirdPhase()
 {
-    var request = window.indexedDB.open("VersionTestDatabase", 2);
+    var request = window.indexedDB.open(dbname, 2);
     debug(request + " (thirdPhase)");
     request.onsuccess = function()
     {
@@ -116,7 +113,7 @@ function thirdPhase()
 function fourthPhase()
 {
     // We've upgraded to version 2, so version 1 should not be openable.
-    var request = window.indexedDB.open("VersionTestDatabase", 1);
+    var request = window.indexedDB.open(dbname, 1);
     debug(request + " (fourthPhase)");
     request.onsuccess = function()
     {
index 75ef1db..b8c8d80 100644 (file)
@@ -1,8 +1,5 @@
 description("This test makes sure that IDBRequest.readyState returns expected values.");
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
+
 
 function done()
 {
@@ -14,7 +11,7 @@ function log(message)
     debug(message);
 }
 
-var createRequest = window.indexedDB.open("RequestReadyStateDatabase", 1);
+var createRequest = window.indexedDB.open("RequestReadyStateDatabase" + Date(), 1);
 debug("After calling indexedDB.open(), create request readyState is: " + createRequest.readyState);
 
 createRequest.onupgradeneeded = function(event) {
index f14e7e7..d68dc69 100644 (file)
@@ -1,23 +1,23 @@
 description("This test makes sure that two read-only transactions to an object store are active at the same time.");
 
+indexedDBTest(prepareDatabase);
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("TransactionScheduler1Database");
-
-createRequest.onupgradeneeded = function(event) {
+var dbname;
+function prepareDatabase(event)
+{
     debug("Upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    event.target.onerror = null;
+
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
+    dbname = database.name;
     var objectStore = database.createObjectStore("TestObjectStore");
     var request = objectStore.put("foo", "bar");
 
@@ -45,8 +45,8 @@ createRequest.onupgradeneeded = function(event) {
 
 function continueTest()
 {
-    var request1 = window.indexedDB.open("TransactionScheduler1Database", 1);
-    var request2 = window.indexedDB.open("TransactionScheduler1Database", 1);
+    var request1 = window.indexedDB.open(dbname, 1);
+    var request2 = window.indexedDB.open(dbname, 1);
 
     setupRequest(request1, "request 1");
     setupRequest(request2, "request 2");
index 3e3d642..18007df 100644 (file)
@@ -1,23 +1,23 @@
 description("This test makes sure that two read-only transactions to two different object stores are active at the same time.");
 
+indexedDBTest(prepareDatabase);
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("TransactionScheduler2Database");
-
-createRequest.onupgradeneeded = function(event) {
+var dbname;
+function prepareDatabase(event)
+{
     debug("Upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    event.target.onerror = null;
+
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
+    dbname = database.name;
     var objectStore = database.createObjectStore("OS1");
     var request = objectStore.put("foo1", "bar1");
 
@@ -53,8 +53,8 @@ createRequest.onupgradeneeded = function(event) {
 
 function continueTest()
 {
-    var request1 = window.indexedDB.open("TransactionScheduler2Database", 1);
-    var request2 = window.indexedDB.open("TransactionScheduler2Database", 1);
+    var request1 = window.indexedDB.open(dbname, 1);
+    var request2 = window.indexedDB.open(dbname, 1);
 
     setupRequest(request1, "OS1");
     setupRequest(request2, "OS2");
index e2b6bdc..cd7e981 100644 (file)
@@ -1,23 +1,23 @@
 description("This test makes sure that a write transaction is blocked by a read transaction with overlapping scope. It also makes sure the write transaction starts after the read transaction completes.");
 
+indexedDBTest(prepareDatabase);
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("TransactionScheduler3Database");
-
-createRequest.onupgradeneeded = function(event) {
+var dbname;
+function prepareDatabase(event)
+{
     debug("Upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    event.target.onerror = null;
+
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
+    dbname = database.name;
     var objectStore = database.createObjectStore("OS");
     var request = objectStore.put("bar", "foo");
 
@@ -46,7 +46,7 @@ createRequest.onupgradeneeded = function(event) {
 var secondDatabaseConnection;
 function continueTest()
 {
-    var longRunningReadRequest = window.indexedDB.open("TransactionScheduler3Database", 1);
+    var longRunningReadRequest = window.indexedDB.open(dbname, 1);
     longRunningReadRequest.onsuccess = function(event) {
         debug("Success opening database connection - Starting readonly transaction");
         secondDatabaseConnection = event.target.result;
index f0c7bb5..0e23e44 100644 (file)
@@ -3,24 +3,24 @@ It then opens two long running read-only transactions, one per object store. \
 It then opens a read-write transaction to both object stores. \
 The read-only transactions both need to finish before the read-write transaction starts.");
 
+indexedDBTest(prepareDatabase);
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("TransactionScheduler5Database");
-
-createRequest.onupgradeneeded = function(event) {
+var dbname;
+function prepareDatabase(event)
+{
     debug("Upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    event.target.onerror = null;
+
+    var versionTransaction = event.target.transaction;
     var database = event.target.result;
+    dbname = database.name;
     var objectStore = database.createObjectStore("OS1");
     var request = objectStore.put("bar", "foo");
 
@@ -78,7 +78,7 @@ function setupReadTransactionCallbacks(transaction)
 
 function continueTest()
 {
-    var openDBRequest = window.indexedDB.open("TransactionScheduler5Database", 1);
+    var openDBRequest = window.indexedDB.open(dbname, 1);
     openDBRequest.onsuccess = function(event) {
         debug("Success opening database connection - Starting transactions");
         secondDatabaseConnection = event.target.result;
index 0756e2c..3c8a352 100644 (file)
@@ -1,24 +1,21 @@
 description("This test starts two read-only transactions to an object store followed by a read-write transaction. \
 It verifies that the read-write doesn't start until both read-onlys have finished.");
 
+indexedDBTest(prepareDatabase);
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("TransactionScheduler6Database");
 var database;
 
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
+    var versionTransaction = event.target.transaction;
     database = event.target.result;
     var objectStore = database.createObjectStore("TestObjectStore");
     var request = objectStore.put("foo", "bar");
index c569e99..dd4b137 100644 (file)
@@ -3,25 +3,24 @@ It then reopens the database, making sure it's a default, empty database, and ch
 It then reopens the database, upgrading it's version. It aborts this versionchange, as well. \
 Finally it reopens the database again, upgrading its version, making sure things had reverted back to before the second aborted versionchange.");
 
+indexedDBTest(prepareDatabase);
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
 
 function done()
 {
     finishJSTest();
 }
 
-var createRequest = window.indexedDB.open("VersionChangeAbortTestDatabase", 1);
-
-createRequest.onupgradeneeded = function(event) {
+function prepareDatabase(event)
+{
     debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
+    event.target.onerror = null;
 
+    var versionTransaction = event.target.transaction;
+    var database = event.target.result;
+    event.target.onerror = null;
+    
     versionTransaction.abort();
 
     versionTransaction.onabort = function(event) {
@@ -47,7 +46,7 @@ function continueTest1()
     createRequest.onupgradeneeded = function(event) {
         debug("Second upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-        var versionTransaction = createRequest.transaction;
+        var versionTransaction = event.target.transaction;
         var database = event.target.result;
 
         versionTransaction.onabort = function(event) {
@@ -75,7 +74,7 @@ function continueTest2()
     createRequest.onupgradeneeded = function(event) {
         debug("Third upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
 
-        var versionTransaction = createRequest.transaction;
+        var versionTransaction = event.target.transaction;
         var database = event.target.result;
 
         versionTransaction.abort();
index f4556fc..78bdfce 100644 (file)
@@ -7,37 +7,30 @@ description("This test: \
 -Closes the first and second connections \
 -Makes sure the versionchange transaction for the second connection starts successfully");
 
+indexedDBTest(prepareDatabase, openSuccess);
 
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
 
 function done()
 {
     finishJSTest();
 }
 
-var request = window.indexedDB.open("VersionChangeTestDatabase");
 var connection1;
 var connection2;
 
-request.onsuccess = function()
+function openSuccess()
 {
     debug("First version change successful");
 }
-request.onerror = function(e)
-{
-    debug("Unexpected error (firstPhase)");
-       done();
-}
 
-request.onupgradeneeded = function(e)
+var dbname;
+function prepareDatabase(e)
 {
     var database = event.target.result;
+    dbname = database.name;
 
     debug("upgradeneeded (firstPhase): old version - " + e.oldVersion + " new version - " + e.newVersion);
-    request.transaction.oncomplete = function()
+    event.target.transaction.oncomplete = function()
     {
         debug("Version change complete (firstPhase). Database version is now - " + database.version);
 
@@ -50,12 +43,12 @@ request.onupgradeneeded = function(e)
         }
         secondPhase();
     }
-    request.transaction.onabort = function()
+    event.target.transaction.onabort = function()
     {
         debug("Version change transaction unexpected abort (firstPhase)");
         done();
     }
-    request.transaction.onerror = function()
+    event.target.transaction.onerror = function()
     {
         debug("Version change transaction unexpected error (firstPhase)");
         done();
@@ -64,7 +57,7 @@ request.onupgradeneeded = function(e)
 
 function secondPhase()
 {
-    var request = window.indexedDB.open("VersionChangeTestDatabase", 1);
+    var request = window.indexedDB.open(dbname, 1);
     request.onsuccess = function()
     {
         debug("Open success (secondPhase)");
@@ -91,7 +84,7 @@ function secondPhase()
 
 function thirdPhase()
 {
-    var request = window.indexedDB.open("VersionChangeTestDatabase", 2);
+    var request = window.indexedDB.open(dbname, 2);
     debug("thirdPhase - Requested database connection with version 2");
     request.onsuccess = function()
     {
index 41b2a1f..f1cd5ee 100644 (file)
@@ -3,6 +3,10 @@ This test makes sure that two read-only transactions to an object store are acti
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Upgrade needed: Old version - 0 New version - 1
 versionchange transaction completed
 Success opening database connection - request 1
index 8a6188a..b934e1e 100644 (file)
@@ -3,6 +3,10 @@ This test makes sure that two read-only transactions to two different object sto
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Upgrade needed: Old version - 0 New version - 1
 versionchange transaction completed
 Success opening database connection - Starting transaction to ObjectStore OS1
index 9f1f765..19b6457 100644 (file)
@@ -3,6 +3,10 @@ This test makes sure that a write transaction is blocked by a read transaction w
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Upgrade needed: Old version - 0 New version - 1
 versionchange transaction completed
 Success opening database connection - Starting readonly transaction
index 5091634..a02f4df 100644 (file)
@@ -3,6 +3,10 @@ This test creates two object stores. It then opens two long running read-only tr
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Upgrade needed: Old version - 0 New version - 1
 versionchange transaction completed
 Success opening database connection - Starting transactions
index 0255d7d..d6a48df 100644 (file)
@@ -3,6 +3,10 @@ This test starts two read-only transactions to an object store followed by a rea
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Upgrade needed: Old version - 0 New version - 1
 versionchange transaction completed
 Starting a readonly transaction
index acc00c6..3ac8194 100644 (file)
@@ -3,6 +3,10 @@ This test opens a new database, then aborts the version change transaction. It t
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 Initial upgrade needed: Old version - 0 New version - 1
 Initial upgrade versionchange transaction aborted
 Second upgrade needed: Old version - 0 New version - 1
index 45f7b9d..6e40dbb 100644 (file)
@@ -3,6 +3,10 @@ This test: -Opens a connection to a database at version 1, creating the database
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+indexedDB.deleteDatabase(dbname)
+indexedDB.open(dbname)
 upgradeneeded (firstPhase): old version - 0 new version - 1
 Version change complete (firstPhase). Database version is now - 1
 First version change successful