W3C home > Mailing lists > Public > public-css-testsuite@w3.org > January 2015

Re: talk about a reftest test

From: Linss, Peter <peter.linss@hp.com>
Date: Mon, 19 Jan 2015 21:44:40 +0000
To: "Xu, JianfengX" <jianfengx.xu@intel.com>
CC: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>
Message-ID: <D6567E7B-9E81-433B-AD06-FCDB09CD6BB8@hp.com>

On Jan 15, 2015, at 9:34 PM, Xu, JianfengX <jianfengx.xu@intel.com> wrote:

> Hey all,
> I am a case developer. Just talk about an issue about reftest background-001.xht(saved at csswg-test/css21/backgrounds) which is used to check background with color only sets the background of the element to the color specified. And the css style of this case is as below:
>             div {
>                    background: green,
>                    height: 50px;
>                 }
> The reference file for this case used now is setting a 1x1-green.png picture as background of a div. But the render result is not the same as the origin case(I save these two web pages as pictures, compare them with image comparison tool, and find there are different).
> So I create another reference file for this case using the following css style:
>             div {
>                    background: rgb(0,128,0),
>                    height: 50px;
>                 }
> I am not sure if this is all right. Would you please share your opinion with me? Too many thanks.

The problem with this reference file is that you're not testing what you think you're testing. Since the only difference between the test and the reference is 'green' versus 'rgb(0,128,0)', all you are testing is if 'green' really matches 'rgb(0,128,0)'. Note that the reference file will match the test (and give a false positive result) if the client doesn't render the background at all, or if both 'green' and 'rgb' colors are rendered as black.

If you want to test if the 'background' property is being applied, you need to have a reference file that creates a colored area using a completely different mechanism, like using an <img>, not a background.


Received on Monday, 19 January 2015 21:46:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 20 January 2023 19:58:20 UTC