Re: block-formatting-contexts-010

Le Mar 18 octobre 2011 7:33, Alan Gresley a écrit :
> On 18/10/2011 10:43 AM, "Gérard Talbot" wrote:
>>
>> Le Lun 17 octobre 2011 19:04, Alan Stearns a écrit :
>>> I'm writing a css3-regions test to validate that a region creates a
>>> new
>>> block formatting context. So I've looked at existing tests in the
>>> css2.1
>>> testsuite. But I'm confused about block-formatting-contexts-010.xht
>>
>>
>> [RC6]
>> http://test.csswg.org/suites/css2.1/20110323/html4/block-formatting-contexts-010.htm
>>
>>
>> [nightly-unstable]
>> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/block-formatting-contexts-010.htm
>>
>>
>>
>> and
>>> some
>>> of its siblings.
>>
>>
>> [RC6] section 9.4.1 Block formatting contexts testcases
>> http://test.csswg.org/suites/css2.1/20110323/html4/chapter-9.html#s9.4.1
>>
>>
>> [nightly-unstable] section 9.4.1 Block formatting contexts testcases
>> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/chapter-9.html#s9.4.1
>>
>>
>>
>>> The test asserts that "Elements defined as inline-blocks establish a
>>> new
>>> block formatting context." But the test renders the same if I remove
>>> the
>>> display:inline-block line.
>>
>> Good observation!
>>
>>> Does this test actually check its assertion?
>>
>> I'd say no.
>>
>>
>> I will propose the following as a correction for such test:
>>
>> http://www.gtalbot.org/BrowserBugsSection/css21testsuite/block-formatting-contexts-010.html
>>
>>
>> regards, Gérard
>
> Gérard, that test is not testing a 'block formatting context'. The
> inline-block element has to have children that are block-level elements.
> Something more like this.
>
> http://css-class.com/test/css21testsuite/block-formatting-contexts-010.xht

Alan,

You're right.

Here's the additions and modifications I would propose on your testcase
version:

http://www.gtalbot.org//BrowserBugsSection/css21testsuite/block-formatting-contexts-010-AG.xht

1- A wrapping div to make the test pass HTML validation

2- one single child span so that the expected result matches the
previous testcase: we can then later create a reftest (better for
automation) for such batch of testcases.
See
http://test.csswg.org/suites/css2.1/20110323/html4/block-formatting-contexts-008.htm
http://test.csswg.org/suites/css2.1/20110323/html4/block-formatting-contexts-009.htm

3- child selector instead of descendant selector; overall, descendant
selector is over-used in the testsuite and on the web and often
unneedlessly used, recoursed. Child selector is less resources demanding
(parsing) also, furthermore if the tree of nodes is deep

4- a more semantic id attribute.

5- "box" is now "square"

6- "below" is removed; it is implicitly clear that the test output
follows the expected results sentence.

7- The assert text should be more complete, IMO.

regards, Gérard
-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 Test suite RC6, March 23rd 2011:
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

CSS 2.1 test suite harness:
http://test.csswg.org/harness/

Contributing to to CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html

Received on Tuesday, 18 October 2011 18:41:45 UTC