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

RE: New tests submission for css3 background-clip/-origin/-size

From: Zhang, Zhiqiang <zhiqiang.zhang@intel.com>
Date: Mon, 15 Oct 2012 03:04:30 +0000
To: "Gérard Talbot" <css21testsuite@gtalbot.org>
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>
Message-ID: <0EA8FB2070816C499E0A50AC1B0B5C161D56EC@SHSMSX101.ccr.corp.intel.com>
Gérard,

Thank you very much on your feedbacks. I really appreciate your review of my tests.
 
> 
> Zhiqiang,
> 
> Here's a preliminary review of 1 test.
> 
> http://test.csswg.org/source/contributors/intel/submitted/css3-
> background/background-334.html
> 
> 1-
> a)
> The test is obviously about background shorthand: so the title element
> should say so.

Updated @ https://hg.csswg.org/test/rev/4a42bfba3b60

> 
> b)
> "
> For specifications other than CSS 2.1, you can include the module name
> somewhere before the colon, like "CSS Selectors Test:" or "CSS Test
> (Selectors):". Do not include the module version number, since the test
> might get reused for the next version.
> "
> http://wiki.csswg.org/test/format#title-element
> 
> So,
> <title>CSS Test (Backgrounds and Borders): (...)</title>
> or
> <title>CSS Backgrounds and Borders Test: (...)</title>

Updated @ https://hg.csswg.org/test/rev/b3381a9594e0

> 
> are okay.
> 
> 2-
> The test design and assert text suggest that background-size '100% auto'
> will imply a rescale of the background-image to fill the background
> area.
> 
> 3-
>             top: 1px;
>             left: 1px;
> 
> I wondered why top and left 1px.
> 
>             width: 158px;
>             height: 158px;
>             background: red;
>         }
>         #test {
>             position: absolute;
>             top: 0px;
>             left: 0px;
>             width: 100px;
>             height: 100px;
>             padding: 25px;
>             border: 5px dotted #000000;
> 
> The overlapping #test generates a 160px wide and 160px tall CSS box
> while the red-overlapped #ref generates a 158px by 158px box; the only
> possible reason I can imagine would be to counter/take into account
> anti-aliasing.

Yes. This is referred to http://test.csswg.org/source/contributors/ttwf/samples/ttwf-reftest-tutorial-001.html, and I think it's a good practice.

> 
> 4-
> The code (CSS declarations and markup structure) could be made more
> compact without affecting the goal of the test: see
> 
> http://www.gtalbot.org/BrowserBugsSection/review/background-334-
> review.html

Great. I'll revise my test.

> 
> uses 2 <div>s, 2 rules and 10 declarations.
> 
> 5-
> Generally speaking, absolute positioning with 'top: auto' and 'left:
> auto' (implicit on #container) is to be avoided because of multiple
> renderings allowed (when determining the static position and if margin
> collapsing occurs) by CSS:
> 
> "
> But rather than actually calculating the dimensions of that hypothetical
> box, user agents are free to make a guess at its probable position.
> "
> http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width
> and
> http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height
> 
> On the other hand, top: auto and left: auto for relatively positioned
> element is preferred because more reliable, trustworthy.
> 
> 6-
> It is preferable (although optional) to list declarations in
> alphabetical order. This helps review.

Cool. I'll revise my tests.

Would you please revise the sample test http://test.csswg.org/source/contributors/ttwf/samples/ttwf-reftest-tutorial-001.html per #5 and #6? This is helpful for the upcoming event http://testthewebforward.org/beijing-2012.html

> 
> 7-
> <style type="text/css">
> is not a mistake but isn't needed for HTML5.
> 
> Trailing / at closing tag are not necessary for HTML5.

Updated @ https://hg.csswg.org/test/rev/655961ffdb98

> 
> You are encouraged to always use/reuse the templates available at
> http://wiki.csswg.org/test/format#template-for-new-tests
> 
Received on Monday, 15 October 2012 03:05:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 15 October 2012 03:05:11 GMT