Re: Using WPT as unit tests for polyfill libraries?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/18/2015 06:36 AM, Glen Huang wrote:
> @Ms2ger
> 
> Thanks for the quick reply. I’ll be sure to check wptrunner out.
> 
> I’m also planning to contribute a few tests. I wonder if a spec has
> to reach certain level before tests can be added to wpt? For 
> example, tests for the ChildNode interface introduced in dom4 seems
> to be missing from wpt.

Not at all; this is probably more the result of nobody trying to
implement these features yet. (Note that the DOM spec [1] is unversioned.)

> If I submit tests like these, will they be merged? What happens if
>  specs do introduce breaking changes?

Then we update the tests, that's no big deal.

> Also, some tests are unlikely to fail in browsers but polyfill 
> libraries might fail them. For example, many classList polyfill 
> libraries treat classList.toggle(“name”, undefined) the same as 
> classList.toggle(“name”). Will wpt be interested in merging tests 
> like these?

As long as they match the spec, they're welcome. (I believe such
polyfills would be correct, though.)

HTH
Ms2ger

[1] https://dom.spec.whatwg.org/
-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJU5GrmAAoJEOXgvIL+s8n2paQH/iIIPXSEolOJ6bz5IlE3U6xX
dy/e/EB/+CiYELjK7XdPZBf4LPG4mkUP5g160TtZTarmUh6CphlFuRfe8VUnmeIh
78GiIwjSYDynmjBO4ifoUiwwu18fuZitm/V0xwjEQqpQ1JQnSdkV9WZdy8yVPzWX
rhCsmRHNBr5To/Vaii+5Gq28z1mu53CwpaQnJeRqVmhqHSx+67XNoaB0ZtQWSF8N
zphrmoZonOGyWe5EK5Rczy1J4ve9SmglsPw/kfnxZT8OZ36XqIZVNxCBR2mrknV2
93yiTI4xu0PqfH39CD/9pk03jbs2u+F3oSxjCuLr5nBrF1ByqiBGHtqSV8ulEPo=
=73WA
-----END PGP SIGNATURE-----

Received on Wednesday, 18 February 2015 10:35:59 UTC