Re: Valid to use subproperties as reference file for shorthand property test?

On Tue, Nov 11, 2014 at 6:31 PM, Zhang, Zhiqiang
<zhiqiang.zhang@intel.com> wrote:
> Hi,
>
> My colleague (CC'ed) is trying to create some reference files to automate CSS tests.
>
> After reading a test at
>
> https://github.com/w3c/csswg-test/blob/master/css21/fonts/font-044.xht
>
> ... that "a system font sets all of the font subproperties at the same time; then each font subproperty can be altered individually",
> ... he creates a reference file at
>
> https://github.com/chenxix/csswg-test/blob/473dafa9a5420cd7e0ee583789a7d109109d0ca6/css21/fonts/font-003-ref.html
> span {
>   font-variant: small-caps;
>   font-size: 1in;
>   font-family: serif;
>   line-height: 1em;
> }
>
> ... for the test case at
> https://github.com/chenxix/csswg-test/blob/473dafa9a5420cd7e0ee583789a7d109109d0ca6/css21/fonts/font-003.xht
> span
> {
>   font: small-caps 1in serif;
>   line-height: 1em;
> }
>
> Is this a valid method to create reference file?
>
> Per http://testthewebforward.org/docs/reftests.html#2-the-reftest-reference-file, "reference file must not use the same features that are being tested, but uses a different method to produce the same rendering as a test file", seems this method is not acceptable.
>
> Feel free to review the reference files at
> https://github.com/w3c/csswg-test/pull/604

If you are specifically testing the shorthand expansion, that is fine.
If you're trying to test something else, such as whether small-caps
works, then no, this doesn't work.

~TJ

Received on Wednesday, 12 November 2014 03:50:11 UTC