[wpt-sync] Sync PR 36353 - Reorganize css-color parsing tests
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox108 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 36353 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/36353
Details from upstream follow.
Gordon P. Hemsley <me@gphemsley.org> wrote:
Reorganize css-color parsing tests
There seems to be a prevailing convention in how parsing tests are named:
<property>-{valid,invalid,computed}.html
.But css-color parsing tests have generally not been using this convention, in part because the css-color family of specs are in a seemingly rare position where the bulk of the standard revolves around a single CSS property (
color
) and the breadth of variability is in the definition of a single<color>
grammar definition used to determine its value.In the infrequent instances where parsing tests elsewhere have been subdivided, there have not been strong conventions as to how. After some analysis, I've concluded that
<property>-{valid,invalid,computed}-<feature>.html
is the most logical extension, given the corresponding undivided convention. (With features named according to terms of the spec, usingat-<name>
for at-rules and<name>-function
for functions.)Additionally, because css-color was one of the earlier efforts under the banner of "CSS 3", there exist a standard (level 3) and a set of tests that predate comprehensive behavior documentation, as well as implementations. This is being rectified in level 4, which goes into much more detail. But level 4 has also added new functionality which has not yet been fully implemented. These factors combined have meant that, over the years, developers have continued to add their complex, feature-specific tests for level 4 on top of the simple and basic tests for level 3, clouding the waters around who has implemented what, whether implementations are complete, and whether test coverage is comprehensive.
It has also meant, in some cases, that entire separate tests have been created for simple, singular parsing questions.
To rectify all that, I have gone through and restructured and reorganized the existing tests.
I have renamed a number of existing files to match the new convention for features, and split out the level 3 tests from the level 4 tests. I have also carried this through for upcoming level 5 and level 6 features. (I have borrowed the
.tentative
convention I saw elsewhere for the level 6 features, as that spec indicates it is not yet ready for implementations.)This leaves us with the following breakdown of features:
- Level 3 (undivided)
- Level 4:
- rgb
- system-color
- hsl
- hwb
- lab
- color-function
- Level 5:
- color-mix-function
- relative-color
- Level 6 (tentative):
- color-contrast-function
Some of these files are very slim and some obvious features are missing altogether, which suggests that there is still plenty of work to do.
The following independent css-color files have been eliminated as a side effect of integration:
- color-function-parsing.html
- rgb-rounding-001.html
- parsing/color-mixed-num-pct.html
I have also identified the following files as also being parsing tests, but I have not integrated them here because of their relative complexity:
- color-resolving.html
- color-resolving-keywords.html
- color-resolving-hsl.html
- color-resolving-hwb.html
I think future work should integrate them into this parsing paradigm.
cc @csnardi @weinig @svgeesus @ericwilligers @mirisuzanne @mysteryDate @emilio @josepharhar @jkeitel @ewilligers @SamMauldin @alisonmaher @BorisChiou
#interop-2022-color
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 4•3 years ago
|
||
Comment 5•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f28a8ae1b7f3
https://hg.mozilla.org/mozilla-central/rev/63e8c67e407d
Description
•