W3C home > Mailing lists > Public > public-css-testsuite@w3.org > October 2012

background-size-013 text assert (Re: New tests submission for css3 background-clip/-origin/-size)

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Sat, 13 Oct 2012 18:56:34 -0400
Message-ID: <10d07cdad57826970cf9ba6489d26e8c.squirrel@ed-sh-cp3.entirelydigital.com>
To: "Zhang, Zhiqiang" <zhiqiang.zhang@intel.com>
Cc: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>, "Christensen, Kenneth" <kenneth.christensen@intel.com>, "Zhang, Haili" <haili.zhang@intel.com>, "Yu, Ling L" <ling.l.yu@intel.com>, "Yang, Lei A" <lei.a.yang@intel.com>

Le Sam 13 octobre 2012 5:09, Zhang, Zhiqiang a écrit :
> Hello,
> I would like to submit the following tests:
> https://hg.csswg.org/test/rev/e96e00bc2454
> We are verifying the conformance with the following sections of
> css3-background spec:
> http://www.w3.org/TR/css3-background/#the-background-clip
> http://www.w3.org/TR/css3-background/#the-background-origin
> http://www.w3.org/TR/css3-background/#the-background-size
> http://www.w3.org/TR/css3-background/#the-background
> http://www.w3.org/TR/css3-background/#values
> Review is appreciated:
> https://test.csswg.org/shepherd/search/testcase/author/intel/status/submitted/
> Thanks,
> Zhiqiang


line 10:     <meta name="assert" content="Check if 'background-size' is
'auto 45px' and 'background-repeat' is 'no-repeat' that the background
is shown with a height of 100px and its width is scaled proportionally
to keep the original aspect ratio" />

line 30:    background-image: url(support/60x60-green.png);
line 31:    background-size: auto 45px;
            background-repeat: no-repeat;

The height of background-image is 45px (and not 100px) since
The first value gives the width of the corresponding image, the second
value its height.

One aspect of the test that is maybe weak is that the intrinsic
dimensions of background-image are larger and taller than the tested
values. So, if an UA does not support background-size or does not scale
down (from 60px to 45px) the background-image, then the test will pass
anyway when it should fail. A way to counteract or compensate this is to
create a reversed test that has the red #test being background-sized
down (from say 100px intrinsic to 60px) and then have a smaller green
square #ref (say a 60x60 green square) overlap it.

red_box.png is 100px by 100px in

Contributions to the CSS 2.1 test suite:

CSS 2.1 Test suite RC6, March 23rd 2011:

CSS 2.1 test suite harness:

Contributing to to CSS 2.1 test suite:
Received on Saturday, 13 October 2012 22:57:09 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:13:25 UTC