New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexedDB: Add tests for request properties during/after open/delete #5899
IndexedDB: Add tests for request properties during/after open/delete #5899
Conversation
@pwnall - can you review? |
*This report has been truncated because the total content is 225661 characters in length, which is in excess of GitHub.com's limit for comments (65536 characters). Firefox (nightly)Testing web-platform-tests at revision fb5efa4 All results308 tests ran/IndexedDB/abort-in-initial-upgradeneeded.html
/IndexedDB/bindings-inject-key.html
/IndexedDB/clone-before-keypath-eval.html
/IndexedDB/close-in-upgradeneeded.html
/IndexedDB/cursor-overloads.htm
/IndexedDB/delete-request-queue.html
/IndexedDB/error-attributes.html
/IndexedDB/event-dispatch-active-flag.html
/IndexedDB/fire-error-event-exception.html
/IndexedDB/fire-success-event-exception.html
/IndexedDB/fire-upgradeneeded-event-exception.html
/IndexedDB/idb-binary-key-detached.htm
/IndexedDB/idb-binary-key-roundtrip.htm
/IndexedDB/idb_webworkers.htm
/IndexedDB/idbcursor-advance-continue-async.htm
/IndexedDB/idbcursor-advance-exception-order.html
/IndexedDB/idbcursor-advance-invalid.htm
/IndexedDB/idbcursor-advance.htm
/IndexedDB/idbcursor-continue-exception-order.htm
/IndexedDB/idbcursor-continue.htm
/IndexedDB/idbcursor-continuePrimaryKey-exception-order.htm
/IndexedDB/idbcursor-continuePrimaryKey.htm
/IndexedDB/idbcursor-delete-exception-order.htm
/IndexedDB/idbcursor-direction-index-keyrange.htm
/IndexedDB/idbcursor-direction-index.htm
/IndexedDB/idbcursor-direction-objectstore-keyrange.htm
/IndexedDB/idbcursor-direction-objectstore.htm
/IndexedDB/idbcursor-direction.htm
/IndexedDB/idbcursor-key.htm
/IndexedDB/idbcursor-primarykey.htm
/IndexedDB/idbcursor-reused.htm
/IndexedDB/idbcursor-source.htm
/IndexedDB/idbcursor-update-exception-order.htm
/IndexedDB/idbcursor_advance_index.htm
/IndexedDB/idbcursor_advance_index2.htm
/IndexedDB/idbcursor_advance_index3.htm
/IndexedDB/idbcursor_advance_index5.htm
/IndexedDB/idbcursor_advance_index6.htm
/IndexedDB/idbcursor_advance_index7.htm
/IndexedDB/idbcursor_advance_index8.htm
/IndexedDB/idbcursor_advance_index9.htm
/IndexedDB/idbcursor_advance_objectstore.htm
/IndexedDB/idbcursor_advance_objectstore2.htm
/IndexedDB/idbcursor_advance_objectstore3.htm
/IndexedDB/idbcursor_advance_objectstore4.htm
/IndexedDB/idbcursor_advance_objectstore5.htm
/IndexedDB/idbcursor_continue_index.htm
/IndexedDB/idbcursor_continue_index2.htm
/IndexedDB/idbcursor_continue_index3.htm
/IndexedDB/idbcursor_continue_index4.htm
/IndexedDB/idbcursor_continue_index5.htm
/IndexedDB/idbcursor_continue_index6.htm
/IndexedDB/idbcursor_continue_index7.htm
/IndexedDB/idbcursor_continue_index8.htm
/IndexedDB/idbcursor_continue_invalid.htm
/IndexedDB/idbcursor_continue_objectstore.htm
/IndexedDB/idbcursor_continue_objectstore2.htm
/IndexedDB/idbcursor_continue_objectstore3.htm
/IndexedDB/idbcursor_continue_objectstore4.htm
/IndexedDB/idbcursor_continue_objectstore5.htm
/IndexedDB/idbcursor_continue_objectstore6.htm
/IndexedDB/idbcursor_delete_index.htm
/IndexedDB/idbcursor_delete_index2.htm
/IndexedDB/idbcursor_delete_index3.htm
/IndexedDB/idbcursor_delete_index4.htm
/IndexedDB/idbcursor_delete_index5.htm
/IndexedDB/idbcursor_delete_objectstore.htm
/IndexedDB/idbcursor_delete_objectstore2.htm
/IndexedDB/idbcursor_delete_objectstore3.htm
/IndexedDB/idbcursor_delete_objectstore4.htm
/IndexedDB/idbcursor_delete_objectstore5.htm
/IndexedDB/idbcursor_iterating.htm
/IndexedDB/idbcursor_iterating_index.htm
/IndexedDB/idbcursor_iterating_index2.htm
/IndexedDB/idbcursor_iterating_objectstore.htm
/IndexedDB/idbcursor_iterating_objectstore2.htm
/IndexedDB/idbcursor_update_index.htm
/IndexedDB/idbcursor_update_index2.htm
/IndexedDB/idbcursor_update_index3.htm
/IndexedDB/idbcursor_update_index4.htm
/IndexedDB/idbcursor_update_index5.htm
/IndexedDB/idbcursor_update_index6.htm
/IndexedDB/idbcursor_update_index7.htm
/IndexedDB/idbcursor_update_index8.htm
/IndexedDB/idbcursor_update_objectstore.htm
/IndexedDB/idbcursor_update_objectstore2.htm
/IndexedDB/idbcursor_update_objectstore3.htm
/IndexedDB/idbcursor_update_objectstore4.htm
/IndexedDB/idbcursor_update_objectstore5.htm
/IndexedDB/idbcursor_update_objectstore6.htm
/IndexedDB/idbcursor_update_objectstore7.htm
/IndexedDB/idbcursor_update_objectstore8.htm
|
*This report has been truncated because the total content is 214623 characters in length, which is in excess of GitHub.com's limit for comments (65536 characters). Chrome (unstable)Testing web-platform-tests at revision fb5efa4 All results308 tests ran/IndexedDB/abort-in-initial-upgradeneeded.html
/IndexedDB/bindings-inject-key.html
/IndexedDB/clone-before-keypath-eval.html
/IndexedDB/close-in-upgradeneeded.html
/IndexedDB/cursor-overloads.htm
/IndexedDB/delete-request-queue.html
/IndexedDB/error-attributes.html
/IndexedDB/event-dispatch-active-flag.html
/IndexedDB/fire-error-event-exception.html
/IndexedDB/fire-success-event-exception.html
/IndexedDB/fire-upgradeneeded-event-exception.html
/IndexedDB/idb-binary-key-detached.htm
/IndexedDB/idb-binary-key-roundtrip.htm
/IndexedDB/idb_webworkers.htm
/IndexedDB/idbcursor-advance-continue-async.htm
/IndexedDB/idbcursor-advance-exception-order.html
/IndexedDB/idbcursor-advance-invalid.htm
/IndexedDB/idbcursor-advance.htm
/IndexedDB/idbcursor-continue-exception-order.htm
/IndexedDB/idbcursor-continue.htm
/IndexedDB/idbcursor-continuePrimaryKey-exception-order.htm
/IndexedDB/idbcursor-continuePrimaryKey.htm
/IndexedDB/idbcursor-delete-exception-order.htm
/IndexedDB/idbcursor-direction-index-keyrange.htm
/IndexedDB/idbcursor-direction-index.htm
/IndexedDB/idbcursor-direction-objectstore-keyrange.htm
/IndexedDB/idbcursor-direction-objectstore.htm
/IndexedDB/idbcursor-direction.htm
/IndexedDB/idbcursor-key.htm
/IndexedDB/idbcursor-primarykey.htm
/IndexedDB/idbcursor-reused.htm
/IndexedDB/idbcursor-source.htm
/IndexedDB/idbcursor-update-exception-order.htm
/IndexedDB/idbcursor_advance_index.htm
/IndexedDB/idbcursor_advance_index2.htm
/IndexedDB/idbcursor_advance_index3.htm
/IndexedDB/idbcursor_advance_index5.htm
/IndexedDB/idbcursor_advance_index6.htm
/IndexedDB/idbcursor_advance_index7.htm
/IndexedDB/idbcursor_advance_index8.htm
/IndexedDB/idbcursor_advance_index9.htm
/IndexedDB/idbcursor_advance_objectstore.htm
/IndexedDB/idbcursor_advance_objectstore2.htm
/IndexedDB/idbcursor_advance_objectstore3.htm
/IndexedDB/idbcursor_advance_objectstore4.htm
/IndexedDB/idbcursor_advance_objectstore5.htm
/IndexedDB/idbcursor_continue_index.htm
/IndexedDB/idbcursor_continue_index2.htm
/IndexedDB/idbcursor_continue_index3.htm
/IndexedDB/idbcursor_continue_index4.htm
/IndexedDB/idbcursor_continue_index5.htm
/IndexedDB/idbcursor_continue_index6.htm
/IndexedDB/idbcursor_continue_index7.htm
/IndexedDB/idbcursor_continue_index8.htm
/IndexedDB/idbcursor_continue_invalid.htm
/IndexedDB/idbcursor_continue_objectstore.htm
/IndexedDB/idbcursor_continue_objectstore2.htm
/IndexedDB/idbcursor_continue_objectstore3.htm
/IndexedDB/idbcursor_continue_objectstore4.htm
/IndexedDB/idbcursor_continue_objectstore5.htm
/IndexedDB/idbcursor_continue_objectstore6.htm
/IndexedDB/idbcursor_delete_index.htm
/IndexedDB/idbcursor_delete_index2.htm
/IndexedDB/idbcursor_delete_index3.htm
/IndexedDB/idbcursor_delete_index4.htm
/IndexedDB/idbcursor_delete_index5.htm
/IndexedDB/idbcursor_delete_objectstore.htm
/IndexedDB/idbcursor_delete_objectstore2.htm
/IndexedDB/idbcursor_delete_objectstore3.htm
/IndexedDB/idbcursor_delete_objectstore4.htm
/IndexedDB/idbcursor_delete_objectstore5.htm
/IndexedDB/idbcursor_iterating.htm
/IndexedDB/idbcursor_iterating_index.htm
/IndexedDB/idbcursor_iterating_index2.htm
/IndexedDB/idbcursor_iterating_objectstore.htm
/IndexedDB/idbcursor_iterating_objectstore2.htm
/IndexedDB/idbcursor_update_index.htm
/IndexedDB/idbcursor_update_index2.htm
/IndexedDB/idbcursor_update_index3.htm
/IndexedDB/idbcursor_update_index4.htm
/IndexedDB/idbcursor_update_index5.htm
/IndexedDB/idbcursor_update_index6.htm
/IndexedDB/idbcursor_update_index7.htm
/IndexedDB/idbcursor_update_index8.htm
/IndexedDB/idbcursor_update_objectstore.htm
/IndexedDB/idbcursor_update_objectstore2.htm
/IndexedDB/idbcursor_update_objectstore3.htm
/IndexedDB/idbcursor_update_objectstore4.htm
/IndexedDB/idbcursor_update_objectstore5.htm
/IndexedDB/idbcursor_update_objectstore6.htm
/IndexedDB/idbcursor_update_objectstore7.htm
/IndexedDB/idbcursor_update_objectstore8.htm
/IndexedDB/idbcursor_update_objectstore9.htm
/IndexedDB/idbdatabase-createObjectStore-exception-order.htm
/IndexedDB/idbdatabase-deleteObjectStore-exception-order.htm
/IndexedDB/idbdatabase-transaction-exception-order.html
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM w/ nits. Thank you for adding more test coverage!
|
||
assert_equals( | ||
rq.readyState, 'done', | ||
'request done flag should still be set during complete'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is during complete
intended, or should this be during abort
?
'request result should still be set (to connection) during complete'); | ||
assert_equals( | ||
rq.error, null, | ||
'request result should still be null during upgradeneeded'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
abort
instead of upgradeneeded
here?
assert_true(saw_abort, 'abort event should fire before error'); | ||
assert_equals( | ||
rq.readyState, 'done', | ||
'request done flag should be set following error'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is following
correct? It seems to me that the test is asserting that readyState
is done
before error is fired.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I waffled on that terminology. I was thinking "the error happened which caused us to enqueue an event to go out..." but since it's confusing I'll change it to 'on' or something.
*This report has been truncated because the total content is 295569 characters in length, which is in excess of GitHub.com's limit for comments (65536 characters). Sauce (safari)Testing web-platform-tests at revision fb5efa4 All results308 tests ran/IndexedDB/abort-in-initial-upgradeneeded.html
/IndexedDB/bindings-inject-key.html
/IndexedDB/clone-before-keypath-eval.html
/IndexedDB/close-in-upgradeneeded.html
/IndexedDB/cursor-overloads.htm
/IndexedDB/delete-request-queue.html
/IndexedDB/error-attributes.html
/IndexedDB/event-dispatch-active-flag.html
/IndexedDB/fire-error-event-exception.html
/IndexedDB/fire-success-event-exception.html
/IndexedDB/fire-upgradeneeded-event-exception.html
/IndexedDB/idb-binary-key-detached.htm
/IndexedDB/idb-binary-key-roundtrip.htm
/IndexedDB/idb_webworkers.htm
/IndexedDB/idbcursor-advance-continue-async.htm
/IndexedDB/idbcursor-advance-exception-order.html
/IndexedDB/idbcursor-advance-invalid.htm
/IndexedDB/idbcursor-advance.htm
/IndexedDB/idbcursor-continue-exception-order.htm
/IndexedDB/idbcursor-continue.htm
/IndexedDB/idbcursor-continuePrimaryKey-exception-order.htm
/IndexedDB/idbcursor-continuePrimaryKey.htm
/IndexedDB/idbcursor-delete-exception-order.htm
/IndexedDB/idbcursor-direction-index-keyrange.htm
/IndexedDB/idbcursor-direction-index.htm
/IndexedDB/idbcursor-direction-objectstore-keyrange.htm
/IndexedDB/idbcursor-direction-objectstore.htm
/IndexedDB/idbcursor-direction.htm
/IndexedDB/idbcursor-key.htm
/IndexedDB/idbcursor-primarykey.htm
/IndexedDB/idbcursor-reused.htm
/IndexedDB/idbcursor-source.htm
/IndexedDB/idbcursor-update-exception-order.htm
/IndexedDB/idbcursor_advance_index.htm
/IndexedDB/idbcursor_advance_index2.htm
/IndexedDB/idbcursor_advance_index3.htm
/IndexedDB/idbcursor_advance_index5.htm
/IndexedDB/idbcursor_advance_index6.htm
/IndexedDB/idbcursor_advance_index7.htm
/IndexedDB/idbcursor_advance_index8.htm
/IndexedDB/idbcursor_advance_index9.htm
/IndexedDB/idbcursor_advance_objectstore.htm
/IndexedDB/idbcursor_advance_objectstore2.htm
/IndexedDB/idbcursor_advance_objectstore3.htm
/IndexedDB/idbcursor_advance_objectstore4.htm
/IndexedDB/idbcursor_advance_objectstore5.htm
/IndexedDB/idbcursor_continue_index.htm
/IndexedDB/idbcursor_continue_index2.htm
/IndexedDB/idbcursor_continue_index3.htm
/IndexedDB/idbcursor_continue_index4.htm
/IndexedDB/idbcursor_continue_index5.htm
/IndexedDB/idbcursor_continue_index6.htm
/IndexedDB/idbcursor_continue_index7.htm
/IndexedDB/idbcursor_continue_index8.htm
/IndexedDB/idbcursor_continue_invalid.htm
/IndexedDB/idbcursor_continue_objectstore.htm
/IndexedDB/idbcursor_continue_objectstore2.htm
/IndexedDB/idbcursor_continue_objectstore3.htm
/IndexedDB/idbcursor_continue_objectstore4.htm
/IndexedDB/idbcursor_continue_objectstore5.htm
/IndexedDB/idbcursor_continue_objectstore6.htm
/IndexedDB/idbcursor_delete_index.htm
/IndexedDB/idbcursor_delete_index2.htm
/IndexedDB/idbcursor_delete_index3.htm
/IndexedDB/idbcursor_delete_index4.htm
/IndexedDB/idbcursor_delete_index5.htm
|
Sauce (MicrosoftEdge)Testing web-platform-tests at revision fb5efa4 |
Oooh, good catch, bots - Chrome is actually flaky for
|
Disabling the flaky assertions for now. |
Tests for cases in w3c/IndexedDB#202 that weren't obviously covered already - the properties of the request (readyState, result, error) during upgradeneeded, after transaction complete/abort, and after success/error.
The tests pass locally in Firefox and Chrome.