Re: CSS parsing tests.

On Mon, May 20, 2019 at 11:11 AM Emilio Cobos Álvarez
<emilio@mozilla.com> wrote:
>
> Hi Eric,
>
> So there's a bunch of tests that you've been adding to WPT like[1].
> They're great, thanks for that.
>
> I wonder if we should auto-generate them using bikeshed.
>
> As part of reviewing the custom-properties spec I implemented the syntax
> parser[2]. It shouldn't be a lot of work to polish it, and wire it in
> such a way that it peeks data from the specs, parses the syntax of the
> property, and then uses the parsed representation to generate a bunch of
> tests, much like people are doing with idlharness, if my understanding
> is correct.
>
> It's less easy to add rules and exceptions to test how the property
> serializes exactly, but it should be trivial to test that the value
> parses, and that the serialized-value round-trips correctly.
>
> So I see it more like a complement to your tests than a replacement.
> Would that be something desirable?
>
>   -- Emilio
>
> [1]:
> https://github.com/web-platform-tests/wpt/commit/694ccf5329645c1a01a9f4b22dc19e26951de303
> [2]: https://github.com/emilio/css-typed-om-syntax

There's a bunch of discussion about more or less this in
https://github.com/web-platform-tests/wpt/issues/9113.

/Sam

Received on Tuesday, 21 May 2019 14:12:28 UTC