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

[html] Refactor tests #19918

Merged

Conversation

jugglinmike
Copy link
Contributor

@jugglinmike jugglinmike commented Oct 26, 2019

testharness.js was recently extended with an API to explicitly opt-in to
the "single page test" feature [1]. As per WPT RFC 28 [2], tests which
do not use this API and which do not declare any subtests will soon be
reported as a harness error.

Update some tests which previously opted in implicitly to use the new
API. Update others to instead declare a single subtest (so that they are
no longer single-page tests).

[1] #19449
[2] https://github.com/web-platform-tests/rfcs/blob/master/rfcs/single_test.md

foolip added a commit that referenced this pull request Oct 26, 2019
This is an alternative to adding `setup({ single_test: true })` in
#19918
foolip added a commit that referenced this pull request Oct 26, 2019
This is an alternative to adding `setup({ single_test: true })` in
#19918.
foolip added a commit that referenced this pull request Oct 26, 2019
This is an alternative to adding `setup({ single_test: true })` in
#19918.
foolip added a commit that referenced this pull request Oct 26, 2019
This is an alternative to adding `setup({ single_test: true })` in
#19918.
foolip added a commit that referenced this pull request Oct 26, 2019
This is an alternative to adding `setup({ single_test: true })` in
#19918.
@@ -12,6 +12,7 @@

<script>
"use strict";
setup({ single_test: true });
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer test(() => { ... }) wrapping here and for the other synchronous tests in this PR. (This is the first one.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've made the change you requested. Many of these tests (and still more in the related pull requests) could be expressed with a single async_test by swapping out done() for t.done(). Do you think that's preferable, too?

@@ -6,6 +6,8 @@
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script>
setup({ single_test: true });
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer #19926 to this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay. I've merged your pull request and removed all modifications from this changeset so it will merge cleanly.

jugglinmike pushed a commit that referenced this pull request Oct 28, 2019
This is an alternative to adding `setup({ single_test: true })` in
#19918.
Copy link
Member

@foolip foolip left a comment

Choose a reason for hiding this comment

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

@jugglinmike this looks good now, leaving merging to you in case you want to tweak the commit message

testharness.js was recently extended with an API to explicitly opt-in to
the "single page test" feature [1]. As per WPT RFC 28 [2], tests which
do not use this API and which do not declare any subtests will soon be
reported as a harness error.

Update some tests which previously opted in implicitly to use the new
API. Update others to instead declare a single subtest (so that they are
no longer single-page tests).

[1] web-platform-tests#19449
[2] https://github.com/web-platform-tests/rfcs/blob/master/rfcs/single_test.md
@jugglinmike jugglinmike changed the title [html] Opt-in to single-page test feature [html] Refactor tests Oct 29, 2019
@jugglinmike
Copy link
Contributor Author

Thanks! I've rebased and reworded the commit and updated the title/description of this pull request accordingly. The original version of this branch is available here. The latest version just passed in CI, so I'll do the honors.

@jugglinmike jugglinmike merged commit efe71da into web-platform-tests:master Oct 29, 2019
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 20, 2019
…o promise_test, a=testonly

Automatic update from web-platform-tests
[html] Convert srcdoc_change_hash.html to promise_test

This is an alternative to adding `setup({ single_test: true })` in
web-platform-tests/wpt#19918.
--

wpt-commits: 2127be728a1d785b3443eaec5955070c0908aa62
wpt-pr: 19926

Differential Revision: https://phabricator.services.mozilla.com/D53517
xeonchen pushed a commit to xeonchen/gecko that referenced this pull request Nov 20, 2019
…o promise_test, a=testonly

Automatic update from web-platform-tests
[html] Convert srcdoc_change_hash.html to promise_test

This is an alternative to adding `setup({ single_test: true })` in
web-platform-tests/wpt#19918.
--

wpt-commits: 2127be728a1d785b3443eaec5955070c0908aa62
wpt-pr: 19926

Differential Revision: https://phabricator.services.mozilla.com/D53517
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Nov 21, 2019
…o promise_test, a=testonly

Automatic update from web-platform-tests
[html] Convert srcdoc_change_hash.html to promise_test

This is an alternative to adding `setup({ single_test: true })` in
web-platform-tests/wpt#19918.
--

wpt-commits: 2127be728a1d785b3443eaec5955070c0908aa62
wpt-pr: 19926

Differential Revision: https://phabricator.services.mozilla.com/D53517

UltraBlame original commit: c1d0439f81cad16038d0c7d8fa991c93bcb807de
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Nov 21, 2019
…o promise_test, a=testonly

Automatic update from web-platform-tests
[html] Convert srcdoc_change_hash.html to promise_test

This is an alternative to adding `setup({ single_test: true })` in
web-platform-tests/wpt#19918.
--

wpt-commits: 2127be728a1d785b3443eaec5955070c0908aa62
wpt-pr: 19926

Differential Revision: https://phabricator.services.mozilla.com/D53517

UltraBlame original commit: c1d0439f81cad16038d0c7d8fa991c93bcb807de
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Nov 21, 2019
…o promise_test, a=testonly

Automatic update from web-platform-tests
[html] Convert srcdoc_change_hash.html to promise_test

This is an alternative to adding `setup({ single_test: true })` in
web-platform-tests/wpt#19918.
--

wpt-commits: 2127be728a1d785b3443eaec5955070c0908aa62
wpt-pr: 19926

Differential Revision: https://phabricator.services.mozilla.com/D53517

UltraBlame original commit: c1d0439f81cad16038d0c7d8fa991c93bcb807de
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants