Modern IDB: Split all storage/indexeddb/modern tests into separate HTML + JS format.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jan 2016 23:41:11 +0000 (23:41 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jan 2016 23:41:11 +0000 (23:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=153251

Reviewed by Sam Weinig.

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

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

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

index 779a617..dee362f 100644 (file)
@@ -1,3 +1,220 @@
+2016-01-19  Brady Eidson  <beidson@apple.com>
+
+        Modern IDB: Split all storage/indexeddb/modern tests into separate HTML + JS format.
+        https://bugs.webkit.org/show_bug.cgi?id=153251
+
+        Reviewed by Sam Weinig.
+
+        * storage/indexeddb/modern/abort-requests-cancelled-expected.txt:
+        * storage/indexeddb/modern/abort-requests-cancelled.html:
+        * storage/indexeddb/modern/aborted-put-expected.txt:
+        * storage/indexeddb/modern/aborted-put.html:
+        * storage/indexeddb/modern/autoincrement-abort-expected.txt:
+        * storage/indexeddb/modern/autoincrement-abort.html:
+        * storage/indexeddb/modern/basic-add-expected.txt:
+        * storage/indexeddb/modern/basic-add.html:
+        * storage/indexeddb/modern/basic-put-expected.txt:
+        * storage/indexeddb/modern/basic-put.html:
+        * storage/indexeddb/modern/create-index-failures-expected.txt:
+        * storage/indexeddb/modern/create-index-failures.html:
+        * storage/indexeddb/modern/createobjectstore-basic-expected.txt:
+        * storage/indexeddb/modern/createobjectstore-basic.html:
+        * storage/indexeddb/modern/createobjectstore-failures-expected.txt:
+        * storage/indexeddb/modern/createobjectstore-failures.html:
+        * storage/indexeddb/modern/cursor-1-expected.txt:
+        * storage/indexeddb/modern/cursor-1.html:
+        * storage/indexeddb/modern/cursor-2-expected.txt:
+        * storage/indexeddb/modern/cursor-2.html:
+        * storage/indexeddb/modern/cursor-3-expected.txt:
+        * storage/indexeddb/modern/cursor-3.html:
+        * storage/indexeddb/modern/cursor-4-expected.txt:
+        * storage/indexeddb/modern/cursor-4.html:
+        * storage/indexeddb/modern/cursor-5-expected.txt:
+        * storage/indexeddb/modern/cursor-5.html:
+        * storage/indexeddb/modern/cursor-6-expected.txt:
+        * storage/indexeddb/modern/cursor-6.html:
+        * storage/indexeddb/modern/cursor-7-expected.txt:
+        * storage/indexeddb/modern/cursor-7.html:
+        * storage/indexeddb/modern/cursor-8-expected.txt:
+        * storage/indexeddb/modern/cursor-8.html:
+        * storage/indexeddb/modern/date-basic-expected.txt:
+        * storage/indexeddb/modern/date-basic.html:
+        * storage/indexeddb/modern/deletedatabase-1-expected.txt:
+        * storage/indexeddb/modern/deletedatabase-1.html:
+        * storage/indexeddb/modern/deletedatabase-2-expected.txt:
+        * storage/indexeddb/modern/deletedatabase-2.html:
+        * storage/indexeddb/modern/deletedatabase-null-name-exception-expected.txt:
+        * storage/indexeddb/modern/deletedatabase-null-name-exception.html:
+        * storage/indexeddb/modern/deletedatabase-request-event-expected.txt:
+        * storage/indexeddb/modern/deletedatabase-request-event.html:
+        * storage/indexeddb/modern/deletedatabase-request-expected.txt:
+        * storage/indexeddb/modern/deletedatabase-request.html:
+        * storage/indexeddb/modern/deleteindex-1-expected.txt:
+        * storage/indexeddb/modern/deleteindex-1.html:
+        * storage/indexeddb/modern/deleteindex-2-expected.txt:
+        * storage/indexeddb/modern/deleteindex-2.html:
+        * storage/indexeddb/modern/deleteobjectstore-1-expected.txt:
+        * storage/indexeddb/modern/deleteobjectstore-1.html:
+        * storage/indexeddb/modern/double-abort-expected.txt:
+        * storage/indexeddb/modern/double-abort.html:
+        * storage/indexeddb/modern/double-open-expected.txt:
+        * storage/indexeddb/modern/double-open.html:
+        * storage/indexeddb/modern/get-index-failures-expected.txt:
+        * storage/indexeddb/modern/get-index-failures.html:
+        * storage/indexeddb/modern/get-keyrange-expected.txt:
+        * storage/indexeddb/modern/get-keyrange.html:
+        * storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt:
+        * storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html:
+        * storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt:
+        * storage/indexeddb/modern/idbdatabase-transaction-failures.html:
+        * storage/indexeddb/modern/idbindex-properties-basic-expected.txt:
+        * storage/indexeddb/modern/idbindex-properties-basic.html:
+        * storage/indexeddb/modern/idbobjectstore-clear-1-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-clear-1.html:
+        * storage/indexeddb/modern/idbobjectstore-clear-2-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-clear-2.html:
+        * storage/indexeddb/modern/idbobjectstore-count-1-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-count-1.html:
+        * storage/indexeddb/modern/idbobjectstore-count-failures-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-count-failures.html:
+        * storage/indexeddb/modern/idbobjectstore-delete-1-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-delete-1.html:
+        * storage/indexeddb/modern/idbobjectstore-delete-2-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-delete-2.html:
+        * storage/indexeddb/modern/idbobjectstore-delete-failures-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-delete-failures.html:
+        * storage/indexeddb/modern/idbobjectstore-get-failures-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-get-failures.html:
+        * storage/indexeddb/modern/idbobjectstore-put-and-clear-failures-expected.txt:
+        * storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html:
+        * storage/indexeddb/modern/idbtransaction-objectstore-failures-expected.txt:
+        * storage/indexeddb/modern/idbtransaction-objectstore-failures.html:
+        * storage/indexeddb/modern/index-1-expected.txt:
+        * storage/indexeddb/modern/index-1.html:
+        * storage/indexeddb/modern/index-2-expected.txt:
+        * storage/indexeddb/modern/index-2.html:
+        * storage/indexeddb/modern/index-3-expected.txt:
+        * storage/indexeddb/modern/index-3.html:
+        * storage/indexeddb/modern/index-4-expected.txt:
+        * storage/indexeddb/modern/index-4.html:
+        * storage/indexeddb/modern/index-5-expected.txt:
+        * storage/indexeddb/modern/index-5.html:
+        * storage/indexeddb/modern/index-cursor-1-expected.txt:
+        * storage/indexeddb/modern/index-cursor-1.html:
+        * storage/indexeddb/modern/index-cursor-2-expected.txt:
+        * storage/indexeddb/modern/index-cursor-2.html:
+        * storage/indexeddb/modern/index-cursor-3-expected.txt:
+        * storage/indexeddb/modern/index-cursor-3.html:
+        * storage/indexeddb/modern/index-get-count-basic-expected.txt:
+        * storage/indexeddb/modern/index-get-count-basic.html:
+        * storage/indexeddb/modern/index-get-count-failures-expected.txt:
+        * storage/indexeddb/modern/index-get-count-failures.html:
+        * storage/indexeddb/modern/keypath-basic-expected.txt:
+        * storage/indexeddb/modern/keypath-basic.html:
+        * storage/indexeddb/modern/objectstore-attributes-expected.txt:
+        * storage/indexeddb/modern/objectstore-attributes.html:
+        * storage/indexeddb/modern/objectstore-cursor-advance-failures-expected.txt:
+        * storage/indexeddb/modern/objectstore-cursor-advance-failures.html:
+        * storage/indexeddb/modern/objectstore-cursor-continue-failures-expected.txt:
+        * storage/indexeddb/modern/objectstore-cursor-continue-failures.html:
+        * storage/indexeddb/modern/opencursor-failures-expected.txt:
+        * storage/indexeddb/modern/opencursor-failures.html:
+        * storage/indexeddb/modern/opendatabase-request-event-expected.txt:
+        * storage/indexeddb/modern/opendatabase-request-event.html:
+        * storage/indexeddb/modern/opendatabase-request-expected.txt:
+        * storage/indexeddb/modern/opendatabase-request.html:
+        * storage/indexeddb/modern/opendatabase-success-after-versionchange-expected.txt:
+        * storage/indexeddb/modern/opendatabase-success-after-versionchange.html:
+        * storage/indexeddb/modern/opendatabase-versions-expected.txt:
+        * storage/indexeddb/modern/opendatabase-versions.html:
+        * storage/indexeddb/modern/request-readystate-expected.txt:
+        * storage/indexeddb/modern/request-readystate.html:
+        * storage/indexeddb/modern/resources/abort-requests-cancelled.js: Copied from LayoutTests/storage/indexeddb/modern/abort-requests-cancelled.html.
+        * storage/indexeddb/modern/resources/aborted-put.js: Copied from LayoutTests/storage/indexeddb/modern/aborted-put.html.
+        * storage/indexeddb/modern/resources/autoincrement-abort.js: Copied from LayoutTests/storage/indexeddb/modern/autoincrement-abort.html.
+        * storage/indexeddb/modern/resources/basic-add.js: Copied from LayoutTests/storage/indexeddb/modern/basic-add.html.
+        * storage/indexeddb/modern/resources/basic-put.js: Copied from LayoutTests/storage/indexeddb/modern/basic-put.html.
+        * storage/indexeddb/modern/resources/create-index-failures.js: Copied from LayoutTests/storage/indexeddb/modern/create-index-failures.html.
+        * storage/indexeddb/modern/resources/createobjectstore-basic.js: Copied from LayoutTests/storage/indexeddb/modern/createobjectstore-basic.html.
+        * storage/indexeddb/modern/resources/createobjectstore-failures.js: Copied from LayoutTests/storage/indexeddb/modern/createobjectstore-failures.html.
+        * storage/indexeddb/modern/resources/cursor-1.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-1.html.
+        * storage/indexeddb/modern/resources/cursor-2.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-2.html.
+        * storage/indexeddb/modern/resources/cursor-3.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-3.html.
+        * storage/indexeddb/modern/resources/cursor-4.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-4.html.
+        * storage/indexeddb/modern/resources/cursor-5.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-5.html.
+        * storage/indexeddb/modern/resources/cursor-6.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-6.html.
+        * storage/indexeddb/modern/resources/cursor-7.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-7.html.
+        * storage/indexeddb/modern/resources/cursor-8.js: Copied from LayoutTests/storage/indexeddb/modern/cursor-8.html.
+        * storage/indexeddb/modern/resources/date-basic.js: Copied from LayoutTests/storage/indexeddb/modern/date-basic.html.
+        * storage/indexeddb/modern/resources/deletedatabase-1.js: Copied from LayoutTests/storage/indexeddb/modern/deletedatabase-1.html.
+        * storage/indexeddb/modern/resources/deletedatabase-2.js: Copied from LayoutTests/storage/indexeddb/modern/deletedatabase-2.html.
+        * storage/indexeddb/modern/resources/deletedatabase-null-name-exception.js: Added.
+        * storage/indexeddb/modern/resources/deletedatabase-request-event.js: Copied from LayoutTests/storage/indexeddb/modern/deletedatabase-request-event.html.
+        * storage/indexeddb/modern/resources/deletedatabase-request.js: Added.
+        * storage/indexeddb/modern/resources/deleteindex-1.js: Copied from LayoutTests/storage/indexeddb/modern/deleteindex-1.html.
+        * storage/indexeddb/modern/resources/deleteindex-2.js: Copied from LayoutTests/storage/indexeddb/modern/deleteindex-2.html.
+        * storage/indexeddb/modern/resources/deleteobjectstore-1.js: Copied from LayoutTests/storage/indexeddb/modern/deleteobjectstore-1.html.
+        * storage/indexeddb/modern/resources/double-abort.js: Copied from LayoutTests/storage/indexeddb/modern/double-abort.html.
+        * storage/indexeddb/modern/resources/double-open.js: Added.
+        * storage/indexeddb/modern/resources/get-index-failures.js: Copied from LayoutTests/storage/indexeddb/modern/get-index-failures.html.
+        * storage/indexeddb/modern/resources/get-keyrange.js: Copied from LayoutTests/storage/indexeddb/modern/get-keyrange.html.
+        * storage/indexeddb/modern/resources/idbdatabase-deleteobjectstore-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html.
+        * storage/indexeddb/modern/resources/idbdatabase-transaction-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbdatabase-transaction-failures.html.
+        * storage/indexeddb/modern/resources/idbindex-properties-basic.js: Copied from LayoutTests/storage/indexeddb/modern/idbindex-properties-basic.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-clear-1.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-1.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-clear-2.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-clear-2.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-count-1.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-count-1.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-count-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-count-failures.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-delete-1.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-1.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-delete-2.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-2.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-delete-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-delete-failures.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-get-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-get-failures.html.
+        * storage/indexeddb/modern/resources/idbobjectstore-put-and-clear-failures.js: Copied from LayoutTests/storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html.
+        * storage/indexeddb/modern/resources/idbtransaction-objectstore-failures.js: Added.
+        * storage/indexeddb/modern/resources/index-1.js: Copied from LayoutTests/storage/indexeddb/modern/index-1.html.
+        * storage/indexeddb/modern/resources/index-2.js: Copied from LayoutTests/storage/indexeddb/modern/index-2.html.
+        * storage/indexeddb/modern/resources/index-3.js: Copied from LayoutTests/storage/indexeddb/modern/index-3.html.
+        * storage/indexeddb/modern/resources/index-4.js: Copied from LayoutTests/storage/indexeddb/modern/index-4.html.
+        * storage/indexeddb/modern/resources/index-5.js: Copied from LayoutTests/storage/indexeddb/modern/index-5.html.
+        * storage/indexeddb/modern/resources/index-cursor-1.js: Copied from LayoutTests/storage/indexeddb/modern/index-cursor-1.html.
+        * storage/indexeddb/modern/resources/index-cursor-2.js: Copied from LayoutTests/storage/indexeddb/modern/index-cursor-2.html.
+        * storage/indexeddb/modern/resources/index-cursor-3.js: Copied from LayoutTests/storage/indexeddb/modern/index-cursor-3.html.
+        * storage/indexeddb/modern/resources/index-get-count-basic.js: Copied from LayoutTests/storage/indexeddb/modern/index-get-count-basic.html.
+        * storage/indexeddb/modern/resources/index-get-count-failures.js: Copied from LayoutTests/storage/indexeddb/modern/index-get-count-failures.html.
+        * storage/indexeddb/modern/resources/keypath-basic.js: Copied from LayoutTests/storage/indexeddb/modern/keypath-basic.html.
+        * storage/indexeddb/modern/resources/objectstore-attributes.js: Copied from LayoutTests/storage/indexeddb/modern/objectstore-attributes.html.
+        * storage/indexeddb/modern/resources/objectstore-cursor-advance-failures.js: Copied from LayoutTests/storage/indexeddb/modern/objectstore-cursor-advance-failures.html.
+        * storage/indexeddb/modern/resources/objectstore-cursor-continue-failures.js: Copied from LayoutTests/storage/indexeddb/modern/objectstore-cursor-continue-failures.html.
+        * storage/indexeddb/modern/resources/opencursor-failures.js: Copied from LayoutTests/storage/indexeddb/modern/opencursor-failures.html.
+        * storage/indexeddb/modern/resources/opendatabase-request-event.js: Added.
+        * storage/indexeddb/modern/resources/opendatabase-request.js: Copied from LayoutTests/storage/indexeddb/modern/opendatabase-request.html.
+        * storage/indexeddb/modern/resources/opendatabase-success-after-versionchange.js: Copied from LayoutTests/storage/indexeddb/modern/opendatabase-success-after-versionchange.html.
+        * storage/indexeddb/modern/resources/opendatabase-versions.js: Copied from LayoutTests/storage/indexeddb/modern/opendatabase-versions.html.
+        * storage/indexeddb/modern/resources/request-readystate.js: Added.
+        * storage/indexeddb/modern/resources/transaction-scheduler-1.js: Copied from LayoutTests/storage/indexeddb/modern/transaction-scheduler-1.html.
+        * storage/indexeddb/modern/resources/transaction-scheduler-2.js: Copied from LayoutTests/storage/indexeddb/modern/transaction-scheduler-2.html.
+        * storage/indexeddb/modern/resources/transaction-scheduler-3.js: Copied from LayoutTests/storage/indexeddb/modern/transaction-scheduler-3.html.
+        * storage/indexeddb/modern/resources/transaction-scheduler-5.js: Copied from LayoutTests/storage/indexeddb/modern/transaction-scheduler-5.html.
+        * storage/indexeddb/modern/resources/transaction-scheduler-6.js: Copied from LayoutTests/storage/indexeddb/modern/transaction-scheduler-6.html.
+        * storage/indexeddb/modern/resources/transactions-stop-on-navigation-2.html:
+        * storage/indexeddb/modern/resources/versionchange-abort-then-reopen.js: Copied from LayoutTests/storage/indexeddb/modern/versionchange-abort-then-reopen.html.
+        * storage/indexeddb/modern/resources/versionchange-event.js: Copied from LayoutTests/storage/indexeddb/modern/versionchange-event.html.
+        * storage/indexeddb/modern/transaction-scheduler-1-expected.txt:
+        * storage/indexeddb/modern/transaction-scheduler-1.html:
+        * storage/indexeddb/modern/transaction-scheduler-2-expected.txt:
+        * storage/indexeddb/modern/transaction-scheduler-2.html:
+        * storage/indexeddb/modern/transaction-scheduler-3-expected.txt:
+        * storage/indexeddb/modern/transaction-scheduler-3.html:
+        * storage/indexeddb/modern/transaction-scheduler-5-expected.txt:
+        * storage/indexeddb/modern/transaction-scheduler-5.html:
+        * storage/indexeddb/modern/transaction-scheduler-6-expected.txt:
+        * storage/indexeddb/modern/transaction-scheduler-6.html:
+        * storage/indexeddb/modern/transactions-stop-on-navigation-expected.txt:
+        * storage/indexeddb/modern/versionchange-abort-then-reopen-expected.txt:
+        * storage/indexeddb/modern/versionchange-abort-then-reopen.html:
+        * storage/indexeddb/modern/versionchange-event-expected.txt:
+        * storage/indexeddb/modern/versionchange-event.html:
+
 2016-01-19  Zalan Bujtas  <zalan@apple.com>
 
         outline-offset does not work for inlines.
index 89c0c77..660384a 100644 (file)
@@ -1,4 +1,8 @@
 This test makes sure that un-handled requests in a transaction receive onerror callbacks when the transaction is aborted.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 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)
@@ -20,5 +24,7 @@ Error handling: "objectStore.get(1);" (error)
 Error handling: "objectStore.get(2);" (error)
 Error handling: "objectStore.get(3);" (error)
 readonly transaction aborted
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index d70d977..fddda4d 100644 (file)
-This test makes sure that un-handled requests in a transaction receive onerror callbacks when the transaction is aborted.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var database;
-var objectStore;
-
-function setupRequest(code)
-{
-    var request = eval(code);
-    request.onsuccess = function()
-    {
-        log ("Success handling: \"" + code + "\"");
-    }
-    request.onerror = function(e)
-    {
-        log ("Error handling: \"" + code + "\" (" + e.type + ")");
-        e.stopPropagation();
-    }   
-}
-
-startTest();
-
-function startTest() {
-    var createRequest = window.indexedDB.open("AbortRequestsCancelledDatabase", 1);
-    createRequest.onupgradeneeded = function(event) {
-        log("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);");
-
-        versionTransaction.abort();
-
-        versionTransaction.onabort = function(event) {
-            log("Initial upgrade versionchange transaction aborted");
-            database.close();
-            continueTest1();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            log("Initial upgrade versionchange transaction unexpected complete");
-            done();
-        }
-
-        versionTransaction.onerror = function(event) {
-            log("Initial upgrade versionchange transaction error " + event);
-        }
-    }
-}
-
-function continueTest1() {
-    var createRequest = window.indexedDB.open("AbortRequestsCancelledDatabase", 1);
-    createRequest.onupgradeneeded = function(event) {
-        log("Second upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-        var versionTransaction = createRequest.transaction;
-        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);");
-    
-        versionTransaction.onabort = function(event) {
-            log("Second upgrade versionchange transaction unexpected abort");
-            done();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            log("Second upgrade versionchange transaction completed");
-            continueTest2();
-        }
-
-        versionTransaction.onerror = function(event) {
-            log("Second upgrade versionchange transaction unexpected error" + event);
-            done();
-        }
-    }
-}
-
-function continueTest2() {
-    var transaction = database.transaction("TestObjectStore", "readwrite");
-    objectStore = transaction.objectStore("TestObjectStore");
-
-    setupRequest("objectStore.get(1);");
-    setupRequest("objectStore.get(2);");
-    setupRequest("objectStore.get(3);");
-    setupRequest("objectStore.put({ bar: 'D' }, 4);");
-    setupRequest("objectStore.put({ bar: 'E' }, 5);");
-    setupRequest("objectStore.put({ bar: 'F' }, 6);");
-
-    transaction.abort();
-
-    transaction.onabort = function(event) {
-        log("readwrite transaction aborted");
-        continueTest3();
-    }
-
-    transaction.oncomplete = function(event) {
-        log("readwrite transaction unexpected complete");
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log("readwrite transaction unexpected error" + event);
-        done();
-    }
-}
-
-function continueTest3() {
-    var transaction = database.transaction("TestObjectStore", "readonly");
-    objectStore = transaction.objectStore("TestObjectStore");
-
-    setupRequest("objectStore.get(1);");
-    setupRequest("objectStore.get(2);");
-    setupRequest("objectStore.get(3);");
-
-    transaction.abort();
-
-    transaction.onabort = function(event) {
-        log("readonly transaction aborted");
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log("readwrite transaction unexpected complete");
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log("readwrite transaction unexpected error" + event);
-        done();
-    }
-}
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/abort-requests-cancelled.js"></script>
+</body>
+</html>
index dd46037..1fb64b7 100644 (file)
@@ -1,3 +1,8 @@
+This test creates some object stores, putting some values in them, committing the transaction. 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.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: First upgrade needed: Old version - 0 New version - 1
 ALERT: [object IDBTransaction] - versionchange
 ALERT: [object IDBDatabase]
@@ -17,8 +22,7 @@ ALERT: [object IDBDatabase]
 ALERT: get1 'foo' succeeded - value was 'bar'
 ALERT: get2 'far' succeeded - value was 'undefined'
 ALERT: Third version change transaction complete
-ALERT: Done
-This test creates some object stores, putting some values in them, committing the transaction.
-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.
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 89f8e56..03525ac 100644 (file)
@@ -1,203 +1,9 @@
-This test creates some object stores, putting some values in them, committing the transaction.<br>
-In a new transaction, it then overwrites those values, but then aborts the transaction.<br>
-Finally it verifies everything is set up from the first transaction, and nothing from the aborted one committed.<br>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-var request = window.indexedDB.open("AbortedPutTestDatabase");
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-request.onupgradeneeded = function(event)
-{
-    alert("First upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-    
-    var tx = request.transaction;
-    var db = event.target.result;
-
-    alert(tx + " - " + tx.mode);
-    alert(db);
-
-    var os1 = db.createObjectStore("TestObjectStore1");
-    var os2 = db.createObjectStore("TestObjectStore2");
-
-    var putRequest = os1.put("bar", "foo");
-    
-    putRequest.onsuccess = function(event) {
-        alert("put succeeded - key was '" + putRequest.result + "'");
-        
-        var getRequest1 = os1.get("foo");
-        getRequest1.onsuccess = function(event) {
-            alert("get 'foo' succeeded - value was '" + getRequest1.result + "'");
-        }
-
-        getRequest1.onerror = function(event) {
-            alert("get 'foo' unexpectedly failed - " + event);
-            done();
-        }
-        
-        var getRequest2 = os2.get("far");
-        getRequest2.onsuccess = function(event) {
-            alert("get 'far' succeeded - value was '" + getRequest2.result + "'");
-        }
-
-        getRequest2.onerror = function(event) {
-            alert("get 'far' unexpectedly failed - " + event);
-            done();
-        }
-    }
-
-    putRequest.onerror = function(event) {
-        alert("put unexpectedly failed - " + event);
-        done();
-    }
-    
-    tx.onabort = function(event) {
-        alert("First version change transaction unexpected abort");
-        done();
-    }
-
-    tx.oncomplete = function(event) {
-        alert("First version change transaction completed");
-        db.close();
-        continueTest1();
-    }
-
-    tx.onerror = function(event) {
-        alert("First version change transaction unexpected error - " + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var request = window.indexedDB.open("AbortedPutTestDatabase", 2);
-
-    request.onupgradeneeded = function(event) {
-        alert("Second upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-    
-        var tx = request.transaction;
-        var db = event.target.result;
-
-        alert(tx + " - " + tx.mode);
-        alert(db);
-
-        var os1 = tx.objectStore("TestObjectStore1");
-        var os2 = tx.objectStore("TestObjectStore2");
-        var putRequest1 = os1.put("baz", "foo");
-        var putRequest2 = os2.put("boo", "far");
-    
-        putRequest1.onerror = function(e) {
-            alert("Unexpected error overwriting bar with baz - " + e);
-            done();
-        }
-
-        putRequest2.onerror = function(e) {
-            alert("Writing into second object store unexpectedly failed - " + e);
-            done();
-        }
-        
-        putRequest2.onsuccess = function(e) {
-            var getRequest1 = os1.get("foo");
-            var getRequest2 = os2.get("far");
-            
-            getRequest1.onsuccess = function(event) {
-                alert("get1 'foo' succeeded - value was '" + getRequest1.result + "'");
-            }
-
-            getRequest1.onerror = function(event) {
-                alert("get1 unexpectedly failed - " + event);
-                done();
-            }
-
-            getRequest2.onsuccess = function(event) {
-                alert("get2 'far' succeeded - value was '" + getRequest2.result + "'");
-                tx.abort();
-            }
-
-            getRequest2.onerror = function(event) {
-                alert("get2 unexpectedly failed - " + event);
-                done();
-            }
-        }
-        
-        tx.onabort = function(event) {
-            alert("Second version change transaction abort");
-            db.close();
-            continueTest2();
-        }
-
-        tx.oncomplete = function(event) {
-            alert("Second version change transaction unexpected complete");
-            done();
-        }
-
-        tx.onerror = function(event) {
-            alert("Second version change transaction error - " + event);
-        }
-    }
-}
-
-function continueTest2()
-{
-    var request = window.indexedDB.open("AbortedPutTestDatabase", 2);
-
-    request.onupgradeneeded = function(event) {
-        alert("Third upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-    
-        var tx = request.transaction;
-        var db = event.target.result;
-
-        alert(tx + " - " + tx.mode);
-        alert(db);
-
-        var os1 = tx.objectStore("TestObjectStore1");
-        var os2 = tx.objectStore("TestObjectStore2");
-        var getRequest1 = os1.get("foo");
-        var getRequest2 = os2.get("far");
-    
-        getRequest1.onsuccess = function(event) {
-            alert("get1 'foo' succeeded - value was '" + getRequest1.result + "'");
-        }
-
-        getRequest1.onerror = function(event) {
-            alert("get1 'foo' unexpectedly failed - " + event);
-            done();
-        }
-
-        getRequest2.onsuccess = function(event) {
-            alert("get2 'far' succeeded - value was '" + getRequest2.result + "'");
-        }
-
-        getRequest2.onerror = function(event) {
-            alert("get2 'far' unexpectedly failed - " + event);
-            done();
-        }
-        
-        tx.onabort = function(event) {
-            alert("Third version change transaction unexpected abort");
-            done();
-        }
-
-        tx.oncomplete = function(event) {
-            alert("Third version change transaction complete");
-            done();
-        }
-
-        tx.onerror = function(event) {
-            alert("Third version change transaction unexpected error - " + event);
-            done();
-        }
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/aborted-put.js"></script>
+</body>
+</html>
index 64f0f34..31daa83 100644 (file)
@@ -1,3 +1,8 @@
+This test creates a new database with an objectstore that autoincrements. 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.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: Initial upgrade needed: Old version - 0 New version - 1
 ALERT: Initial upgrade versionchange transaction complete
 ALERT: Opening readwrite transaction to bump the key generator, but it will be aborted
@@ -24,9 +29,7 @@ ALERT: Key used for put was 10
 ALERT: Key used for put was 11
 ALERT: Key used for put was 12
 ALERT: readwrite transaction complete
-ALERT: Done
-This test creates a new database with an objectstore that autoincrements.
-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.
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 73cb8c2..b4bb929 100644 (file)
@@ -1,159 +1,9 @@
-This test creates a new database with an objectstore that autoincrements.<br>
-It then puts some things in that object store, checking the keys that were used.<br>
-But it then aborts that transaction.<br>
-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.<br>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open("AutoincrementAbortDatabase", 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore('TestObjectStore', { autoIncrement: true });
-    
-    versionTransaction.onabort = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected abort");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert("Initial upgrade versionchange transaction complete");
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function putChecker(event) {
-    alert("Key used for put was " + event.target.result);
-}
-
-function continueTest1()
-{
-    alert("Opening readwrite transaction to bump the key generator, but it will be aborted");
-    var transaction = database.transaction('TestObjectStore', "readwrite");
-    var objectStore = transaction.objectStore('TestObjectStore');
-    
-    var request = objectStore.put("bar1");
-    request.onsuccess = putChecker;
-    var request = objectStore.put("bar2");
-    request.onsuccess = putChecker;
-    var request = objectStore.put("bar3");
-    request.onsuccess = putChecker;
-    var request = objectStore.put("bar4");
-    request.onsuccess = putChecker;
-    var request = objectStore.put("bar5");
-    request.onsuccess = putChecker;
-    var request = objectStore.put("bar6");
-    request.onsuccess = function(event) {
-        putChecker(event);
-        transaction.abort();
-    }
-    
-    transaction.onabort = function(event) {
-        alert("readwrite transaction abort");
-        continueTest2();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert("readwrite transaction unexpected complete");
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert("readwrite transaction unexpected error");
-        done();
-    }
-}
-
-function continueTest2()
-{
-    alert("Opening readwrite transaction to make sure the key generator had successfully reverted");
-    
-    var transaction = database.transaction('TestObjectStore', "readwrite");
-    var objectStore = transaction.objectStore('TestObjectStore');
-
-    var request = objectStore.put("bar1");
-    request.onsuccess = putChecker;
-    var request = objectStore.put("bar2");
-    request.onsuccess = putChecker;
-    var request = objectStore.put("bar3");
-    request.onsuccess = putChecker;
-    var request = objectStore.put("bar4");
-    request.onsuccess = putChecker;
-    var request = objectStore.put("bar5");
-    request.onsuccess = putChecker;
-    var request = objectStore.put("bar6");
-    request.onsuccess = putChecker;
-
-    transaction.onabort = function(event) {
-        alert("readwrite transaction unexpected abort");
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert("readwrite transaction complete");
-        continueTest3();
-    }
-
-    transaction.onerror = function(event) {
-        alert("readwrite transaction unexpected error");
-        done();
-    }
-}
-
-function continueTest3()
-{
-    alert("Opening readwrite transaction to make sure the key generator picks up where it should've left off");
-    
-    var transaction = database.transaction('TestObjectStore', "readwrite");
-    var objectStore = transaction.objectStore('TestObjectStore');
-
-    var request = objectStore.put("bar1");
-    request.onsuccess = putChecker;
-    var request = objectStore.put("bar2");
-    request.onsuccess = putChecker;
-    var request = objectStore.put("bar3");
-    request.onsuccess = putChecker;
-    var request = objectStore.put("bar4");
-    request.onsuccess = putChecker;
-    var request = objectStore.put("bar5");
-    request.onsuccess = putChecker;
-    var request = objectStore.put("bar6");
-    request.onsuccess = putChecker;
-
-    transaction.onabort = function(event) {
-        alert("readwrite transaction unexpected abort");
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert("readwrite transaction complete");
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert("readwrite transaction unexpected error");
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/autoincrement-abort.js"></script>
+</body>
+</html>
index 32e942e..9b166a4 100644 (file)
@@ -1,3 +1,8 @@
+This test does basic testing of IDBObjectStore.add(), making sure that an attempt to overwrite an already-existing key fails with the appropriate error.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: Upgrade needed: Old version - 0 New version - 1
 ALERT: [object IDBTransaction] - versionchange
 ALERT: [object IDBDatabase]
@@ -5,6 +10,7 @@ ALERT: put 1 succeeded - key was 'foo'
 ALERT: put 2 failed - error
 ALERT: get succeeded - key was 'bar'
 ALERT: version change transaction completed
-ALERT: Done
-This test does basic testing of IDBObjectStore.add(), making sure that an attempt to overwrite an already-existing key fails with the appropriate error.
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 391e0cb..57d464a 100644 (file)
@@ -1,78 +1,9 @@
-This test does basic testing of IDBObjectStore.add(), making sure that an attempt to overwrite an already-existing key fails with the appropriate error.<br>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-var request = window.indexedDB.open("NewDatabaseAddTestDatabase");
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-request.onupgradeneeded = function(event) {
-    alert("Upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-    
-    var tx = request.transaction;
-    var db = event.target.result;
-
-    alert(tx + " - " + tx.mode);
-    alert(db);
-
-    var os = db.createObjectStore("TestObjectStore");
-    var putRequest1 = os.add("bar", "foo");
-    var putRequest2 = os.add("baz", "foo");
-
-    putRequest1.onsuccess = function(event) {
-        alert("put 1 succeeded - key was '" + putRequest1.result + "'");
-    }
-
-    putRequest1.onerror = function(event) {
-        alert("put 1 unexpectedly failed - " + event);
-        done();
-    }
-
-    putRequest2.onsuccess = function(event) {
-        alert("put 2 unexpectedly succeeded - key was '" + putRequest2.result + "'");
-        done();
-    }
-
-    putRequest2.onerror = function(event) {
-        alert("put 2 failed - " + event.type);
-
-        var getRequest = os.get("foo");
-        
-        getRequest.onsuccess = function(event) {
-            alert("get succeeded - key was '" + getRequest.result + "'");
-        }
-
-        getRequest.onerror = function(event) {
-            alert("get unexpectedly failed - " + event.type);
-            done();
-        }
-        
-        event.stopPropagation();
-        event.preventDefault();
-    }
-        
-    tx.onabort = function(event) {
-        alert("version change transaction unexpected abort");
-        done();
-    }
-
-    tx.oncomplete = function(event) {
-        alert("version change transaction completed");
-        done();
-    }
-
-    tx.onerror = function(event) {
-        alert("version change transaction unexpected error - " + event);
-        done();
-    }
-}
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/basic-add.js"></script>
+</body>
+</html>
index 6e4a33b..209752e 100644 (file)
@@ -4,5 +4,7 @@ ALERT: [object IDBDatabase]
 ALERT: put succeeded - key was 'foo'
 ALERT: get succeeded - value was 'bar'
 ALERT: version change transaction completed
-ALERT: Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 2c57061..a56b7ee 100644 (file)
@@ -1,64 +1,9 @@
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-var request = window.indexedDB.open("NewDatabasePutTestDatabase");
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-request.onupgradeneeded = function(event) {
-    alert("Upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-    
-    var tx = request.transaction;
-    var db = event.target.result;
-
-    alert(tx + " - " + tx.mode);
-    alert(db);
-
-    var os = db.createObjectStore("TestObjectStore");
-    var putRequest = os.put("bar", "foo");
-    
-    putRequest.onsuccess = function(event) {
-        alert("put succeeded - key was '" + putRequest.result + "'");
-        
-        var getRequest = os.get("foo");
-        getRequest.onsuccess = function(event) {
-            alert("get succeeded - value was '" + getRequest.result + "'");
-        }
-
-        getRequest.onerror = function(event) {
-            alert("get unexpectedly failed - " + event);
-            done();
-        }
-    }
-
-    putRequest.onerror = function(event) {
-        alert("put unexpectedly failed - " + event);
-        done();
-    }
-    
-    tx.onabort = function(event) {
-        alert("version change transaction unexpected abort");
-        done();
-    }
-
-    tx.oncomplete = function(event) {
-        alert("version change transaction completed");
-        done();
-    }
-
-    tx.onerror = function(event) {
-        alert("version change transaction unexpected error - " + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/basic-put.js"></script>
+</body>
+</html>
index ec0adaa..7d41d7f 100644 (file)
@@ -1,4 +1,8 @@
 This tests some obvious failures that can happen while calling IDBObjectStore.createIndex().
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 Failed to create index with null name
 Failed to create index with invalid key path
@@ -9,5 +13,7 @@ Failed to create index while the transaction is inactive
 Initial upgrade versionchange transaction complete
 Failed to create index outside of a version change transaction
 readonly transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 1942ac3..c603048 100644 (file)
-This tests some obvious failures that can happen while calling IDBObjectStore.createIndex().<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var createRequest = window.indexedDB.open("IDBObjectStoreCreateIndexFailuresDatabase", 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-
-    try {
-        objectStore.createIndex(null, "foo");
-    } catch(e) {
-        log("Failed to create index with null name");
-    }
-    
-    try {
-        objectStore.createIndex("TestIndex1", null);
-    } catch(e) {
-        log("Failed to create index with invalid key path");
-    }
-    
-    database.deleteObjectStore("TestObjectStore");
-    try {
-        objectStore.createIndex("TestIndex2", "foo");
-    } catch(e) {
-        log("Failed to create index on a deleted object store");
-    }
-
-    objectStore = database.createObjectStore("TestObjectStore");
-    
-    try {
-        objectStore.createIndex("TestIndex3", ["foo", "bar"], { multiEntry: true });
-    } catch(e) {
-        log("Failed to create multi-entry index with an array key path");
-    }
-    
-    objectStore.createIndex("TestIndex4", "foo");
-    try {
-        objectStore.createIndex("TestIndex4", "foo");
-    } catch(e) {
-        log("Failed to create index that already exists");
-    }
-
-    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
-    var canFinish = false;
-    var spinGet = function() { 
-        objectStore.get("foo").onsuccess = function() {
-            if (!canFinish)
-                spinGet();
-        }
-    }
-    spinGet();
-
-    var createWhileInactive = function() {
-        try {
-            objectStore.createIndex("TestIndex5", "foo");
-        } catch(e) {
-            log("Failed to create index while the transaction is inactive");
-        }
-        canFinish = true;
-    }
-    
-    setTimeout(createWhileInactive, 0);
-    
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction("TestObjectStore", "readwrite");
-    var objectStore = transaction.objectStore("TestObjectStore");
-
-    try {
-        objectStore.createIndex("TestIndex6", "foo");
-    } catch(e) {
-        log("Failed to create index outside of a version change transaction");
-    }
-        
-    transaction.onabort = function(event) {
-        log("readonly transaction unexpected abort" + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log("readonly transaction complete");
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log("readonly transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/create-index-failures.js"></script>
+</body>
+</html>
index 39cfd05..44f3e1b 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: Initial upgrade needed: Old version - 0 New version - 1
 ALERT: Object store names:
 ALERT: FirstAbortedObjectStore
@@ -21,7 +26,7 @@ ALERT: Fourth upgrade needed: Old version - 2 New version - 3
 ALERT: Object store names:
 ALERT: FirstCommittedObjectStore
 ALERT: SecondCommittedObjectStore
-ALERT: Done
-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.
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 10ef1b9..03ca9ba 100644 (file)
@@ -1,138 +1,9 @@
-This test starts some version change transactions, creates some object stores, and variably commits or aborts the version change transactions.<br>
-At various stages it verifies the object stores in the database are as-expected.<br>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function dumpObjectStores(database) {
-    var list = database.objectStoreNames;
-    alert("Object store names:");
-    for (var i = 0; i < list.length; ++i) { 
-        alert(list[i]);
-    }
-}
-
-var createRequest = window.indexedDB.open("CreateObjectStoreTestDatabase", 1);
-
-createRequest.onupgradeneeded = function(event) {
-    alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore("FirstAbortedObjectStore");
-    var request = objectStore.put("foo", "bar");
-
-    request.onsuccess = function(event) {
-        alert("Put succeeded");
-        versionTransaction.abort();
-    }
-    request.onerror = function(event) {
-        alert("Put failed - " + event);
-        done();
-    }
-    
-    dumpObjectStores(database);    
-    
-    versionTransaction.onabort = function(event) {
-        alert("Initial upgrade versionchange transaction aborted");
-        dumpObjectStores(database);
-        continueTest1();
-        database.close();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected complete");
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert("Initial upgrade versionchange transaction error " + event);
-    }
-}
-
-function continueTest1()
-{
-    createRequest = window.indexedDB.open("CreateObjectStoreTestDatabase", 1);
-
-    createRequest.onupgradeneeded = function(event) {
-        alert("Second upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-        var versionTransaction = createRequest.transaction;
-        var database = event.target.result;
-        dumpObjectStores(database);
-        var objectStore = database.createObjectStore("FirstCommittedObjectStore");
-
-        versionTransaction.onabort = function(event) {
-            alert("Second upgrade versionchange transaction unexpected abort");
-            done();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            alert("Second upgrade versionchange transaction complete");
-            dumpObjectStores(database);
-            continueTest2();
-            database.close();
-        }
-
-        versionTransaction.onerror = function(event) {
-            alert("Second upgrade versionchange transaction unexpected error" + event);
-            done();
-        }
-    }
-}
-
-function continueTest2()
-{
-    createRequest = window.indexedDB.open("CreateObjectStoreTestDatabase", 2);
-
-    createRequest.onupgradeneeded = function(event) {
-        alert("Third upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-        var versionTransaction = createRequest.transaction;
-        var database = event.target.result;
-        var objectStore = database.createObjectStore("SecondCommittedObjectStore");
-
-        dumpObjectStores(database);    
-    
-        versionTransaction.onabort = function(event) {
-            alert("Third upgrade versionchange transaction unexpected abort");
-            done();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            alert("Third upgrade versionchange transaction complete");
-            dumpObjectStores(database);
-            database.close(); 
-            continueTest3();
-        }
-
-        versionTransaction.onerror = function(event) {
-            alert("Third upgrade versionchange transaction unexpected error" + event);
-            done();
-        }
-    }
-}
-
-function continueTest3()
-{
-    createRequest = window.indexedDB.open("CreateObjectStoreTestDatabase", 3);
-
-    createRequest.onupgradeneeded = function(event) {
-        alert("Fourth upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-        var database = event.target.result;
-        dumpObjectStores(database);
-        done();
-    }
-}
-
-</script>
\ No newline at end of file
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/createobjectstore-basic.js"></script>
+</body>
+</html>
index 1386b18..8e88aa4 100644 (file)
@@ -1,3 +1,8 @@
+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".
+
+
 ALERT: Initial upgrade needed: Old version - 0 New version - 1
 ALERT: 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.
 ALERT: Object store names:
@@ -20,5 +25,7 @@ ALERT: TestObjectStore1
 ALERT: Failed to create object store outside of onupgradeneeded: Error: Failed to execute 'createObjectStore' on 'IDBDatabase': The database is not running a version change transaction.
 ALERT: Object store names:
 ALERT: TestObjectStore1
-ALERT: Done
-This test exercises the obvious ways that IDBDatabase.createObjectStore can fail.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
index cbab690..7d01e27 100644 (file)
@@ -1,103 +1,9 @@
-This test exercises the obvious ways that IDBDatabase.createObjectStore can fail.
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function dumpObjectStores(database) {
-    var list = database.objectStoreNames;
-    alert("Object store names:");
-    for (var i = 0; i < list.length; ++i) { 
-        alert(list[i]);
-    }
-}
-
-var createRequest = window.indexedDB.open("CreateObjectStoreFailuresTestDatabase", 1);
-var database;
-var versionTransaction;
-
-createRequest.onupgradeneeded = function(event) {
-    alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    versionTransaction = createRequest.transaction;
-    database = event.target.result;
-
-    try {
-        var objectStore = database.createObjectStore('TestObjectStore', { autoIncrement: true , keyPath: "" });
-    } catch (e) {
-        alert("Failed to create object store with both autoincrement and an empty keypath: " + e);
-        dumpObjectStores(database);
-    }
-
-    try {
-        var objectStore = database.createObjectStore('TestObjectStore', { autoIncrement: true , keyPath: ['foo'] });
-    } catch (e) {
-        alert("Failed to create object store with both autoincrement and a sequence keypath: " + e);
-        dumpObjectStores(database);
-    }
-    
-    try {
-        var objectStore = database.createObjectStore('TestObjectStore', { keyPath: "'foo bar'"});
-    } catch (e) {
-        alert("Failed to create object store with invalid keyPath: " + e);
-        dumpObjectStores(database);
-    }
-
-    database.createObjectStore("TestObjectStore1");
-    alert("Actually created an object store");
-    dumpObjectStores(database);
-    
-    try {
-        database.createObjectStore("TestObjectStore1");
-    } catch(e) {
-        alert("Failed to create TestObjectStore a second time: " + e);
-        dumpObjectStores(database);
-    }
-
-    versionTransaction.onabort = function(event) {
-        alert("Initial upgrade versionchange unexpected abort");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert("Initial upgrade versionchange transaction complete");
-        dumpObjectStores(database);
-
-        try {
-            database.createObjectStore("TestObjectStore2");
-        } catch(e) {
-            alert("Failed to create object store while there is no version change transaction: " + e);
-            dumpObjectStores(database);
-        }
-    
-        setTimeout(finishUp, 0);
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function finishUp()
-{
-    try {
-        database.createObjectStore("TestObjectStore99");
-    } catch(e) {
-        alert("Failed to create object store outside of onupgradeneeded: " + e);
-        dumpObjectStores(database);
-    }
-    
-    done();
-}
-
-</script>
\ No newline at end of file
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/createobjectstore-failures.js"></script>
+</body>
+</html>
index db18cd3..f938aa1 100644 (file)
@@ -1,4 +1,8 @@
 This tests basic IDBCursor functionality
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 Success opening cursor
 Cursor is: [object IDBCursorWithValue]
@@ -73,5 +77,7 @@ Cursor source is: [object IDBIndex] (TestIndex1)
 Cursor key is: Hello
 Cursor primary key is: foo
 Initial upgrade versionchange transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 58d463b..51c602e 100644 (file)
@@ -1,95 +1,10 @@
-This tests basic IDBCursor functionality<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var createRequest = window.indexedDB.open("Cursor1Database", 1);
-
-function logCursor(cursor)
-{
-    log("Cursor is: " + cursor);
-    log("Cursor direction is: " + cursor.direction);
-    log("Cursor source is: " + cursor.source + " (" + cursor.source.name + ")");    
-    log("Cursor key is: " + cursor.key);    
-    log("Cursor primary key is: " + cursor.primaryKey);    
-}
-
-function setupRequest(request)
-{
-    // FIXME: Right now (until https://bugs.webkit.org/show_bug.cgi?id=151196 is resolved) what should be successful cursor operations will actually always fail.
-    request.onsuccess = function() {
-        log("Success opening cursor");
-        logCursor(request.result);  
-    }
-    request.onerror = function(e) {
-        log("Error opening cursor (expected for now)");
-        logCursor(request.result);
-        e.stopPropagation();
-    } 
-}
-
-var objectStore;
-var index;
-
-function testCursorDirection(direction)
-{
-    var range = IDBKeyRange.lowerBound(-Infinity);
-    var request = objectStore.openCursor(range, direction);
-    setupRequest(request);
-    request = index.openCursor(range, direction);
-    setupRequest(request);
-    request = index.openKeyCursor(range, direction);
-    setupRequest(request);
-}
-
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    objectStore = database.createObjectStore("TestObjectStore");
-    index = objectStore.createIndex("TestIndex1", "bar");
-
-    for (var i = 0; i < 10; ++i) {
-        objectStore.put("Record " + i, i);
-    }
-    objectStore.put({ bar: "Hello" }, "foo");
-
-    testCursorDirection("next");
-    testCursorDirection("nextunique");
-    testCursorDirection("prev");
-    testCursorDirection("prevunique");
-      
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/cursor-1.js"></script>
+</body>
+</html>
index 2ea46dd..98cf577 100644 (file)
@@ -1,4 +1,8 @@
 This test checks basic functionality walking a "next" and "prev" cursor on an object store with some records.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 Success iterating next cursor
 Cursor is: [object IDBCursorWithValue]
@@ -155,5 +159,7 @@ Cursor key is: 0
 Cursor value is: Record 0
 Cursor primary key is: 0
 Initial upgrade versionchange transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 4b0affb..e214bbe 100644 (file)
@@ -1,88 +1,10 @@
-This test checks basic functionality walking a "next" and "prev" cursor on an object store with some records.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var createRequest = window.indexedDB.open("Cursor2Database", 1);
-
-function logCursor(cursor)
-{
-    log("Cursor is: " + cursor);
-    log("Cursor direction is: " + cursor.direction);
-    log("Cursor source is: " + cursor.source + " (" + cursor.source.name + ")");    
-    log("Cursor key is: " + cursor.key);    
-    log("Cursor value is: " + cursor.value);    
-    log("Cursor primary key is: " + cursor.primaryKey);    
-}
-
-var objectStore;
-var shouldStartPrevious = true;
-function setupRequest(request)
-{
-    request.onsuccess = function() {
-        if (!request.result) {
-            if (shouldStartPrevious) {
-                setupRequest(objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), "prev"));
-                shouldStartPrevious = false;
-            }
-            return;
-        }
-
-        log("Success iterating " + request.result.direction + " cursor");
-        logCursor(request.result);
-        request.result.continue();
-    }
-
-    request.onerror = function(e) {
-        log("Error iterating cursor");
-        done();
-    } 
-}
-
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    objectStore = database.createObjectStore("TestObjectStore");
-
-    for (var i = 0; i < 10; ++i) {
-        objectStore.put("Record " + i, i);
-    }
-    objectStore.put({ bar: "Hello" }, "foo");
-    
-    setupRequest(objectStore.openCursor());
-      
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/cursor-2.js"></script>
+</body>
+</html>
index 27b82c6..5500fc5 100644 (file)
@@ -1,4 +1,8 @@
-This test various uses of advance() and continue() on a "next" cursor".
+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".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 Success iterating cursor
 Cursor is: [object IDBCursorWithValue]
@@ -71,5 +75,7 @@ Cursor key is: 9
 Cursor value is: Record 9
 Cursor primary key is: 9
 Initial upgrade versionchange transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index b25e5a6..2a7691f 100644 (file)
@@ -1,98 +1,10 @@
-This test various uses of advance() and continue() on a "next" cursor".<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var createRequest = window.indexedDB.open("Cursor3Database", 1);
-
-function logCursor(cursor)
-{
-    log("Cursor is: " + cursor);
-    log("Cursor direction is: " + cursor.direction);
-    log("Cursor source is: " + cursor.source + " (" + cursor.source.name + ")");    
-    log("Cursor key is: " + cursor.key);    
-    log("Cursor value is: " + cursor.value);    
-    log("Cursor primary key is: " + cursor.primaryKey);    
-}
-
-var objectStore;
-
-function setupRequest1(request)
-{
-    request.onsuccess = function() {
-        if (!request.result) {
-            setupRequest2(objectStore.openCursor());
-            return;
-        }
-        log("Success iterating cursor");
-        logCursor(request.result);
-        request.result.continue(request.result.key + 2);
-    }
-    request.onerror = function(e) {
-        log("Error iterating cursor");
-        done();
-    } 
-}
-
-function setupRequest2(request)
-{
-    request.onsuccess = function() {
-        if (!request.result)
-            return;
-        log("Success iterating cursor");
-        logCursor(request.result);
-        request.result.advance(3);        
-    }
-    request.onerror = function(e) {
-        log("Error iterating cursor");
-        done();
-    } 
-}
-
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    objectStore = database.createObjectStore("TestObjectStore");
-
-    for (var i = 0; i < 10; ++i) {
-        objectStore.put("Record " + i, i);
-    }
-    objectStore.put({ bar: "Hello" }, "foo");
-    
-    setupRequest1(objectStore.openCursor());
-      
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/cursor-3.js"></script>
+</body>
+</html>
index 8589528..7ead92b 100644 (file)
@@ -1,4 +1,8 @@
-This test various uses of advance() and continue() on a "prev" cursor".
+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".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 Success iterating cursor
 Cursor is: [object IDBCursorWithValue]
@@ -64,5 +68,7 @@ Cursor key is: 0
 Cursor value is: Record 0
 Cursor primary key is: 0
 Initial upgrade versionchange transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 3809922..e33ae26 100644 (file)
@@ -1,97 +1,10 @@
-This test various uses of advance() and continue() on a "prev" cursor".<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var createRequest = window.indexedDB.open("Cursor4Database", 1);
-
-function logCursor(cursor)
-{
-    log("Cursor is: " + cursor);
-    log("Cursor direction is: " + cursor.direction);
-    log("Cursor source is: " + cursor.source + " (" + cursor.source.name + ")");    
-    log("Cursor key is: " + cursor.key);    
-    log("Cursor value is: " + cursor.value);    
-    log("Cursor primary key is: " + cursor.primaryKey);    
-}
-
-var objectStore;
-
-function setupRequest1(request)
-{
-    request.onsuccess = function() {
-        if (!request.result) {
-            setupRequest2(objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), "prev"));
-            return;
-        }
-        log("Success iterating cursor");
-        logCursor(request.result);
-        request.result.continue(request.result.key - 2);
-    }
-    request.onerror = function(e) {
-        log("Error iterating cursor");
-        done();
-    } 
-}
-
-function setupRequest2(request)
-{
-    request.onsuccess = function() {
-        if (!request.result)
-            return;
-        log("Success iterating cursor");
-        logCursor(request.result);
-        request.result.advance(3);        
-    }
-    request.onerror = function(e) {
-        log("Error iterating cursor");
-        done();
-    } 
-}
-
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    objectStore = database.createObjectStore("TestObjectStore");
-
-    for (var i = 0; i < 10; ++i) {
-        objectStore.put("Record " + i, i);
-    }
-        
-    setupRequest1(objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), "prev"));
-      
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/cursor-4.js"></script>
+</body>
+</html>
index 14a22f6..89efd3f 100644 (file)
@@ -1,9 +1,15 @@
 This tests iterating a "next" cursor in a read-write transaction while changing records.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 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.
 Cursor iterated to key 1
 Cursor iterated to key 2 with value 'Scary new actual record!'
 Initial upgrade versionchange transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 8192c0f..06a116c 100644 (file)
@@ -1,77 +1,10 @@
-This tests iterating a "next" cursor in a read-write transaction while changing records.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var createRequest = window.indexedDB.open("Cursor5Database", 1);
-
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-
-    for (var i = 0; i < 3; ++i)
-        objectStore.put("Record " + i, i);
-    
-    var request = objectStore.openCursor();
-    request.onsuccess = function() {
-        log("Cursor open at key " + request.result.key);
-
-        // This tests deleting the current record out of underneath the cursor.
-        // Its current key should be 0, after an iteration its next key should be 1.
-        objectStore.delete(0).onsuccess = function() {
-            log("Record 0 deleted, even though that's where the cursor currently points.");
-        }
-        
-        // Now that cursor iteration has begun, manually delete and then replace a record 
-        // that will eventually be iterated to, making sure the new value is picked up. 
-        objectStore.delete(2);
-        objectStore.put("Scary new actual record!", 2);
-    
-        request.onsuccess = function() {
-            log("Cursor iterated to key " + request.result.key);
-            
-            request.onsuccess = function() {
-                log("Cursor iterated to key " + request.result.key + " with value '" + request.result.value + "'");
-            }
-            
-            request.result.continue();
-        }
-        request.result.continue();
-    }
-          
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/cursor-5.js"></script>
+</body>
+</html>
index c2aa40c..0849cd7 100644 (file)
@@ -1,9 +1,15 @@
 This tests iterating a "prev" cursor in a read-write transaction while changing records.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 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.
 Cursor iterated to key 1
 Cursor iterated to key 0 with value 'Scary new actual record!'
 Initial upgrade versionchange transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index b1aa0ea..4563041 100644 (file)
@@ -1,78 +1,10 @@
-This tests iterating a "prev" cursor in a read-write transaction while changing records.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var createRequest = window.indexedDB.open("Cursor6Database", 1);
-
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-
-    for (var i = 0; i < 3; ++i)
-        objectStore.put("Record " + i, i);
-    
-    var request = objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), "prev");
-    request.onsuccess = function() {
-        log("Cursor open at key " + request.result.key);
-
-        // This tests deleting the current record out of underneath the cursor.
-        // Its current key should be 2, after an iteration its next key should be 1.
-        objectStore.delete(2).onsuccess = function() {
-            log("Record 2 deleted, even though that's where the cursor currently points.");
-        }
-        
-        // Now that cursor iteration has begun, manually delete and then replace a record 
-        // that will eventually be iterated to, making sure the new value is picked up. 
-        objectStore.delete(0);
-        objectStore.put("Scary new actual record!", 0);
-    
-        request.onsuccess = function() {
-            log("Cursor iterated to key " + request.result.key);
-            
-            request.onsuccess = function() {
-                log("Cursor iterated to key " + request.result.key + " with value '" + request.result.value + "'");
-            }
-            
-            request.result.continue();
-        }
-        request.result.continue();
-    }
-          
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/cursor-6.js"></script>
+</body>
+</html>
index 9bd6fbc..28eb11e 100644 (file)
@@ -1,8 +1,14 @@
 This tests iterating a "next" cursor in a read-write transaction combined with clearing the object store.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 Cursor open at key 0
 Object store cleared.
 Cursor iterated to key 100
 Initial upgrade versionchange transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 1357ed3..421e8a7 100644 (file)
@@ -1,71 +1,10 @@
-This tests iterating a "next" cursor in a read-write transaction combined with clearing the object store.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var createRequest = window.indexedDB.open("Cursor7Database", 1);
-
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-
-    for (var i = 0; i < 3; ++i)
-        objectStore.put("Record " + i, i);
-    
-    var request = objectStore.openCursor();
-    request.onsuccess = function() {
-        log("Cursor open at key " + request.result.key);
-
-        // This tests deleting the current record out of underneath the cursor.
-        // Its current key should be 0, after an iteration its next key should be 1.
-        objectStore.clear().onsuccess = function() {
-            log("Object store cleared.");
-        }
-        
-        // The cursor is currently on key 0, which no longer exists.
-        // It's next key would have been 1, but the object store has been cleared.
-        // Whatever key we put in the object store that is greater than 0 will be the actual next key.
-        objectStore.put("Record 100", 100);
-    
-        request.onsuccess = function() {
-            log("Cursor iterated to key " + request.result.key);
-        }
-        request.result.continue();
-    }
-          
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/cursor-7.js"></script>
+</body>
+</html>
index f370102..d6ac5c2 100644 (file)
@@ -1,8 +1,14 @@
 This tests iterating a "prev" cursor in a read-write transaction while changing records.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 Cursor open at key 2
 Object store cleared.
 Cursor iterated to key -100
 Initial upgrade versionchange transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 3f3e95b..4af430e 100644 (file)
@@ -1,72 +1,10 @@
-This tests iterating a "prev" cursor in a read-write transaction while changing records.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var createRequest = window.indexedDB.open("Cursor8Database", 1);
-
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-
-    for (var i = 0; i < 3; ++i)
-        objectStore.put("Record " + i, i);
-    
-    var request = objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), "prev");
-    request.onsuccess = function() {
-        log("Cursor open at key " + request.result.key);
-
-        // This tests deleting the current record out of underneath the cursor.
-        // Its current key should be 0, after an iteration its next key should be 1.
-        objectStore.clear().onsuccess = function() {
-            log("Object store cleared.");
-        }
-        
-        // The cursor is currently on key 2, which no longer exists.
-        // It's next key would have been 1, but the object store has been cleared.
-        // Whatever key we put in the object store that is less than 2 will be the actual next key.
-        objectStore.put("Record -100", -100);
-    
-        request.onsuccess = function() {
-            log("Cursor iterated to key " + request.result.key);
-        }
-        request.result.continue();
-    }
-          
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/cursor-8.js"></script>
+</body>
+</html>
index 1b7eb01..42f914e 100644 (file)
@@ -1,3 +1,8 @@
+This tests using Date objects as keys and values.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: Initial upgrade needed: Old version - 0 New version - 1
 ALERT: Initial upgrade versionchange transaction complete
 ALERT: Success getting key 'Fri Nov 04 1955 17:00:00 GMT-0700 (PDT)' of type object, result is 'Flux capacitor' of type string
@@ -13,5 +18,7 @@ ALERT: Result is a Date object, btw
 ALERT: Success getting key 'c' of type string, result is 'Wed Oct 21 2015 09:00:00 GMT-0700 (PDT)' of type object
 ALERT: Result is a Date object, btw
 ALERT: readonly transaction complete
-ALERT: Done
-This tests using Date objects as keys and values.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
index f589348..a1d0950 100644 (file)
@@ -1,100 +1,9 @@
-This tests using Date objects as keys and values.
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-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) {
-    alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-
-    objectStore.put("Flux capacitor", date1);
-    objectStore.put("Fish under the sea", date2);
-    objectStore.put("Hoverboards", date3);
-    
-    objectStore.put(date1, "a");
-    objectStore.put(date2, "b");
-    objectStore.put(date3, "c");
-    
-    versionTransaction.onabort = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert("Initial upgrade versionchange transaction complete");
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-var objectStore;
-
-function testGet(key) {
-    var request = objectStore.get(key);
-    request.onsuccess = function()
-    {
-        alert("Success getting key '" + key + "' of type " + typeof(key) + ", result is '" + request.result + "' of type " + typeof(request.result));
-        if (key instanceof Date)
-            alert("Key is a Date object, btw");
-        if (request.result instanceof Date)
-            alert("Result is a Date object, btw");
-    }
-    request.onerror = function()
-    {
-        alert("Expected error getting key '" + key + "'");
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction("TestObjectStore", "readonly");
-    objectStore = transaction.objectStore("TestObjectStore");
-    
-    testGet(date1);
-    testGet(date2);
-    testGet(date3);
-    testGet("a");
-    testGet("b");
-    testGet("c");
-    
-    transaction.onabort = function(event) {
-        alert("readonly transaction unexpected abort" + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert("readonly transaction complete");
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert("readonly transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/date-basic.js"></script>
+</body>
+</html>
index 8b1590e..e611894 100644 (file)
@@ -1,4 +1,8 @@
 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.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Initial upgrade old version - 0 new version - 1
 Version change complete
 Requesting deleteDatabase
@@ -9,5 +13,7 @@ Recreating database to make sure it's new and empty
 Second upgrade old version - 0 new version - 1
 Unable to get object store in second upgrade transaction (which is correct because it should not be there)
 Second database upgrade success
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index d85e3dc..613db69 100644 (file)
-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.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var request = window.indexedDB.open("DeleteDatabase1TestDatabase");
-request.onsuccess = function()
-{
-    log("open db success");
-}
-request.onerror = function(e)
-{
-    log("Unexpected error");
-       done();
-}
-
-request.onupgradeneeded = function(e)
-{
-    log("Initial upgrade old version - " + e.oldVersion + " new version - " + e.newVersion);
-    
-    var versionTransaction = request.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-    objectStore.put("This is a record", 1);
-        
-    request.transaction.oncomplete = function()
-    {
-        log("Version change complete");
-        database.onversionchange = function(e)
-        {
-            log("First connection received versionchange event: oldVersion " + e.oldVersion + ", newVersion " + e.newVersion);
-            database.close();
-        }
-        continueTest1();
-    }
-    request.transaction.onabort = function()
-    {
-        log("Version change unexpected abort");
-        done();
-    }
-    request.transaction.onerror = function()
-    {
-        log("Version change unexpected error");
-        done();
-    }
-}
-
-function continueTest1()
-{
-    log("Requesting deleteDatabase");
-    var request = window.indexedDB.deleteDatabase("DeleteDatabase1TestDatabase");
-    request.onsuccess = function(e)
-    {
-        log("Delete database success: oldVersion " + e.oldVersion + ", newVersion " + e.newVersion);
-        continueTest2();
-    }
-    request.onerror = function(e)
-    {
-        log("Delete database unexpected error");
-        done();
-    }
-    request.onupgradeneeded = function(e)
-    {
-        log("Delete database unexpected upgradeneeded");
-       done();
-    }
-}
-
-function continueTest2()
-{
-    log("Recreating database to make sure it's new and empty");
-    var request = window.indexedDB.open("DeleteDatabase1TestDatabase");
-
-    request.onupgradeneeded = function(e)
-    {
-        log("Second upgrade old version - " + e.oldVersion + " new version - " + e.newVersion);
-        var versionTransaction = request.transaction;
-        
-        try {
-            var objectStore = versionTransaction.objectStore("TestObjectStore");
-        } catch(e) {
-            log("Unable to get object store in second upgrade transaction (which is correct because it should not be there)");
-        }
-
-        versionTransaction.oncomplete = function(e)
-        {
-            log("Second database upgrade success");
-            done();
-        }
-        
-        versionTransaction.onabort = function(e)
-        {
-            log("Second database upgrade unexpected abort");
-            done();
-        }
-            
-        versionTransaction.onerror = function(e)
-        {
-            log("Second database upgrade unexpected error");
-            done();
-        }
-    }
-
-    request.onsuccess = function(e)
-    {
-        log("Second database opening unexpected success");
-        done();
-    }
-    
-    request.onerror = function(e)
-    {
-        log("Second database opening unexpected error");
-        done();
-    }
-}
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/deletedatabase-1.js"></script>
+</body>
+</html>
index 4d78a07..b92c73f 100644 (file)
@@ -1,5 +1,8 @@
-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.
+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.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Initial upgrade old version - 0 new version - 1
 Requesting deleteDatabase
 First connection received versionchange event: oldVersion 1, newVersion null
@@ -10,5 +13,7 @@ Recreating database to make sure it's new and empty
 Second upgrade old version - 0 new version - 1
 Unable to get object store in second upgrade transaction (which is correct because it should not be there)
 Second database upgrade success
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index b490589..65742ff 100644 (file)
-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.<br>
-That open connection also has an in-progress transaction at the time it gets the versionChange event.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var stopSpinning = false;
-
-var request = window.indexedDB.open("DeleteDatabase2TestDatabase");
-request.onsuccess = function()
-{
-    log("open db success");
-}
-request.onerror = function(e)
-{
-    log("Open request error: " + request.error.name);
-}
-
-request.onupgradeneeded = function(e)
-{
-    log("Initial upgrade old version - " + e.oldVersion + " new version - " + e.newVersion);
-    
-    var versionTransaction = request.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-    objectStore.put("This is a record", 1);
-    
-    // Spin the transaction until told to stop spinning it.
-    var keepGoing = function() {
-        if (!stopSpinning)
-            objectStore.get(1).onsuccess = keepGoing;
-    }
-    objectStore.get(1).onsuccess = keepGoing;
-
-    database.onversionchange = function(e)
-    {
-        log("First connection received versionchange event: oldVersion " + e.oldVersion + ", newVersion " + e.newVersion);
-        
-        var shutErDown = function() {
-            database.close();
-            stopSpinning = true;
-        }
-        window.setTimeout(shutErDown, 0);
-    }
-        
-    request.transaction.oncomplete = function()
-    {
-        log("First version change complete");
-    }
-    
-    request.transaction.onabort = function()
-    {
-        log("Version change unexpected abort");
-        done();
-    }
-    request.transaction.onerror = function()
-    {
-        log("Version change unexpected error");
-        done();
-    }
-    
-    window.setTimeout(continueTest1, 0);
-}
-
-function continueTest1()
-{
-    log("Requesting deleteDatabase");
-    var request = window.indexedDB.deleteDatabase("DeleteDatabase2TestDatabase");
-    request.onsuccess = function(e)
-    {
-        log("Delete database success: oldVersion " + e.oldVersion + ", newVersion " + e.newVersion);
-        continueTest2();
-    }
-    request.onerror = function(e)
-    {
-        log("Delete database unexpected error");
-        done();
-    }
-    request.onupgradeneeded = function(e)
-    {
-        log("Delete database unexpected upgradeneeded");
-       done();
-    }
-}
-
-function continueTest2()
-{
-    log("Recreating database to make sure it's new and empty");
-    var request = window.indexedDB.open("DeleteDatabase2TestDatabase");
-
-    request.onupgradeneeded = function(e)
-    {
-        log("Second upgrade old version - " + e.oldVersion + " new version - " + e.newVersion);
-        var versionTransaction = request.transaction;
-        
-        try {
-            var objectStore = versionTransaction.objectStore("TestObjectStore");
-        } catch(e) {
-            log("Unable to get object store in second upgrade transaction (which is correct because it should not be there)");
-        }
-
-        versionTransaction.oncomplete = function(e)
-        {
-            log("Second database upgrade success");
-            done();
-        }
-        
-        versionTransaction.onabort = function(e)
-        {
-            log("Second database upgrade unexpected abort");
-            done();
-        }
-            
-        versionTransaction.onerror = function(e)
-        {
-            log("Second database upgrade unexpected error");
-            done();
-        }
-    }
-
-    request.onsuccess = function(e)
-    {
-        log("Second database opening unexpected success");
-        done();
-    }
-    
-    request.onerror = function(e)
-    {
-        log("Second database opening unexpected error");
-        done();
-    }
-}
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/deletedatabase-2.js"></script>
+</body>
+</html>
index c124ea8..5eda866 100644 (file)
@@ -1,3 +1,10 @@
-ALERT: TypeError: Not enough arguments
-ALERT: Done
 This test calls deleteDatabase on window.indexedDB with a null database name, making sure there is an exception.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+ALERT: TypeError: Not enough arguments
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
index 76f9ddb..ce846a7 100644 (file)
@@ -1,23 +1,9 @@
-This test calls deleteDatabase on window.indexedDB with a null database name, making sure there is an exception.
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-try {
-       var request = window.indexedDB.deleteDatabase();
-} catch (e) {
-       alert(e);
-}
-
-done();
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/deletedatabase-null-name-exception.js"></script>
+</body>
+</html>
index da0ec35..ba774f1 100644 (file)
@@ -1,5 +1,11 @@
+This test calls deleteDatabase on window.indexedDB and verifies that an event is fired at the request.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: [object IDBOpenDBRequest]
 ALERT: success
-ALERT: Done
-This test calls deleteDatabase on window.indexedDB and verifies that an event is fired at the request.
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 585daf4..57fe7e4 100644 (file)
@@ -1,31 +1,9 @@
-This test calls deleteDatabase on window.indexedDB and verifies that an event is fired at the request.<br>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var request = window.indexedDB.deleteDatabase("TestDatabase");
-
-request.onsuccess = function()
-{
-       alert("success");
-       done();
-}
-request.onerror = function(e)
-{
-       alert("error " + e);
-       done();
-}
-
-alert(request);
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/deletedatabase-request-event.js"></script>
+</body>
+</html>
index 5c6fecb..3d54123 100644 (file)
@@ -1,3 +1,10 @@
-ALERT: [object IDBOpenDBRequest]
-ALERT: Done
 This test calls deleteDatabase on window.indexedDB and verifies that an IDBOpenDBRequest object is returned.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+ALERT: [object IDBOpenDBRequest]
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
index b10355a..c3eaadd 100644 (file)
@@ -1,20 +1,9 @@
-This test calls deleteDatabase on window.indexedDB and verifies that an IDBOpenDBRequest object is returned.
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var request = window.indexedDB.deleteDatabase("TestDatabase");
-alert(request);
-
-done();
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/deletedatabase-request.js"></script>
+</body>
+</html>
index 9800d1d..4c02a88 100644 (file)
@@ -1,4 +1,8 @@
 This tests deleting an index and then committing the transaction.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 Count is: 2
 Cursor at record: A / 1
@@ -8,5 +12,7 @@ Initial upgrade versionchange transaction complete
 Object store has indexes:
 Unable to get index from object store (it shouldn't exist)
 Transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 98bfff1..f0309e2 100644 (file)
-This tests deleting an index and then committing the transaction.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var index;
-var objectStore;
-var database;
-
-function checkIndexValues()
-{
-    var countRequest = index.count();
-    countRequest.onsuccess = function() {
-        log("Count is: " + countRequest.result);
-    }
-
-    var cursorRequest = index.openCursor();
-    cursorRequest.onsuccess = function() {
-        var cursor = cursorRequest.result;
-        if (!cursor) {
-            objectStore.deleteIndex("TestIndex1");
-            log("Deleted the index");
-            return;
-        }
-
-        log("Cursor at record: " + cursor.key + " / " + cursor.primaryKey);
-        cursor.continue();
-    }
-    cursorRequest.onerror = function(e) {
-        log("Unexpected error opening or iterating cursor");
-        logCursor(cursorRequest.result);
-        done();
-    } 
-}
-
-var createRequest = window.indexedDB.open("DeleteIndex1Database", 1);
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    objectStore = database.createObjectStore("TestObjectStore");
-    objectStore.put({ bar: "A" }, 1);
-    objectStore.put({ bar: "A" }, 2);
-
-    index = objectStore.createIndex("TestIndex1", "bar");
-    
-    checkIndexValues();
-    
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected abort");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        continueTest();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function continueTest() {
-    var transaction = database.transaction("TestObjectStore");
-    objectStore = transaction.objectStore("TestObjectStore");
-
-    var names = objectStore.indexNames;
-    log("Object store has indexes:")
-    for (var i = 0; i < names.length; ++i)
-        log(names[i]);
-    
-    try {
-        objectStore.index("TestIndex1");
-    } catch(e) {
-        log("Unable to get index from object store (it shouldn't exist)");
-    }
-
-    transaction.onabort = function(event) {
-        log("Transaction unexpected abort");
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log("Transaction complete");
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log("Transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/deleteindex-1.js"></script>
+</body>
+</html>
index 4c7e83d..9919a81 100644 (file)
@@ -1,4 +1,8 @@
 This tests deleting an index and then aborting the transaction.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 Count is: 2
 Cursor at record: A / 1
@@ -13,5 +17,7 @@ Count is: 2
 Cursor at record: A / 1
 Cursor at record: A / 2
 Third upgrade versionchange transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index eddfaff..d8aebd0 100644 (file)
-This tests deleting an index and then aborting the transaction.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var index;
-var objectStore;
-var database;
-
-function checkIndexValues()
-{
-    var countRequest = index.count();
-    countRequest.onsuccess = function() {
-        log("Count is: " + countRequest.result);
-    }
-
-    var cursorRequest = index.openCursor();
-    cursorRequest.onsuccess = function() {
-        var cursor = cursorRequest.result;
-        if (!cursor)
-            return;
-
-        log("Cursor at record: " + cursor.key + " / " + cursor.primaryKey);
-        cursor.continue();
-    }
-    cursorRequest.onerror = function(e) {
-        log("Unexpected error opening or iterating cursor");
-        logCursor(cursorRequest.result);
-        done();
-    } 
-}
-
-var createRequest = window.indexedDB.open("DeleteIndex2Database", 1);
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    objectStore = database.createObjectStore("TestObjectStore");
-    objectStore.put({ bar: "A" }, 1);
-    objectStore.put({ bar: "A" }, 2);
-
-    index = objectStore.createIndex("TestIndex1", "bar");
-    
-    checkIndexValues();
-    
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected abort");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        database.close();
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function continueTest1() {
-    var createRequest = window.indexedDB.open("DeleteIndex2Database", 2);
-    createRequest.onupgradeneeded = function(event) {
-        log("Second upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-        database = event.target.result;
-        var versionTransaction = createRequest.transaction;
-        objectStore = versionTransaction.objectStore("TestObjectStore");
-        objectStore.deleteIndex("TestIndex1");
-        log("Deleted the index");
-        versionTransaction.abort();
-        log("Aborted the transaction");
-
-        versionTransaction.onabort = function(event) {
-            log("Second upgrade versionchange transaction abort");
-            database.close();
-            continueTest2();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            log("Second upgrade versionchange transaction unexpected complete");
-            done();
-        }
-
-        versionTransaction.onerror = function(event) {
-            log("Second upgrade versionchange transaction error " + event);
-        }
-    }
-}
-
-function continueTest2() {
-    var createRequest = window.indexedDB.open("DeleteIndex2Database", 3);
-    createRequest.onupgradeneeded = function(event) {
-        log("Third upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-        var versionTransaction = createRequest.transaction;
-        objectStore = versionTransaction.objectStore("TestObjectStore");
-        index = objectStore.index("TestIndex1");
-    
-        checkIndexValues();    
-        
-        versionTransaction.onabort = function(event) {
-            log("Third upgrade versionchange transaction unexpected abort");
-            done();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            log("Third upgrade versionchange transaction complete");
-            done();
-        }
-
-        versionTransaction.onerror = function(event) {
-            log("Third upgrade versionchange transaction unexpected error" + event);
-            done();
-        }
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/deleteindex-2.js"></script>
+</body>
+</html>
index 3a5e343..ba80009 100644 (file)
@@ -1,3 +1,8 @@
+This test creates an object store then populates it, then commits that transaction. It then deletes it, but aborts that transaction. Finally it checks to make sure everything from step 1 is there as expected.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: Initial upgrade needed: Old version - 0 New version - 1
 ALERT: Initial upgrade versionchange transaction complete
 ALERT: Second upgrade needed: Old version - 1 New version - 2
@@ -16,8 +21,7 @@ ALERT: Value gotten was AH AH AH AH AH
 ALERT: Value gotten was AH AH AH AH AH
 ALERT: Value gotten was AH AH AH AH AH
 ALERT: Final transaction complete
-ALERT: Done
-This test creates an object store then populates it, then commits that transaction.
-It then deletes it, but aborts that transaction.
-Finally it checks to make sure everything from step 1 is there as expected.
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 2d323b8..cb93b6b 100644 (file)
@@ -1,139 +1,9 @@
-This test creates an object store then populates it, then commits that transaction.<br>
-It then deletes it, but aborts that transaction.<br>
-Finally it checks to make sure everything from step 1 is there as expected.<br>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open("DeleteObjectStore1Database", 1);
-
-createRequest.onupgradeneeded = function(event) {
-    alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-    for (var i = 0; i < 10; ++i)
-        objectStore.put("AH AH AH AH AH", i + " puts");
-
-    versionTransaction.onabort = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert("Initial upgrade versionchange transaction complete");
-        database.close();
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function getChecker(event) {
-    alert("Value gotten was " + event.target.result);
-}
-
-function continueTest1()
-{
-    var openRequest = window.indexedDB.open("DeleteObjectStore1Database", 2);
-
-    openRequest.onerror = function(event) {
-        alert("Request error - " + event);
-    }
-    openRequest.onblocked = function(event) {
-        alert("Request unexpected blocked - " + event);
-        done();
-    }
-    openRequest.onsuccess = function(event) {
-        alert("Request unexpected success - " + event);
-        done();
-    }
-
-    openRequest.onupgradeneeded = function(event) {
-        alert("Second upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-        var versionTransaction = openRequest.transaction;
-        var database = event.target.result;
-        var objectStore = versionTransaction.objectStore("TestObjectStore");
-        
-        alert("Deleting object store");        
-        database.deleteObjectStore("TestObjectStore");
-
-        versionTransaction.abort();
-
-        versionTransaction.onabort = function(event) {
-            alert("Second version change transaction abort");
-            continueTest2();
-            database.close();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            alert("Second version change transaction unexpected complete");
-            done();
-        }
-
-        versionTransaction.onerror = function(event) {
-            alert("Second version change transaction error - " + event);
-        }
-    }
-}
-
-function continueTest2()
-{
-    var openRequest = window.indexedDB.open("DeleteObjectStore1Database", 1);
-
-    openRequest.onerror = function(event) {
-        alert("Request unexpected error - " + event);
-        done();
-    }
-    openRequest.onblocked = function(event) {
-        alert("Request unexpected blocked - " + event);
-        done();
-    }
-    openRequest.onupgradeneeded = function(event) {
-        alert("Request unexpected upgradeneeded - " + event);
-        done();
-    }
-
-    openRequest.onsuccess = function(event) {
-        alert("Success opening database connection - Starting final transaction");
-        var database = event.target.result;
-        var transaction = database.transaction("TestObjectStore", "readwrite");
-        var objectStore = transaction.objectStore("TestObjectStore");
-    
-        var request;
-        for (var i = 0; i < 10; ++i) {
-            request = objectStore.get(i + " puts");
-            request.onsuccess = getChecker;
-        }
-
-        transaction.onabort = function(event) {
-            alert("Final transaction unexpected abort");
-            done();
-        }
-
-        transaction.oncomplete = function(event) {
-            alert("Final transaction complete");
-            done();
-        }
-
-        transaction.onerror = function(event) {
-            alert("Final transaction unexpected error - " + event);
-            done();
-        }
-    }
-}
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/deleteobjectstore-1.js"></script>
+</body>
+</html>
index df5f010..ee941dc 100644 (file)
@@ -1,5 +1,12 @@
+This test aborts the same transaction twice, making the appropriate exception is thrown.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: Initial upgrade needed: Old version - 0 New version - 1
 ALERT: Second abort failed: Error: Failed to execute 'abort' on 'IDBTransaction': The transaction is inactive or finished.
 ALERT: Initial upgrade versionchange transaction aborted
-ALERT: Done
-This test aborts the same transaction twice, making the appropriate exception is thrown.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
index a538835..f66a8f1 100644 (file)
@@ -1,47 +1,9 @@
-This test aborts the same transaction twice, making the appropriate exception is thrown.
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open("DoubleAbortTestDatabase", 1);
-
-createRequest.onupgradeneeded = function(event) {
-    alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-
-    versionTransaction.abort();
-    try {
-        versionTransaction.abort();
-    } catch (e) {
-        alert("Second abort failed: " + e);
-    }
-
-    versionTransaction.onabort = function(event) {
-        alert("Initial upgrade versionchange transaction aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected complete");
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/double-abort.js"></script>
+</body>
+</html>
index 21b9b40..9932e65 100644 (file)
@@ -1,4 +1,10 @@
 This test makes sure that quickly opening the same database multiple times is successful without the backend ASSERTing or crashing.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Second request done
-done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index c8c1f0f..d268366 100644 (file)
@@ -1,38 +1,10 @@
-This test makes sure that quickly opening the same database multiple times is successful without the backend ASSERTing or crashing.<br>
-<div id="logger"></div>
-<script>
-
-function log(msg)
-{
-    document.getElementById("logger").innerHTML += msg + "<br>";
-}
-
-function done()
-{
-    log("done");
-    if (testRunner)
-        testRunner.notifyDone();
-}
-
-if (testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-}
-
-var req1 = indexedDB.open("testDB");
-req1.onerror = function() {
-    log("First request unexpected error");
-    done();
-}
-
-var req2 = indexedDB.open("testDB");
-req2.onsuccess = function() {
-    log("Second request done");
-    done();
-}
-req2.onerror = function() {
-    log("Second request unexpected error");
-    done();
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/double-open.js"></script>
+</body>
+</html>
index 2b6edc9..f35a0bb 100644 (file)
@@ -1,4 +1,8 @@
 This tests some obvious failures that can happen while calling IDBObjectStore.index().
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 Initial upgrade versionchange transaction complete
 Got an index as expected: [object IDBIndex]
@@ -8,5 +12,7 @@ readonly transaction complete
 Second upgrade needed: Old version - 1 New version - 2
 Failed to get an index from a deleted object store
 Second versionchange transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index da0cd75..59e36f8 100644 (file)
-This tests some obvious failures that can happen while calling IDBObjectStore.index().<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var createRequest = window.indexedDB.open("IDBObjectStoreGetIndexFailuresDatabase", 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-    objectStore.createIndex("TestIndex", "foo");
-    
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction("TestObjectStore", "readonly");
-    var objectStore = transaction.objectStore("TestObjectStore");
-
-    var index = objectStore.index("TestIndex");
-    log("Got an index as expected: " + index);
-
-    try {
-        objectStore.index(null);
-    } catch(e) {
-        log("Failed to get an index with a null name");
-    }
-
-    try {
-        objectStore.index("DoesNotExistdex");
-    } catch(e) {
-        log("Failed to get an index that doesn't exist");
-    }
-
-    transaction.onabort = function(event) {
-        log("readonly transaction unexpected abort" + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log("readonly transaction complete");
-        continueTest2();
-        database.close();
-    }
-
-    transaction.onerror = function(event) {
-        log("readonly transaction unexpected error" + event);
-        done();
-    }
-}
-
-function continueTest2()
-{
-    var createRequest = window.indexedDB.open("IDBObjectStoreGetIndexFailuresDatabase", 2);
-    createRequest.onupgradeneeded = function(event) {
-        log("Second upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-        var versionTransaction = createRequest.transaction;
-        var database = event.target.result;
-        var objectStore = versionTransaction.objectStore("TestObjectStore");
-        database.deleteObjectStore("TestObjectStore");
-        
-        try {
-            objectStore.index("TestIndex");
-        } catch(e) {
-            log("Failed to get an index from a deleted object store");
-        }        
-            
-        versionTransaction.onabort = function(event) {
-            log("Second versionchange transaction unexpected aborted");
-            done();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            log("Second versionchange transaction complete");
-            done();
-        }
-
-        versionTransaction.onerror = function(event) {
-            log("Second versionchange transaction unexpected error" + event);
-            done();
-        }
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/get-index-failures.js"></script>
+</body>
+</html>
index 7a47f76..7c53578 100644 (file)
@@ -1,3 +1,8 @@
+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".
+
+
 ALERT: Initial upgrade needed: Old version - 0 New version - 1
 ALERT: Initial upgrade versionchange transaction complete
 ALERT: Success getting keyRange [-1 (Closed), undefined (Open)]
@@ -123,5 +128,7 @@ ALERT: Result is Flux capacitor
 ALERT: Success getting keyRange [Fri Nov 04 1955 17:00:00 GMT-0700 (PDT) (Open), Wed Oct 21 2015 09:00:00 GMT-0700 (PDT) (Open)]
 ALERT: Result is Fish under the sea
 ALERT: readonly transaction complete
-ALERT: Done
-This test exercises IDBObjectStore.get() with an IDBKeyRange as the parameter.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
index 4260fa9..493c3a4 100644 (file)
@@ -1,171 +1,9 @@
-This test exercises IDBObjectStore.get() with an IDBKeyRange as the parameter.
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-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) {
-    alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-
-    objectStore.put("Flux capacitor", date1);
-    objectStore.put("Fish under the sea", date2);
-    objectStore.put("Hoverboards", date3);
-
-    for (var i = 0; i < 100; ++i)
-        objectStore.put("\"" + i + "\"", i);
-
-    objectStore.put("PosInf", Infinity);
-    objectStore.put("NegInf", -Infinity);
-
-    objectStore.put("A", "A");
-    objectStore.put("As", "As");
-    objectStore.put("AS", "AS");
-    objectStore.put("a", "a");
-
-    objectStore.put("array 1", [1, "hello"]);
-    objectStore.put("array 2", [2, "goodbye"]);
-    objectStore.put("array 3", []);
-
-    versionTransaction.onabort = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert("Initial upgrade versionchange transaction complete");
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-var objectStore;
-
-function testGet(keyRange) {
-    var request = objectStore.get(keyRange);
-    request.onsuccess = function()
-    {
-        alert("Success getting keyRange [" + keyRange.lower + " (" + (keyRange.lowerOpen ? "Open" : "Closed") + "), " + keyRange.upper + " (" + (keyRange.upperOpen ? "Open" : "Closed") + ")]");
-        alert("Result is " + request.result);
-    }
-    request.onerror = function()
-    {
-        alert("Unexpected error getting keyRange [" + keyRange.lower + " (" + keyRange.lowerOpen + "), " + keyRange.upper + " (" + keyRange.upperOpen + ")]");
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction("TestObjectStore", "readonly");
-    objectStore = transaction.objectStore("TestObjectStore");
-
-    testGet(IDBKeyRange.lowerBound(-1));
-    testGet(IDBKeyRange.lowerBound(-1, true));
-    testGet(IDBKeyRange.lowerBound(0));
-    testGet(IDBKeyRange.lowerBound(0, true));
-    testGet(IDBKeyRange.lowerBound(0.1));
-    testGet(IDBKeyRange.lowerBound(0.1, true));
-    testGet(IDBKeyRange.lowerBound(99));
-    testGet(IDBKeyRange.lowerBound(99, true));
-    testGet(IDBKeyRange.lowerBound(99.1));
-    testGet(IDBKeyRange.lowerBound(99.1, true));
-    
-    testGet(IDBKeyRange.upperBound(100));
-    testGet(IDBKeyRange.upperBound(100, true));
-    testGet(IDBKeyRange.upperBound(99));
-    testGet(IDBKeyRange.upperBound(99, true));
-    testGet(IDBKeyRange.upperBound(98.99999));
-    testGet(IDBKeyRange.upperBound(98.99999, true));
-    testGet(IDBKeyRange.upperBound(98));
-    testGet(IDBKeyRange.upperBound(98, true));
-    testGet(IDBKeyRange.upperBound(0));
-    testGet(IDBKeyRange.upperBound(0, true));
-    testGet(IDBKeyRange.upperBound(-0.1));
-    testGet(IDBKeyRange.upperBound(-0.1, true));
-    
-    testGet(IDBKeyRange.bound(2.5, 3.5));
-    testGet(IDBKeyRange.bound(-0.5, 0.5));
-    testGet(IDBKeyRange.bound(98.5, 99.5));
-    testGet(IDBKeyRange.bound(-1, 0));
-    testGet(IDBKeyRange.bound(-1, 0, true));
-    testGet(IDBKeyRange.bound(-1, 0, false, true));
-    testGet(IDBKeyRange.bound(-1, 0, true, true));
-    testGet(IDBKeyRange.bound(3, 4));
-    testGet(IDBKeyRange.bound(3, 4, true));
-    testGet(IDBKeyRange.bound(3, 4, false, true));
-    testGet(IDBKeyRange.bound(3, 4, true, true));
-    testGet(IDBKeyRange.bound(99, 100));
-    testGet(IDBKeyRange.bound(99, 100, true));
-    testGet(IDBKeyRange.bound(99, 100, false, true));
-    testGet(IDBKeyRange.bound(99, 100, true, true));
-
-    testGet(IDBKeyRange.bound(Infinity, "a"));
-    testGet(IDBKeyRange.bound(Infinity, "a", true));
-    testGet(IDBKeyRange.bound(Infinity, "a", false, true));
-    testGet(IDBKeyRange.bound(Infinity, "a", true, true));
-
-    testGet(IDBKeyRange.bound("AS", "a"));
-    testGet(IDBKeyRange.bound("AS", "a", true));
-    testGet(IDBKeyRange.bound("AS", "a", false, true));
-    testGet(IDBKeyRange.bound("AS", "a", true, true));
-    
-    testGet(IDBKeyRange.bound(Infinity, []));
-    testGet(IDBKeyRange.bound(Infinity, [], true));
-    testGet(IDBKeyRange.bound(Infinity, [], false, true));
-    testGet(IDBKeyRange.bound(Infinity, [], true, true));
-
-    testGet(IDBKeyRange.bound(Infinity, "a"));
-    testGet(IDBKeyRange.bound(Infinity, "a", true));
-    testGet(IDBKeyRange.bound(Infinity, "a", false, true));
-    testGet(IDBKeyRange.bound(Infinity, "a", true, true));
-
-    testGet(IDBKeyRange.bound(Infinity, "a"));
-    testGet(IDBKeyRange.bound(Infinity, "a", true));
-    testGet(IDBKeyRange.bound(Infinity, "a", false, true));
-    testGet(IDBKeyRange.bound(Infinity, "a", true, true));
-
-    testGet(IDBKeyRange.bound(date1, date3));
-    testGet(IDBKeyRange.bound(date1, date3, true));
-    testGet(IDBKeyRange.bound(date1, date3, false, true));
-    testGet(IDBKeyRange.bound(date1, date3, true, true));
-    
-    transaction.onabort = function(event) {
-        alert("readonly transaction unexpected abort" + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert("readonly transaction complete");
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert("readonly transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/get-keyrange.js"></script>
+</body>
+</html>
index 2d24af4..950d40d 100644 (file)
@@ -1,3 +1,8 @@
+This tests some obvious failures that can happen while calling IDBDatabase.deleteObjectStore()
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: Initial upgrade needed: Old version - 0 New version - 1
 ALERT: Initial upgrade versionchange transaction complete
 ALERT: readwrite put success - about to try to delete an objectstore
@@ -7,5 +12,7 @@ ALERT: Second upgrade needed: Old version - 1 New version - 2
 ALERT: Failed to deleteObjectStore with a non-existent objectstore - Error: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The specified object store was not found.
 ALERT: Failed to deleteObjectStore with an in-progress versionchange transaction that is inactive - Error: A request was placed against a transaction which is either currently not active, or which is finished.
 ALERT: Second version change transaction complete
-ALERT: Done
-This tests some obvious failures that can happen while calling IDBDatabase.deleteObjectStore()
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
index d878d3d..ec713d8 100644 (file)
@@ -1,144 +1,9 @@
-This tests some obvious failures that can happen while calling IDBDatabase.deleteObjectStore()
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open("IDBDatabaseDeleteObjectStoreFailuresDatabase", 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-    var request = objectStore.put("bar", "foo");
-
-    versionTransaction.onabort = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert("Initial upgrade versionchange transaction complete");
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction("TestObjectStore", "readwrite");
-    var objectStore = transaction.objectStore("TestObjectStore");
-    var request = objectStore.put("baz", "foo");
-
-    request.onsuccess = function() {
-        alert("readwrite put success - about to try to delete an objectstore");
-        try {
-            database.deleteObjectStore("TestObjectStore");
-        } catch(e) {
-            alert("Failed to deleteObjectStore without a versionchange transaction - " + e);
-        }
-    }
-    
-    transaction.onabort = function(event) {
-        alert("readwrite transaction unexpected aborted");
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert("readwrite transaction complete");
-        database.close();
-        continueTest2();
-    }
-
-    transaction.onerror = function(event) {
-        alert("readwrite transaction unexpected error" + event);
-        done();
-    }
-}
-
-function continueTest2()
-{
-    var openRequest = window.indexedDB.open("IDBDatabaseDeleteObjectStoreFailuresDatabase", 2);
-
-    openRequest.onerror = function(event) {
-        alert("Request unexpected error - " + event);
-        done();
-    }
-    openRequest.onblocked = function(event) {
-        alert("Request unexpected blocked - " + event);
-        done();
-    }
-    openRequest.onsuccess = function(event) {
-        alert("Request unexpected success - " + event);
-        done();
-    }
-
-    openRequest.onupgradeneeded = function(event) {
-        alert("Second upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-    
-        var versionTransaction = openRequest.transaction;
-        database = event.target.result;
-
-        try {
-            database.deleteObjectStore("NonexistentObjectStore");
-        } catch(e) {
-            alert("Failed to deleteObjectStore with a non-existent objectstore - " + e);
-        }
-
-        // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
-        var objectStore = versionTransaction.objectStore("TestObjectStore");
-        var canFinish = false;
-        var spinGet = function() { 
-            objectStore.get("foo").onsuccess = function() {
-                if (!canFinish)
-                    spinGet();
-            }
-        }
-        spinGet();
-        
-        // After the versionChange transaction becomes inactive, but while it's still in-progress, try to delete the objectstore
-        var tryInactiveDelete = function() 
-        {
-            try {
-                database.deleteObjectStore("TestObjectStore");
-            } catch(e) {
-                alert("Failed to deleteObjectStore with an in-progress versionchange transaction that is inactive - " + e);
-            }
-            canFinish = true;
-        }
-        
-        setTimeout(tryInactiveDelete, 0);
-
-        versionTransaction.onabort = function(event) {
-            alert("Second version change transaction unexpected abort");
-            done();
-        }
-
-        versionTransaction.oncomplete = function(event) {
-            alert("Second version change transaction complete");
-            done();
-        }
-
-        versionTransaction.onerror = function(event) {
-            alert("Second version change transaction unexpected error - " + event);
-            done();
-        }
-    }
-}
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/idbdatabase-deleteobjectstore-failures.js"></script>
+</body>
+</html>
index 51b11f8..f827032 100644 (file)
@@ -1,3 +1,8 @@
+This tests some obvious failures that can happen while calling IDBDatabase.transaction()
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: Upgrade needed: Old version - 0 New version - 1
 ALERT: 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.
 ALERT: versionchange transaction completed
@@ -6,5 +11,7 @@ ALERT: Failed to start a transaction to a nonexistent object store - Error: Fail
 ALERT: Failed to start a transaction with an invalid mode - TypeError: Failed to execute 'transaction' on 'IDBDatabase': The mode provided ('blahblah') is not one of 'readonly' or 'readwrite'.
 ALERT: Failed to explicitly start a versionchange transaction - TypeError: Failed to execute 'transaction' on 'IDBDatabase': The mode provided ('versionchange') is not one of 'readonly' or 'readwrite'.
 ALERT: Failed to explicitly start a transaction with the close pending flag set - Error: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing.
-ALERT: Done
-This tests some obvious failures that can happen while calling IDBDatabase.transaction()
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
index 68b7784..9587ce9 100644 (file)
@@ -1,90 +1,9 @@
-This tests some obvious failures that can happen while calling IDBDatabase.transaction()
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open("IDBDatabaseTransactionFailuresDatabase");
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    alert("Upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-    var request = objectStore.put("foo", "bar");
-
-    request.onerror = function(event) {
-        alert("put FAILED - " + event);
-        done();
-    }
-    
-    try {
-        database.transaction("TestObjectStore", "readonly");
-    } catch(e) {
-        alert("Failed to start a transaction while a versionChange transaction was in progress - " + e);
-    }
-
-    versionTransaction.onabort = function(event) {
-        alert("versionchange transaction aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert("versionchange transaction completed");
-        continueTest();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert("versionchange transaction error'ed - " + event);
-        done();
-    }
-}
-
-function continueTest()
-{
-    try {
-        database.transaction([], "readonly");
-    } catch(e) {
-        alert("Failed to start a transaction with an empty set of object stores - " + e);
-    }
-
-    try {
-        database.transaction("NonexistentObjectStore", "readonly");
-    } catch(e) {
-        alert("Failed to start a transaction to a nonexistent object store - " + e);
-    }
-
-    try {
-        database.transaction("TestObjectStore", "blahblah");
-    } catch(e) {
-        alert("Failed to start a transaction with an invalid mode - " + e);
-    }
-
-    try {
-        database.transaction("TestObjectStore", "versionchange");
-    } catch(e) {
-        alert("Failed to explicitly start a versionchange transaction - " + e);
-    }
-    
-    try {
-        database.close();
-        database.transaction("TestObjectStore", "readonly");
-    } catch(e) {
-        alert("Failed to explicitly start a transaction with the close pending flag set - " + e);
-    }
-    
-    done();
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/idbdatabase-transaction-failures.js"></script>
+</body>
+</html>
index db0c695..45d255e 100644 (file)
@@ -1,3 +1,8 @@
+This tests getting basic properties on an IDBIndex.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: Initial upgrade needed: Old version - 0 New version - 1
 ALERT: TestIndex1
 ALERT: [object IDBObjectStore]
@@ -85,6 +90,7 @@ ALERT: [object DOMStringList]
 ALERT: false
 ALERT: false
 ALERT: readonly transaction complete
-ALERT: Done
-This tests getting basic properties on an IDBIndex.
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 32016ba..73b1f30 100644 (file)
-This tests getting basic properties on an IDBIndex.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function gol(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-function logIndex(index)
-{
-    alert(index.name);
-    alert(index.objectStore);
-    alert(index.objectStore.name);
-    alert(index.keyPath);
-    alert(index.multiEntry);
-    alert(index.unique);
-}
-
-var createRequest = window.indexedDB.open("IDBIndexPropertiesBasicDatabase", 1);
-var database;
-
-var indexes = new Array();
-
-createRequest.onupgradeneeded = function(event) {
-    alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-    
-    indexes.push(objectStore.createIndex("TestIndex1", "foo"));
-    indexes.push(objectStore.createIndex("TestIndex2", "foo", { unique: false, multiEntry: false }));
-    indexes.push(objectStore.createIndex("TestIndex3", "foo", { unique: true, multiEntry: false }));
-    indexes.push(objectStore.createIndex("TestIndex4", "foo", { unique: false, multiEntry: true }));
-    indexes.push(objectStore.createIndex("TestIndex5", "foo", { unique: true, multiEntry: true }));
-    indexes.push(objectStore.createIndex("TestIndex6", [ "foo" ]));
-    indexes.push(objectStore.createIndex("TestIndex7", [ "foo", "bar" ]));
-
-    for (index in indexes)
-        logIndex(indexes[index]);
-
-    versionTransaction.onabort = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert("Initial upgrade versionchange transaction complete");
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction("TestObjectStore", "readonly");
-    var objectStore = transaction.objectStore("TestObjectStore");
-
-    logIndex(objectStore.index("TestIndex1"));
-    logIndex(objectStore.index("TestIndex2"));
-    logIndex(objectStore.index("TestIndex3"));
-    logIndex(objectStore.index("TestIndex4"));
-    logIndex(objectStore.index("TestIndex5"));
-    logIndex(objectStore.index("TestIndex6"));
-    logIndex(objectStore.index("TestIndex7"));
-
-    transaction.onabort = function(event) {
-        alert("readonly transaction unexpected abort" + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert("readonly transaction complete");
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert("readonly transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/idbindex-properties-basic.js"></script>
+</body>
+</html>
index 744ca7c..771dfec 100644 (file)
@@ -1,3 +1,8 @@
+This test creates an object store then populates it. It then clears it and makes sure it has nothing left in it.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: Initial upgrade needed: Old version - 0 New version - 1
 ALERT: Initial upgrade versionchange transaction complete
 ALERT: Success opening database connection - Starting readwrite transaction
@@ -21,7 +26,7 @@ ALERT: Value gotten was undefined
 ALERT: Value gotten was undefined
 ALERT: Value gotten was undefined
 ALERT: Readwrite transaction complete
-ALERT: Done
-This test creates an object store then populates it.
-It then clears it and makes sure it has nothing left in it.
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 0e5efaf..3d3f2ae 100644 (file)
@@ -1,111 +1,9 @@
-This test creates an object store then populates it.<br>
-It then clears it and makes sure it has nothing left in it.<br>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open("IDBObjectStoreClearDatabase", 1);
-
-createRequest.onupgradeneeded = function(event) {
-    alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore", { autoIncrement: true });
-    var request = objectStore.put("bar1");
-    var request = objectStore.put("bar2");
-    var request = objectStore.put("bar3");
-    var request = objectStore.put("bar4");
-    var request = objectStore.put("bar5");
-    var request = objectStore.put("bar6");
-    var request = objectStore.put("bar7");
-    var request = objectStore.put("bar8");
-    var request = objectStore.put("bar9");
-
-    versionTransaction.onabort = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert("Initial upgrade versionchange transaction complete");
-        continueTest1();
-        database.close();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function getChecker(event) {
-    alert("Value gotten was " + event.target.result);
-}
-
-function continueTest1()
-{
-    var openRequest = window.indexedDB.open("IDBObjectStoreClearDatabase", 1);
-
-    openRequest.onerror = function(event) {
-        alert("Request unexpected error - " + event);
-        done();
-    }
-    openRequest.onblocked = function(event) {
-        alert("Request unexpected blocked - " + event);
-        done();
-    }
-    openRequest.onupgradeneeded = function(event) {
-        alert("Request unexpected upgradeneeded - " + event);
-        done();
-    }
-
-    openRequest.onsuccess = function(event) {
-        alert("Success opening database connection - Starting readwrite transaction");
-        var database = event.target.result;
-        var transaction = database.transaction("TestObjectStore", "readwrite");
-        var objectStore = transaction.objectStore("TestObjectStore");
-    
-        var request;
-        for (var i = 1; i <= 9; ++i) {
-            request = objectStore.get(i);
-            request.onsuccess = getChecker;
-        }
-        
-        request = objectStore.clear();
-        request.onsuccess = function() {
-            alert("Object store cleared");
-            var newRequests;
-            for (var i = 1; i <= 9; ++i) {
-                newRequests = objectStore.get(i);
-                newRequests.onsuccess = getChecker;
-            }    
-        }
-
-        transaction.onabort = function(event) {
-            alert("Readwrite transaction unexpected abort");
-            done();
-        }
-
-        transaction.oncomplete = function(event) {
-            alert("Readwrite transaction complete");
-            done();
-        }
-
-        transaction.onerror = function(event) {
-            alert("Readwrite transaction unexpected error - " + event);
-            done();
-        }
-    }
-}
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/idbobjectstore-clear-1.js"></script>
+</body>
+</html>
index d600c53..d1d9fc9 100644 (file)
@@ -1,3 +1,8 @@
+This test creates an object store then populates it, then commits that transaction. It then clears it, but aborts that transaction. Finally it checks to make sure everything from step 1 is still in there.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: Initial upgrade needed: Old version - 0 New version - 1
 ALERT: Initial upgrade versionchange transaction complete
 ALERT: Success opening database connection - Starting readwrite transaction
@@ -32,8 +37,7 @@ ALERT: Value gotten was bar7
 ALERT: Value gotten was bar8
 ALERT: Value gotten was bar9
 ALERT: Readwrite transaction complete
-ALERT: Done
-This test creates an object store then populates it, then commits that transaction.
-It then clears it, but aborts that transaction.
-Finally it checks to make sure everything from step 1 is still in there.
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index bb25596..9609525 100644 (file)
@@ -1,167 +1,9 @@
-This test creates an object store then populates it, then commits that transaction.<br>
-It then clears it, but aborts that transaction.<br>
-Finally it checks to make sure everything from step 1 is still in there.<br>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open("IDBObjectStoreClear2Database", 1);
-
-createRequest.onupgradeneeded = function(event) {
-    alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore", { autoIncrement: true });
-    var request = objectStore.put("bar1");
-    var request = objectStore.put("bar2");
-    var request = objectStore.put("bar3");
-    var request = objectStore.put("bar4");
-    var request = objectStore.put("bar5");
-    var request = objectStore.put("bar6");
-    var request = objectStore.put("bar7");
-    var request = objectStore.put("bar8");
-    var request = objectStore.put("bar9");
-
-    versionTransaction.onabort = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert("Initial upgrade versionchange transaction complete");
-        continueTest1();
-        database.close();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function getChecker(event) {
-    alert("Value gotten was " + event.target.result);
-}
-
-function continueTest1()
-{
-    var openRequest = window.indexedDB.open("IDBObjectStoreClear2Database", 1);
-
-    openRequest.onerror = function(event) {
-        alert("Request unexpected error - " + event);
-        done();
-    }
-    openRequest.onblocked = function(event) {
-        alert("Request unexpected blocked - " + event);
-        done();
-    }
-    openRequest.onupgradeneeded = function(event) {
-        alert("Request unexpected upgradeneeded - " + event);
-        done();
-    }
-
-    openRequest.onsuccess = function(event) {
-        alert("Success opening database connection - Starting readwrite transaction");
-        var database = event.target.result;
-        var transaction = database.transaction("TestObjectStore", "readwrite");
-        var objectStore = transaction.objectStore("TestObjectStore");
-    
-        var request;
-        for (var i = 1; i <= 9; ++i) {
-            request = objectStore.get(i);
-            request.onsuccess = getChecker;
-        }
-        
-        request = objectStore.clear();
-        request.onsuccess = function() {
-            alert("Object store cleared, making sure its all gone.");
-            var newRequests;
-            for (var i = 1; i <= 9; ++i) {
-                newRequests = objectStore.get(i);
-                newRequests.onsuccess = getChecker;
-            }
-            
-            // We'll be on the last request here, can just override it.
-            newRequests.onsuccess = function(event) {
-                getChecker(event);
-                transaction.abort();
-            }
-        }
-        
-        // Just for fun clear it twice, won't change anything
-        objectStore.clear();
-
-        transaction.onabort = function(event) {
-            alert("Readwrite transaction abort");
-            continueTest2();
-        }
-
-        transaction.oncomplete = function(event) {
-            alert("Readwrite transaction unexpected complete");
-            done();
-        }
-
-        transaction.onerror = function(event) {
-            alert("Readwrite transaction unexpected error - " + event);
-            done();
-        }
-    }
-}
-
-function continueTest2()
-{
-    var openRequest = window.indexedDB.open("IDBObjectStoreClear2Database", 1);
-
-    openRequest.onerror = function(event) {
-        alert("Request unexpected error - " + event);
-        done();
-    }
-    openRequest.onblocked = function(event) {
-        alert("Request unexpected blocked - " + event);
-        done();
-    }
-    openRequest.onupgradeneeded = function(event) {
-        alert("Request unexpected upgradeneeded - " + event);
-        done();
-    }
-
-    openRequest.onsuccess = function(event) {
-        alert("Success opening database connection - Starting final transaction");
-        var database = event.target.result;
-        var transaction = database.transaction("TestObjectStore", "readwrite");
-        var objectStore = transaction.objectStore("TestObjectStore");
-    
-        var request;
-        for (var i = 1; i <= 9; ++i) {
-            request = objectStore.get(i);
-            request.onsuccess = getChecker;
-        }
-
-        transaction.onabort = function(event) {
-            alert("Readwrite transaction unexpected abort");
-            done();
-        }
-
-        transaction.oncomplete = function(event) {
-            alert("Readwrite transaction complete");
-            done();
-        }
-
-        transaction.onerror = function(event) {
-            alert("Readwrite transaction unexpected error - " + event);
-            done();
-        }
-    }
-}
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/idbobjectstore-clear-2.js"></script>
+</body>
+</html>
index f81337f..4cad6f6 100644 (file)
@@ -1,3 +1,8 @@
+This test exercises various uses of IDBObjectStore.count()
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: Initial upgrade needed: Old version - 0 New version - 1
 ALERT: Count is: 1
 ALERT: Count is: 0
@@ -50,5 +55,7 @@ ALERT: Count is: 3
 ALERT: Count is: 3
 ALERT: Count is: 1
 ALERT: Initial upgrade versionchange transaction complete
-ALERT: Done
-This test exercises various uses of IDBObjectStore.count()
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
index cdf942d..7de9324 100644 (file)
@@ -1,92 +1,9 @@
-This test exercises various uses of IDBObjectStore.count()
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open("IDBObjectStoreCount1Database", 1);
-var database;
-var objectStore;
-
-function getCount(arg)
-{
-    var request;
-    if (arg == undefined)
-        request = objectStore.count();
-    else
-        request = objectStore.count(arg);
-    
-    request.onsuccess = function() {
-        alert("Count is: " + request.result);
-    }
-    request.onerror = function(error) {
-        alert("Unexpected error getting count: " + error);
-        done();
-    }
-}
-
-function getCounts()
-{
-    getCount();
-    getCount(IDBKeyRange.bound(3, 6));    
-    getCount(IDBKeyRange.bound(3, 6, true, false));    
-    getCount(IDBKeyRange.bound(3, 6, false, true));
-    getCount(7);    
-}
-
-createRequest.onupgradeneeded = function(event) {
-    alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    objectStore = database.createObjectStore("TestObjectStore");
-    
-    objectStore.put(1, 1);
-    getCounts();
-    objectStore.put(2, 2);
-    getCounts();
-    objectStore.put(3, 3);
-    getCounts();
-    objectStore.put(4, 4);
-    getCounts();
-    objectStore.put(5, 5);
-    getCounts();
-    objectStore.put(6, 6);
-    getCounts();
-    objectStore.put(7, 7);
-    getCounts();
-    objectStore.put(8, 8);
-    getCounts();
-    objectStore.put(9, 9);
-    getCounts();
-    objectStore.put(10, 10);
-    getCounts();
-
-    // FIXME: Once objectStore.delete() is implemented, also test counts after deleting previous records.
-    
-    versionTransaction.onabort = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected abort");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert("Initial upgrade versionchange transaction complete");
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/idbobjectstore-count-1.js"></script>
+</body>
+</html>
index 083a680..5928925 100644 (file)
@@ -1,8 +1,15 @@
+This tests some obvious failures that can happen while calling IDBObjectStore.count().
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: Initial upgrade needed: Old version - 0 New version - 1
 ALERT: Failed to count records in object store with an invalid key
 ALERT: Failed to count records in object store that's been deleted
 ALERT: Initial upgrade versionchange transaction complete
 ALERT: Failed to count records in object store while transaction is inactive
 ALERT: readonly transaction complete
-ALERT: Done
-This tests some obvious failures that can happen while calling IDBObjectStore.count().
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
index 3acce16..d24b3d6 100644 (file)
@@ -1,105 +1,9 @@
-This tests some obvious failures that can happen while calling IDBObjectStore.count().
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open("IDBObjectStoreCountFailuresDatabase", 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-    var request = objectStore.put("bar", "foo");
-
-    request.onsuccess = function() {
-        try {
-            objectStore.count(NaN);
-        } catch(e) {
-            alert("Failed to count records in object store with an invalid key");
-        }
-        
-        database.deleteObjectStore("TestObjectStore");
-        
-        try {
-            objectStore.count();
-        } catch(e) {
-            alert("Failed to count records in object store that's been deleted");
-        } 
-
-        // Recreate the objectstore because we'll need it in phase 2.
-        var objectStore = database.createObjectStore("TestObjectStore");
-        objectStore.put("bar", "foo");    
-    }
-    
-    versionTransaction.onabort = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert("Initial upgrade versionchange transaction complete");
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction("TestObjectStore", "readonly");
-    var objectStore = transaction.objectStore("TestObjectStore");
-
-    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
-    var canFinish = false;
-    var spinGet = function() { 
-        objectStore.get("foo").onsuccess = function() {
-            if (!canFinish)
-                spinGet();
-        }
-    }
-    spinGet();
-    
-    var getWhileInactive = function() {
-        try {
-            objectStore.count();
-        } catch(e) {
-            alert("Failed to count records in object store while transaction is inactive");
-        }
-        canFinish = true;
-    }
-    
-    setTimeout(getWhileInactive, 0);
-    
-    transaction.onabort = function(event) {
-        alert("readonly transaction unexpected abort" + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert("readonly transaction complete");
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert("readonly transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/idbobjectstore-count-failures.js"></script>
+</body>
+</html>
index fc3431b..1c18f30 100644 (file)
@@ -1,4 +1,8 @@
 This test exercises various uses of IDBObjectStore.delete()
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 Count is 113
 Initial upgrade versionchange transaction complete
@@ -21,5 +25,7 @@ Count is 7
 Deleted "[object IDBKeyRange]", and there should now be 3 less things total.
 Count is 4
 readwrite transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 1a12617..30ca9c9 100644 (file)
-This test exercises various uses of IDBObjectStore.delete()<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-function logCount()
-{
-    var req = objectStore.count();
-    req.onsuccess = function() { 
-        log("Count is " + req.result);
-    }
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open("IDBObjectStoreDelete1Database", 1);
-var database;
-var objectStore;
-
-var date1 = new Date("1999-12-28T23:00:00");
-var date2 = new Date("1999-12-29T23:00:00");
-var date3 = new Date("1999-12-30T23:00:00");
-var date4 = new Date("1999-12-31T23:00:00");
-var date5 = new Date("2000-01-01T00:00:00");
-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) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    objectStore = database.createObjectStore("TestObjectStore");
-    
-    // Just for the heck of it.
-    objectStore.delete("foo");
-    objectStore.put("boo", "foo");
-    objectStore.delete("foo");
-
-    objectStore.put("boo", "foo");
-    objectStore.put("bop", "fop");
-    objectStore.put("boq", "foq");
-    objectStore.put("bor", "for");
-    objectStore.put("bos", "fos");
-    
-    for (var i = 0; i < 100; ++i)
-        objectStore.put("number " + i, i);
-
-    objectStore.put("date 1", date1);
-    objectStore.put("date 2", date2);
-    objectStore.put("date 3", date3);
-    objectStore.put("date 4", date4);
-    objectStore.put("date 5", date5);
-    objectStore.put("date 6", date6);
-    objectStore.put("date 7", date7);
-    objectStore.put("date 8", date8);
-
-    logCount();
-
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected abort");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function continueTest1()
-{   
-    var transaction = database.transaction("TestObjectStore", "readwrite");
-    objectStore = transaction.objectStore("TestObjectStore");
-
-    // The pairs of things in the array are the things to delete followed by the expected decrease in the total count of objects.
-    var thingsToDelete = [
-        date8, 1,
-        date8, 0, 
-        "balyhoo", 0, 
-        IDBKeyRange.bound(date6, date7, true, true), 0,
-        IDBKeyRange.bound(date6, date7, true), 1,
-        IDBKeyRange.bound(date5, date6, false, true), 1,
-        IDBKeyRange.bound(date1, date6), 5,
-        IDBKeyRange.bound(1, 98), 98, 
-        IDBKeyRange.bound("foo", "fos", true, true), 3
-    ];
-    var currentThing = 0;
-    
-    var runDeleteTests = function()
-    {
-        if (!thingsToDelete[currentThing])
-            return;
-        
-        objectStore.delete(thingsToDelete[currentThing]).onsuccess = function() {
-            log("Deleted \"" + thingsToDelete[currentThing] + "\", and there should now be " + thingsToDelete[currentThing + 1] + " less things total.");
-            logCount();
-            currentThing += 2;
-            runDeleteTests();
-        }
-    }
-    runDeleteTests();
-    
-    transaction.onabort = function(event) {
-        log("readwrite transaction unexpected abort" + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log("readwrite transaction complete");
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log("readwrite transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/idbobjectstore-delete-1.js"></script>
+</body>
+</html>
index 3eefdea..671118d 100644 (file)
@@ -1,9 +1,15 @@
 This test exercises IDBObjectStore.delete() followed by an abort to make sure the delete is un-done.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 Initial upgrade versionchange transaction complete
 After delete, record for "foo" has value: undefined
 readwrite transaction aborted
 Record for "foo" has final value: bar
 readonly transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index f041af3..f97bd97 100644 (file)
-This test exercises IDBObjectStore.delete() followed by an abort to make sure the delete is un-done.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-function logCount()
-{
-    var req = objectStore.count();
-    req.onsuccess = function() { 
-        log("Count is " + req.result);
-    }
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open("IDBObjectStoreDelete2Database", 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    database.createObjectStore("TestObjectStore").put("bar", "foo");
-
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected abort");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function continueTest1()
-{   
-    var transaction = database.transaction("TestObjectStore", "readwrite");
-    transaction.objectStore("TestObjectStore").delete("foo").onsuccess = function()
-    {
-        var request = transaction.objectStore("TestObjectStore").get("foo");
-        request.onsuccess = function()
-        {
-            log("After delete, record for \"foo\" has value: " + request.result);
-            transaction.abort();
-        }
-    }
-
-    transaction.onabort = function(event) {
-        log("readwrite transaction aborted");
-        continueTest2();
-    }
-
-    transaction.oncomplete = function(event) {
-        log("readwrite transaction unexpected complete");
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log("readwrite transaction unexpected error");
-        done();
-    }
-}
-
-function continueTest2()
-{   
-    var transaction = database.transaction("TestObjectStore", "readonly");
-
-    var request = transaction.objectStore("TestObjectStore").get("foo");
-    request.onsuccess = function()
-    {
-        log("Record for \"foo\" has final value: " + request.result);
-    }
-
-    transaction.onabort = function(event)
-    {
-        log("readonly transaction unexpected abort");
-        done();
-    }
-
-    transaction.oncomplete = function(event)
-    {
-        log("readonly transaction complete");
-        done();
-    }
-
-    transaction.onerror = function(event)
-    {
-        log("readonly transaction unexpected error");
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/idbobjectstore-delete-2.js"></script>
+</body>
+</html>
index b9dfa59..16d6a52 100644 (file)
@@ -1,4 +1,8 @@
 This tests some obvious failures that can happen while calling IDBObjectStore.delete().
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 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
@@ -6,5 +10,7 @@ Initial upgrade versionchange transaction complete
 Failed to delete a record in read-only transaction
 Failed to delete record with inactive transaction
 readwrite transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 1eb0dea..ebe8ca4 100644 (file)
-This tests some obvious failures that can happen while calling IDBObjectStore.delete().<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open("IDBObjectStoreDeleteFailuresDatabase", 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-    var request = objectStore.put("bar", "foo");
-
-    request.onsuccess = function() {
-        try {
-            objectStore.delete(NaN);
-        } catch(e) {
-            log("Failed to delete record from object store with an invalid key");
-        }
-        
-        database.deleteObjectStore("TestObjectStore");
-        
-        try {
-            objectStore.delete("foo");
-        } catch(e) {
-            log("Failed to delete record from object store that has been deleted");
-        } 
-
-        // Recreate the objectstore because we'll need it in phase 2.
-        var objectStore = database.createObjectStore("TestObjectStore");
-        objectStore.put("bar", "foo");    
-    }
-    
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction("TestObjectStore", "readonly");
-    var objectStore = transaction.objectStore("TestObjectStore");
-    
-    try {
-        objectStore.delete("foo");
-    } catch(e) {
-        log("Failed to delete a record in read-only transaction");
-    }
-    
-    var transaction = database.transaction("TestObjectStore", "readwrite");
-    var objectStore = transaction.objectStore("TestObjectStore");
-
-    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
-    var canFinish = false;
-    var spinGet = function() { 
-        objectStore.get("foo").onsuccess = function() {
-            if (!canFinish)
-                spinGet();
-        }
-    }
-    spinGet();
-
-    var testWhileInactive = function() {
-        try {
-            objectStore.delete("foo");
-        } catch(e) {
-            log("Failed to delete record with inactive transaction");
-        }
-        canFinish = true;
-    }
-    
-    setTimeout(testWhileInactive, 0);
-    
-    transaction.onabort = function(event) {
-        log("readwrite transaction unexpected abort" + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log("readwrite transaction complete");
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log("readwrite transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/idbobjectstore-delete-failures.js"></script>
+</body>
+</html>
index 9f24fce..30915ef 100644 (file)
@@ -1,8 +1,15 @@
+This tests some obvious failures that can happen while calling IDBObjectStore.get().
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: Initial upgrade needed: Old version - 0 New version - 1
 ALERT: Failed to get record from object store with an invalid key
 ALERT: Failed to get record from object store that has been deleted
 ALERT: Initial upgrade versionchange transaction complete
 ALERT: Failed to get record from object store while the transaction is inactive
 ALERT: readonly transaction complete
-ALERT: Done
-This tests some obvious failures that can happen while calling IDBObjectStore.get().
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
index e372103..4f20597 100644 (file)
@@ -1,105 +1,9 @@
-This tests some obvious failures that can happen while calling IDBObjectStore.get().
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open("IDBObjectStoreGetFailuresDatabase", 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-    var request = objectStore.put("bar", "foo");
-
-    request.onsuccess = function() {
-        try {
-            objectStore.get(NaN);
-        } catch(e) {
-            alert("Failed to get record from object store with an invalid key");
-        }
-        
-        database.deleteObjectStore("TestObjectStore");
-        
-        try {
-            objectStore.get("foo");
-        } catch(e) {
-            alert("Failed to get record from object store that has been deleted");
-        } 
-
-        // Recreate the objectstore because we'll need it in phase 2.
-        var objectStore = database.createObjectStore("TestObjectStore");
-        objectStore.put("bar", "foo");    
-    }
-    
-    versionTransaction.onabort = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert("Initial upgrade versionchange transaction complete");
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction("TestObjectStore", "readonly");
-    var objectStore = transaction.objectStore("TestObjectStore");
-
-    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
-    var canFinish = false;
-    var spinGet = function() { 
-        objectStore.get("foo").onsuccess = function() {
-            if (!canFinish)
-                spinGet();
-        }
-    }
-    spinGet();
-
-    var getWhileInactive = function() {
-        try {
-            objectStore.get("foo");
-        } catch(e) {
-            alert("Failed to get record from object store while the transaction is inactive");
-        }
-        canFinish = true;
-    }
-    
-    setTimeout(getWhileInactive, 0);
-    
-    transaction.onabort = function(event) {
-        alert("readonly transaction unexpected abort" + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert("readonly transaction complete");
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert("readonly transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/idbobjectstore-get-failures.js"></script>
+</body>
+</html>
index 7f68fdd..538701b 100644 (file)
@@ -1,3 +1,8 @@
+This tests some obvious failures that can happen while calling IDBObjectStore.put() and IDBObjectStore.clear().
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: Initial upgrade needed: Old version - 0 New version - 1
 ALERT: Failed to put record into object store with an invalid key
 ALERT: Failed to put record into object store that has been deleted
@@ -7,5 +12,7 @@ ALERT: Failed to clear object store in read-only transaction
 ALERT: Failed to put record into object store with inactive transaction
 ALERT: Failed to clear object store with inactive transaction
 ALERT: readwrite transaction complete
-ALERT: Done
-This tests some obvious failures that can happen while calling IDBObjectStore.put() and IDBObjectStore.clear().
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
index 27c4da1..8a59fd8 100644 (file)
@@ -1,127 +1,9 @@
-This tests some obvious failures that can happen while calling IDBObjectStore.put() and IDBObjectStore.clear().
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-var createRequest = window.indexedDB.open("IDBObjectStorePutAndClearFailuresDatabase", 1);
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    alert("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-    var request = objectStore.put("bar", "foo");
-
-    request.onsuccess = function() {
-        try {
-            objectStore.put("bar", NaN);
-        } catch(e) {
-            alert("Failed to put record into object store with an invalid key");
-        }
-        
-        database.deleteObjectStore("TestObjectStore");
-        
-        try {
-            objectStore.put("bar", "foo");
-        } catch(e) {
-            alert("Failed to put record into object store that has been deleted");
-        } 
-
-        try {
-            objectStore.clear();
-        } catch(e) {
-            alert("Failed to clear object store that has been deleted");
-        } 
-
-        // Recreate the objectstore because we'll need it in phase 2.
-        var objectStore = database.createObjectStore("TestObjectStore");
-        objectStore.put("bar", "foo");    
-    }
-    
-    versionTransaction.onabort = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        alert("Initial upgrade versionchange transaction complete");
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        alert("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function continueTest1()
-{
-    var transaction = database.transaction("TestObjectStore", "readonly");
-    var objectStore = transaction.objectStore("TestObjectStore");
-    
-    try {
-        objectStore.clear();
-    } catch(e) {
-        alert("Failed to clear object store in read-only transaction");
-    }
-    
-    var transaction = database.transaction("TestObjectStore", "readwrite");
-    var objectStore = transaction.objectStore("TestObjectStore");
-
-    // Spin the transaction with get requests to keep it alive long enough for the setTimeout to fire.
-    var canFinish = false;
-    var spinGet = function() { 
-        objectStore.get("foo").onsuccess = function() {
-            if (!canFinish)
-                spinGet();
-        }
-    }
-    spinGet();
-
-    var testWhileInactive = function() {
-        try {
-            objectStore.put("bar", "foo");
-        } catch(e) {
-            alert("Failed to put record into object store with inactive transaction");
-        }
-        
-        try {
-            objectStore.clear();
-        } catch(e) {
-            alert("Failed to clear object store with inactive transaction");
-        }
-        
-        canFinish = true;
-    }
-    
-    setTimeout(testWhileInactive, 0);
-    
-    transaction.onabort = function(event) {
-        alert("readwrite transaction unexpected abort" + event);
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        alert("readwrite transaction complete");
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        alert("readwrite transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/idbobjectstore-put-and-clear-failures.js"></script>
+</body>
+</html>
index 7c3e03d..29b69a4 100644 (file)
@@ -1,3 +1,8 @@
+This tests some obvious failures that can happen while calling transaction.objectStore()
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 ALERT: Upgrade needed: Old version - 0 New version - 1
 ALERT: [object IDBTransaction] - versionchange
 ALERT: [object IDBDatabase]
@@ -7,6 +12,7 @@ ALERT: Caught attempt to access non-existant object store on the transaction
 ALERT: Caught attempt to access valid object store on a transaction that is already finishing
 ALERT: put failed (because transaction was aborted)
 ALERT: First version change transaction unexpected error - [object Event]
-ALERT: Done
-This tests some obvious failures that can happen while calling transaction.objectStore()
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index c22cde3..cf6a76e 100644 (file)
@@ -1,78 +1,9 @@
-This tests some obvious failures that can happen while calling transaction.objectStore()<br>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-var request = window.indexedDB.open("TransactionObjectStoreFailuresTestDatabase");
-
-function done()
-{
-    alert("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-request.onupgradeneeded = function(event)
-{
-    alert("Upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-    
-    var tx = request.transaction;
-    var db = event.target.result;
-
-    alert(tx + " - " + tx.mode);
-    alert(db);
-
-    var os1 = db.createObjectStore("TestObjectStore1");
-    var os2 = db.createObjectStore("TestObjectStore2");
-
-    var putRequest = os1.put("bar", "foo");
-    
-    putRequest.onerror = function() {
-        alert("put failed (because transaction was aborted)");
-    }
-    
-    try {
-        tx.objectStore("");
-    } catch(e) {
-        alert("Caught attempt to access empty-named object store on the transaction");
-    }
-    
-    try {
-        tx.objectStore();
-    } catch(e) {
-        alert("Caught attempt to access null-named object store on the transaction");
-    }
-     
-    try {
-        tx.objectStore("ThisObjectStoreDoesNotExist");
-    } catch(e) {
-        alert("Caught attempt to access non-existant object store on the transaction");
-    }
-    
-    tx.abort();
-    
-    try {
-        tx.objectStore("TestObjectStore1");
-    } catch(e) {
-        alert("Caught attempt to access valid object store on a transaction that is already finishing");
-    }
-      
-    tx.onabort = function(event) {
-        alert("First version change transaction abort");
-        done();
-    }
-
-    tx.oncomplete = function(event) {
-        alert("First version change transaction unexpected complete");
-        done();
-    }
-
-    tx.onerror = function(event) {
-        alert("First version change transaction unexpected error - " + event);
-        done();
-    }
-}
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+<script src="resources/idbtransaction-objectstore-failures.js"></script>
+</body>
+</html>
index ac260b1..6d6f3bc 100644 (file)
@@ -1,4 +1,8 @@
 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".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 get "good" result is: [object Object]
 bar is good
@@ -132,5 +136,7 @@ getKey "This is to test,multiEntry indexes" result is: undefined
 count result is: 11
 
 Initial upgrade versionchange transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 2612af7..6372c9a 100644 (file)
-This tests the expected values from some more complex index situations.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var createRequest = window.indexedDB.open("Index1Database", 1);
-
-function checkKey(index, key)
-{
-    var request1 = index.get(key);
-    var request2 = index.getKey(key);
-
-    request1.onsuccess = function() {
-        log("get \"" + key + "\" result is: " + request1.result);
-        for (n in request1.result)
-            log(n + " is " + request1.result[n]);
-    }
-    request2.onsuccess = function() {
-        log("getKey \"" + key + "\" result is: " + request2.result);
-        for (n in request2.result)
-            log(n + " is " + request2.result[n]);
-    } 
-}
-
-function checkIndex(index)
-{
-    checkKey(index, "good");
-    checkKey(index, "bad");
-    checkKey(index, "ok");
-    checkKey(index, "meh");
-    checkKey(index, "super");
-    checkKey(index, "thanksForAsking");
-    checkKey(index, [ "good", "bad" ]);
-    checkKey(index, [ "ok", "meh" ]);
-    checkKey(index, [ "super", "thanksForAsking" ]);
-    checkKey(index, "This is to test");
-    checkKey(index, "multiEntry indexes");
-    checkKey(index, ["This is to test", "multiEntry indexes" ]);
-    
-    var request = index.count();
-    request.onsuccess = function() {
-        log("count result is: " + request.result);
-        log(" ");
-    }
-}
-
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-    var index1 = objectStore.createIndex("TestIndex1", "bar");
-    var index2 = objectStore.createIndex("TestIndex2", "baz");
-    var index3 = objectStore.createIndex("TestIndex3", [ "bar", "baz" ]);
-    var index4 = objectStore.createIndex("TestIndex4", "bar", { multiEntry: true });
-
-    objectStore.put({ bar: "good", baz: "bad" }, 1);
-    objectStore.put({ bar: "good", baz: "bad" }, 2);
-    objectStore.put({ bar: "good", baz: "bad" }, 3);
-    objectStore.put({ bar: "ok", baz: "meh" }, 4);
-    objectStore.put({ bar: "ok", baz: "meh" }, 5);
-    objectStore.put({ bar: "ok", baz: "meh" }, 6);
-    objectStore.put({ bar: "super", baz: "thanksForAsking" }, 7);
-    objectStore.put({ bar: "super", baz: "thanksForAsking" }, 8);
-    objectStore.put({ bar: "super", baz: "thanksForAsking" }, 9);
-    objectStore.put({ bar: [ "This is to test", "multiEntry indexes" ]}, 10);
-    
-    checkIndex(index1);
-    checkIndex(index2);
-    checkIndex(index3);
-    checkIndex(index4);
-  
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/index-1.js"></script>
+</body>
+</html>
index 34d203f..59830dc 100644 (file)
@@ -1,4 +1,8 @@
 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".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 get "good" result is: [object Object]
 bar is good
@@ -146,5 +150,7 @@ getKey "test" result is: 2
 count result is: 3
 
 readwrite transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 0c8eee9..e0abe28 100644 (file)
-This tests indexes are left in appropriate states after aborted transactions.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var createRequest = window.indexedDB.open("Index2Database", 1);
-
-function checkKey(index, key)
-{
-    var request1 = index.get(key);
-    var request2 = index.getKey(key);
-
-    request1.onsuccess = function() {
-        log("get \"" + key + "\" result is: " + request1.result);
-        for (n in request1.result)
-            log(n + " is " + request1.result[n]);
-    }
-    request2.onsuccess = function() {
-        log("getKey \"" + key + "\" result is: " + request2.result);
-        for (n in request2.result)
-            log(n + " is " + request2.result[n]);
-    } 
-}
-
-function checkIndex(index)
-{
-    checkKey(index, "good");
-    checkKey(index, "bad");
-    checkKey(index, "multiEntry");
-    checkKey(index, "test");
-    
-    var request = index.count();
-    request.onsuccess = function() {
-        log("count result is: " + request.result);
-        log(" ");
-    }
-}
-
-var database;
-
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-    var index1 = objectStore.createIndex("TestIndex1", "bar");
-    var index2 = objectStore.createIndex("TestIndex2", "baz");
-    var index3 = objectStore.createIndex("TestIndex3", "bar", { multiEntry: true });
-
-    objectStore.put({ bar: "good", baz: "bad" }, 1);
-    objectStore.put({ bar: [ "multiEntry", "test" ]}, 2);
-    
-    checkIndex(index1);
-    checkIndex(index2);
-    checkIndex(index3);
-
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected abort");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        continueTest1();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-function continueTest1()
-{   
-    var transaction = database.transaction("TestObjectStore", "readwrite");
-    var objectStore = transaction.objectStore("TestObjectStore");
-    var index1 = objectStore.index("TestIndex1");
-    var index2 = objectStore.index("TestIndex2");
-    var index3 = objectStore.index("TestIndex3");
-    
-    objectStore.delete(1).onsuccess = function() {
-       log("Deleted key 1 from objectstore");
-       log("");
-    }
-
-    checkIndex(index1);
-    checkIndex(index2);
-    checkIndex(index3);
-
-    objectStore.clear().onsuccess = function() {
-       log("Cleared objectstore");
-       log("");
-    }
-    
-    checkIndex(index1);
-    checkIndex(index2);
-    checkIndex(index3);
-    
-    objectStore.get(0).onsuccess = function() {
-        log("All done. Moving on to final part");
-        transaction.abort();
-    }
-    
-    transaction.onabort = function(event) {
-        log("readwrite transaction aborted");
-        continueTest2();
-    }
-
-    transaction.oncomplete = function(event) {
-        log("readwrite transaction unexpected complete");
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log("readwrite transaction unexpected error");
-        done();
-    }
-}
-
-function continueTest2()
-{   
-    var transaction = database.transaction("TestObjectStore", "readonly");
-    var objectStore = transaction.objectStore("TestObjectStore");
-    var index1 = objectStore.index("TestIndex1");
-    var index2 = objectStore.index("TestIndex2");
-    var index3 = objectStore.index("TestIndex3");
-    
-    checkIndex(index1);
-    checkIndex(index2);
-    checkIndex(index3);
-    
-    transaction.onabort = function(event) {
-        log("readwrite transaction unexpected abort");
-        done();
-    }
-
-    transaction.oncomplete = function(event) {
-        log("readwrite transaction complete");
-        done();
-    }
-
-    transaction.onerror = function(event) {
-        log("readwrite transaction unexpected error");
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/index-2.js"></script>
+</body>
+</html>
index ad62d6c..3e3777a 100644 (file)
@@ -1,4 +1,8 @@
 This test exercises the "unique" constraint of indexes.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 First put success
 Value of 1 is: [object Object]
@@ -19,5 +23,7 @@ Value of 3 is: undefined
 Count in index 1 is: 1
 Count in index 2 is: 1
 Initial upgrade versionchange transaction complete
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 4f9e08e..ad34e2e 100644 (file)
-This test exercises the "unique" constraint of indexes.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var createRequest = window.indexedDB.open("Index3Database", 1);
-var objectStore;
-
-function checkObjectStore()
-{
-    var req1 = objectStore.get(1);
-    req1.onsuccess = function() {
-        log("Value of 1 is: " + req1.result);
-    }
-    var req2 = objectStore.get(2);
-    req2.onsuccess = function() {
-        log("Value of 2 is: " + req2.result);
-    }
-    var req3 = objectStore.get(3);
-    req3.onsuccess = function() {
-        log("Value of 3 is: " + req3.result);
-    }
-}
-
-function checkIndex(index, name)
-{
-    var req = index.count();
-    req.onsuccess = function() {
-        log("Count in index " + name + " is: " + req.result);
-    }
-}
-
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    objectStore = database.createObjectStore("TestObjectStore");
-    var i1 = objectStore.createIndex("TestIndex1", "bar", { unique: true });
-    var i2 = objectStore.createIndex("TestIndex2", "bar", { multiEntry: true, unique: true });
-
-    var request1 = objectStore.put({ bar: "good", baz: "bad" }, 1);
-    request1.onsuccess = function() {
-        log("First put success");
-    }
-    request1.onerror = function() {
-        log("First put unexpected failure");
-        done();
-    }
-    
-    checkObjectStore();
-    checkIndex(i1, 1);
-    checkIndex(i2, 2);
-    
-    var request2 = objectStore.put({ bar: "good", baz: "bad" }, 2);
-    request2.onsuccess = function() {
-        log("Second put unexpected success");
-        done();
-    }
-    request2.onerror = function(e) {
-        log("Second put failure");
-        e.stopPropagation();
-        e.preventDefault();
-    }
-    
-    checkObjectStore();
-    checkIndex(i1, 1);
-    checkIndex(i2, 2);
-    
-    var request3 = objectStore.put({ bar: [ "gnarly", "great", "good" ]}, 3);
-    request3.onsuccess = function() {
-        log("Third put unexpected success");
-        done();
-    }
-    request3.onerror = function(e) {
-        log("Third put failure");
-        e.stopPropagation();
-        e.preventDefault();
-    }
-    
-    checkObjectStore();
-    checkIndex(i1, 1);
-    checkIndex(i2, 2);
-    
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/index-3.js"></script>
+</body>
+</html>
index d01b61d..a160dbd 100644 (file)
@@ -1,4 +1,8 @@
 This tests that indexes added to an object store with existing records are populated upon their creation.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 Count is: 18
 Cursor at record: A / 1
@@ -19,5 +23,7 @@ Cursor at record: H / 15
 Cursor at record: H / 16
 Cursor at record: I / 17
 Cursor at record: I / 18
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index d41ce0b..96f26a8 100644 (file)
@@ -1,97 +1,10 @@
-This tests that indexes added to an object store with existing records are populated upon their creation.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var index;
-var objectStore;
-
-function checkIndexValues()
-{
-    var countRequest = index.count();
-    countRequest.onsuccess = function() {
-        log("Count is: " + countRequest.result);
-    }
-
-    var cursorRequest = index.openCursor();
-    cursorRequest.onsuccess = function() {
-        var cursor = cursorRequest.result;
-        if (!cursor) {
-            done();
-            return;
-        }
-        log("Cursor at record: " + cursor.key + " / " + cursor.primaryKey);
-        cursor.continue();
-
-    }
-    cursorRequest.onerror = function(e) {
-        log("Unexpected error opening or iterating cursor");
-        logCursor(cursorRequest.result);
-        done();
-    } 
-}
-
-var createRequest = window.indexedDB.open("Index4Database", 1);
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    objectStore = database.createObjectStore("TestObjectStore");
-    objectStore.put({ bar: "A" }, 1);
-    objectStore.put({ bar: "A" }, 2);
-    objectStore.put({ bar: "B" }, 3);
-    objectStore.put({ bar: "B" }, 4);
-    objectStore.put({ bar: "C" }, 5);
-    objectStore.put({ bar: "C" }, 6);
-    objectStore.put({ bar: "D" }, 7);
-    objectStore.put({ bar: "D" }, 8);
-    objectStore.put({ bar: "E" }, 9);
-    objectStore.put({ bar: "E" }, 10);
-    objectStore.put({ bar: "F" }, 11);
-    objectStore.put({ bar: "F" }, 12);
-    objectStore.put({ bar: "G" }, 13);
-    objectStore.put({ bar: "G" }, 14);    
-    objectStore.put({ bar: "H" }, 15);
-    objectStore.put({ bar: "H" }, 16);  
-    objectStore.put({ bar: "I" }, 17);
-    objectStore.put({ bar: "I" }, 18);  
-
-    // This index should be populated with the above values upon its creation.
-    index = objectStore.createIndex("TestIndex1", "bar");
-    
-    checkIndexValues();
-    
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/index-4.js"></script>
+</body>
+</html>
index 3b3a08d..9707e65 100644 (file)
@@ -1,8 +1,13 @@
-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).
+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).
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 Error getting cursor count
 Error opening or iterating cursor
 Initial upgrade versionchange transaction aborted (expected because index creation failed, and that should've caused transaction abort)
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index fd683fb..e8b6c66 100644 (file)
@@ -1,85 +1,10 @@
-This tests creating an index on an object store that already has records, and those records would violate the unique constraint of the index.<br>
-(The index creation should fail).<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-var index;
-var objectStore;
-
-function checkIndexValues()
-{
-    var countRequest = index.count();
-    countRequest.onsuccess = function() {
-        log("Count is: " + countRequest.result);
-    }
-    countRequest.onerror = function(e) {
-        log("Error getting cursor count");
-        e.stopPropagation();
-    }
-
-    var cursorRequest = index.openCursor();
-    cursorRequest.onsuccess = function() {
-        var cursor = cursorRequest.result;
-        log("Cursor at record: " + cursor.key + " / " + cursor.primaryKey);
-        
-        if (cursor.key != undefined)
-            cursor.continue();
-        else
-            done();
-    }
-    cursorRequest.onerror = function(e) {
-        log("Error opening or iterating cursor");
-        e.stopPropagation();
-    } 
-}
-
-var createRequest = window.indexedDB.open("Index5Database", 1);
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    objectStore = database.createObjectStore("TestObjectStore");
-    objectStore.put({ bar: "A" }, 1);
-    objectStore.put({ bar: "A" }, 2);
-
-    // This index should be populated with the above values upon its creation, but that should fail because
-    // of constraint violations.
-    index = objectStore.createIndex("TestIndex1", "bar", { unique: true });
-    
-    checkIndexValues();
-    
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction aborted (expected because index creation failed, and that should've caused transaction abort)");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction unexpected complete");
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/index-5.js"></script>
+</body>
+</html>
index f77b934..8e1b826 100644 (file)
@@ -1,4 +1,8 @@
 This tests cursors that iterate over entire indexes.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 
 Starting a new cursor: testCursorDirection(index1, 'next')
@@ -402,5 +406,7 @@ Cursor source is: TestIndex2
 Cursor key is: a
 Cursor primary key is: 1
 Cursor value is: [object Object]
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 05fe23e..d9e5c48 100644 (file)
-This tests cursors that iterate over entire indexes.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-function logCursor(cursor)
-{
-    log("Cursor direction is: " + cursor.direction);
-    log("Cursor source is: " + cursor.source.name);    
-    log("Cursor key is: " + cursor.key);    
-    log("Cursor primary key is: " + cursor.primaryKey);
-    log("Cursor value is: " + cursor.value);  
-}
-
-function setupRequest(request)
-{
-    request.onsuccess = function() {
-        if (!request.result) {
-            startNextCursor();
-            return;
-        }
-        log("Success opening or iterating cursor");
-        logCursor(request.result);  
-        request.result.continue();
-    }
-    request.onerror = function(e) {
-        log("Unexpected error opening or iterating cursor");
-        logCursor(request.result);
-        done();
-    } 
-}
-
-function testCursorDirection(index, direction)
-{
-    var range = IDBKeyRange.lowerBound(-Infinity);
-    var request = index.openCursor(range, direction);
-    setupRequest(request);
-}
-
-var index1;
-var index2;
-
-var cursorCommands = [
-    "testCursorDirection(index2, 'prevunique')",
-    "testCursorDirection(index1, 'prevunique')",
-    "testCursorDirection(index2, 'prev')",
-    "testCursorDirection(index1, 'prev')",
-    "testCursorDirection(index2, 'nextunique')",
-    "testCursorDirection(index1, 'nextunique')",
-    "testCursorDirection(index2, 'next')",
-    "testCursorDirection(index1, 'next')",
-];
-
-function startNextCursor()
-{
-    if (!cursorCommands.length) {
-        done();
-        return;
-    }
-    
-    var command = cursorCommands.pop();
-    log ("");
-    log("Starting a new cursor: " + command);
-    eval(command);
-}
-    
-var createRequest = window.indexedDB.open("IndexCursor1Database", 1);
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-    index1 = objectStore.createIndex("TestIndex1", "bar");
-    index2 = objectStore.createIndex("TestIndex2", "baz");
-
-    objectStore.put({ bar: "A", baz: "a" }, 1);
-    objectStore.put({ bar: "A", baz: "a" }, 3);
-    objectStore.put({ bar: "A", baz: "a" }, 2);
-    objectStore.put({ bar: "B", baz: "b" }, 5);
-    objectStore.put({ bar: "B", baz: "b" }, 6);
-    objectStore.put({ bar: "B", baz: "b" }, 4);
-    objectStore.put({ bar: "C", baz: "c" }, 7);
-    objectStore.put({ bar: "C", baz: "c" }, 9);
-    objectStore.put({ bar: "C", baz: "c" }, 8);
-    objectStore.put({ bar: "D", baz: "d" }, 11);
-    objectStore.put({ bar: "D", baz: "d" }, 12);
-    objectStore.put({ bar: "D", baz: "d" }, 10);
-
-    var req1 = index1.count();
-    req1.onsuccess = function() {
-        log("TestIndex1 count is: " + req1.result);
-    }
-
-    var req2 = index2.count();
-    req2.onsuccess = function() {
-        log("TestIndex2 count is: " + req2.result);
-    }
-    
-    startNextCursor();
-    
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/index-cursor-1.js"></script>
+</body>
+</html>
index 905e735..0240cb0 100644 (file)
@@ -1,4 +1,8 @@
 This tests cursors that iterate over parts of indexes.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
 Initial upgrade needed: Old version - 0 New version - 1
 
 Starting a new cursor: testCursorDirection('next', IDBKeyRange.bound('B', 'D', true, true))
@@ -425,5 +429,7 @@ Cursor source is: TestIndex1
 Cursor key is: B
 Cursor primary key is: 4
 Cursor value is: [object Object]
-Done
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index a8938d6..106a4a4 100644 (file)
-This tests cursors that iterate over parts of indexes.<br>
-<div id="logger"></div>
-<script>
-
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-}
-
-function done()
-{
-    log("Done");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-function log(message)
-{
-    document.getElementById("logger").innerHTML += message + "<br>";
-}
-
-function logCursor(cursor)
-{
-    log("Cursor direction is: " + cursor.direction);
-    log("Cursor source is: " + cursor.source.name);    
-    log("Cursor key is: " + cursor.key);    
-    log("Cursor primary key is: " + cursor.primaryKey);
-    log("Cursor value is: " + cursor.value);  
-}
-
-function setupRequest(request)
-{
-    request.onsuccess = function() {
-        if (!request.result) {
-            startNextCursor();
-            return;
-        }
-        log("Success opening or iterating cursor");
-        logCursor(request.result);  
-        request.result.continue();
-    }
-    request.onerror = function(e) {
-        log("Unexpected error opening or iterating cursor");
-        logCursor(request.result);
-        done();
-    } 
-}
-
-var index;
-
-function testCursorDirection(direction, range)
-{
-    var request = index.openCursor(range, direction);
-    setupRequest(request);
-}
-
-var cursorCommands = [
-    "testCursorDirection('prevunique', IDBKeyRange.only('B'))",
-    "testCursorDirection('prev', IDBKeyRange.only('B'))",
-    "testCursorDirection('nextunique', IDBKeyRange.only('B'))",
-    "testCursorDirection('next', IDBKeyRange.only('B'))",
-    "testCursorDirection('prevunique', IDBKeyRange.lowerBound('C'))",
-    "testCursorDirection('prev', IDBKeyRange.lowerBound('C'))",
-    "testCursorDirection('nextunique', IDBKeyRange.lowerBound('C'))",
-    "testCursorDirection('next', IDBKeyRange.lowerBound('C'))",
-    "testCursorDirection('prevunique', IDBKeyRange.upperBound('B'))",
-    "testCursorDirection('prev', IDBKeyRange.upperBound('B'))",
-    "testCursorDirection('nextunique', IDBKeyRange.upperBound('B'))",
-    "testCursorDirection('next', IDBKeyRange.upperBound('B'))",
-    "testCursorDirection('prevunique', IDBKeyRange.bound('B', 'C'))",
-    "testCursorDirection('prev', IDBKeyRange.bound('B', 'C'))",
-    "testCursorDirection('nextunique', IDBKeyRange.bound('B', 'C'))",
-    "testCursorDirection('next', IDBKeyRange.bound('B', 'C'))",
-    "testCursorDirection('prevunique', IDBKeyRange.bound('B', 'D', true, true))",
-    "testCursorDirection('prev', IDBKeyRange.bound('B', 'D', true, true))",
-    "testCursorDirection('nextunique', IDBKeyRange.bound('B', 'D', true, true))",
-    "testCursorDirection('next', IDBKeyRange.bound('B', 'D', true, true))",
-];
-
-function startNextCursor()
-{
-    if (!cursorCommands.length) {
-        done();
-        return;
-    }
-
-    var command = cursorCommands.pop();
-    log ("");
-    log("Starting a new cursor: " + command);
-    eval(command);
-}
-    
-var createRequest = window.indexedDB.open("IndexCursor2Database", 1);
-createRequest.onupgradeneeded = function(event) {
-    log("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
-
-    var versionTransaction = createRequest.transaction;
-    var database = event.target.result;
-    var objectStore = database.createObjectStore("TestObjectStore");
-    index = objectStore.createIndex("TestIndex1", "bar");
-
-    objectStore.put({ bar: "A", baz: "a" }, 1);
-    objectStore.put({ bar: "A", baz: "a" }, 3);
-    objectStore.put({ bar: "A", baz: "a" }, 2);
-    objectStore.put({ bar: "B", baz: "b" }, 5);
-    objectStore.put({ bar: "B", baz: "b" }, 6);
-    objectStore.put({ bar: "B", baz: "b" }, 4);
-    objectStore.put({ bar: "C", baz: "c" }, 7);
-    objectStore.put({ bar: "C", baz: "c" }, 9);
-    objectStore.put({ bar: "C", baz: "c" }, 8);
-    objectStore.put({ bar: "D", baz: "d" }, 11);
-    objectStore.put({ bar: "D", baz: "d" }, 12);
-    objectStore.put({ bar: "D", baz: "d" }, 10);
-
-    var req = index.count();
-    req.onsuccess = function() {
-        log("TestIndex1 count is: " + req.result);
-    }
-
-    startNextCursor();
-    
-    versionTransaction.onabort = function(event) {
-        log("Initial upgrade versionchange transaction unexpected aborted");
-        done();
-    }
-
-    versionTransaction.oncomplete = function(event) {
-        log("Initial upgrade versionchange transaction complete");
-        done();
-    }
-
-    versionTransaction.onerror = function(event) {
-        log("Initial upgrade versionchange transaction unexpected error" + event);
-        done();
-    }
-}
-
-</script>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/shared.js"></script>
+</head>
+<body>
+
+<script src="resources/index-cursor-2.js"></script>
+</body>
+</html>
index 14a4acc..6e752ba 100644 (file)
@@ -1,10 +1,11 @@
 This tests that index cursors properly handle changing indexes.
-Initial upgrade needed: Old version - 0 New version - 1
 
-Starting a new cursor: testCursorDirection(index, 'next')
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
-TestIndex1 count is: 18
 
+Initial upgrade needed: Old version - 0 New version - 1
+Starting a new cursor: testCursorDirection(index, 'next')
+TestIndex1 count is: 18
 Success opening or iterating cursor
 Cursor direction is: next
 Cursor source is: TestIndex1
@@ -83,11 +84,8 @@ Cursor primary key is: 18
 Cursor value is: [object Object]
 Deleted key 18 from object store
 Success opening or iterating cursor
-
 Starting a new cursor: testCursorDirection(index, 'prev')
-
 TestIndex1 count is: 18
-
 Success opening or iterating cursor
 Cursor direction is: prev
 Cursor sour