Skip to content
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 event properties #5108

Merged
merged 2 commits into from Mar 10, 2017
Merged

IndexedDB: Add tests for event properties #5108

merged 2 commits into from Mar 10, 2017

Conversation

inexorabletash
Copy link
Contributor

Add tests that verify the bubbles and cancelable properties of events fired during open and transaction abort.

@wpt-pr-bot
Copy link
Collaborator

@inexorabletash
Copy link
Contributor Author

@pwnall - can you review these?

w3c/IndexedDB#86 for context

Note that the test and spec disagree about the cancelable attribute for the event fired from open(), but the test passes in Blink and Gecko. Spec says "false", tests/implementations say "true" - I'll fix the spec once this is ready.

@w3c-bots
Copy link

w3c-bots commented Mar 9, 2017

View the complete job log.

Firefox (nightly channel)

Testing web-platform-tests at revision 5f8cbf4e1d5743d9fad01ac167ab48ddcd134fea
Using browser at version BuildID 20170306110339; SourceStamp 966464a68a2cb3ca1125808e34abb5c1d34e3797
Starting 10 test iterations
All results were stable

All results

2 tests ran
/IndexedDB/idbfactory-open-error-properties.html
Subtest Results Messages
OK
Properties of error event from failed open() PASS
/IndexedDB/transaction-abort-request-error.html
Subtest Results Messages
OK
Properties of error events fired at requests when aborting a transaction PASS

@w3c-bots
Copy link

w3c-bots commented Mar 9, 2017

View the complete job log.

Chrome (unstable channel)

Testing web-platform-tests at revision 5f8cbf4e1d5743d9fad01ac167ab48ddcd134fea
Using browser at version 58.0.3029.6 dev
Starting 10 test iterations
All results were stable

All results

2 tests ran
/IndexedDB/idbfactory-open-error-properties.html
Subtest Results Messages
OK
Properties of error event from failed open() PASS
/IndexedDB/transaction-abort-request-error.html
Subtest Results Messages
OK
Properties of error events fired at requests when aborting a transaction PASS

assert_equals(request.error.name, 'AbortError',
'Request\'s error should be AbortError');

assert_equals(e.target, request, 'event target was request');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this "was" rather than the usual "should be"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason. Probably just sleepy - I'll fix.

Copy link
Contributor

@pwnall pwnall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one nit.

inexorabletash added a commit to w3c/IndexedDB that referenced this pull request Mar 9, 2017
)

The spec defines the error events thrown from open() and deleteDatabase() with cancelable false, but implementations have this as true. Align the spec with reality.

Also:

* Make various asides into details with summaries - for "why aren't the normal fire a success/error event steps used?", and to explain why the name and version getters are convoluted.
* Fix the autolinking for deleteIndex
* Flesh out the change history with recent big changes.

Tests coming in: web-platform-tests/wpt#5108
@inexorabletash inexorabletash merged commit f0326bc into web-platform-tests:master Mar 10, 2017
@inexorabletash inexorabletash deleted the event-properties branch March 10, 2017 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants