Skip to content

Separate week and month cases from selection-not-application.html - #32479

Merged
josepharhar merged 3 commits into
web-platform-tests:masterfrom
josepharhar:weekmonth
Mar 18, 2022
Merged

josepharhar merged 3 commits into
web-platform-tests:masterfrom
josepharhar:weekmonth

Conversation

@josepharhar

Copy link
Copy Markdown
Contributor

This was discussed here:
web-platform-tests/interop#11 (comment)

@foolip

foolip commented Jan 20, 2022

Copy link
Copy Markdown
Member

Thanks @josepharhar!

Just in case you haven't seen the mechanism, do you think https://web-platform-tests.org/writing-tests/testharness.html#variants would be an improvement here? If the test is copied and edited, one can get basically the same result by doing something like this:

<meta name="variant" content="">
<meta name="variant" content="?week,month">
...
<script>
...
var nonApplicableTypes = ["hidden", "email", "datetime-local", "date", "time", "number", "range", "color", "checkbox", "radio", "file", "submit", "image", "reset", "button"];
if (location.search) {
  nonApplicableTypes = location.search.substr(1).split(',');
}
</script>

This also incidentally allows tweaking the URL to subset the tests for debugging purposes, although only if one understands how the variants stuff is set up.

This would also make it easy to later merge the tests again by deleting the variants bits.

@foolip

foolip commented Jan 21, 2022

Copy link
Copy Markdown
Member

@josepharhar if you take that suggestion, I think you should also remove the early return in "Type is not supported - don't bother with the following checks" so that the tests run unconditionally. That's consistent with what I did in #32468.

@josepharhar

Copy link
Copy Markdown
Contributor Author

Done and done, thanks for the suggestion!

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.

3 participants