Re: Testing border-radius

"Kang-Hao (Kenny) Lu" <kanghaol@oupeng.com> a écrit :

> (12/10/22 3:09), Gérard Talbot wrote:
>> As far as I am concerned and involved, such goal is a rule: you want
>> only-CSS1-capable browsers and only-CSS2.1-capable browsers to fail
>> such tests. Sometimes, such goal is not possible, achievable,
>> therefore there are exceptions.
>
> For any 'border-radius' reftests, it is possible. You just include a
> dummy reftest like the one I come up with. The question is, doing that
> seems to obscure the real test and so I would not think it is a good idea.
>
> (12/10/22 3:09), Gérard Talbot wrote:
>> If I understand your test - and I'm not sure that I do right now - ,
>> this is an extreme and edge case.
>
> The test is
>
> https://test.csswg.org/shepherd/testcase/border-radius-clipping/name/border-radius-clipping/
>
> Is the part that you consider extreme and edge actually the "dummy" part?
>
> (12/10/22 3:43), Gérard Talbot wrote:
>> Such requirement is not obtainable realistically speaking.
>>
>> E.g.
>>
>> http://test.csswg.org/source/contributors/ttwf_bj/silverma/submitted/border-radius-horizontal-value-is-zero.html
>>
>> This is an OK test; this is a reasonable test. Albeit there are some
>> issues with the test but, as far as failing in
>> non-capable-CSS3-border-radius browsers, the test is adequate,
>> appropriate.
>
> I am not getting this. Commenting out 'border-radius' in this test would
> still satisfly "The test passes if the rectangle has four square corners
> (no red is shown)."

Yes: commenting out 'border-radius' in that test would still satisfy  
the pass/fail conditions sentence.

> How does it fail non-capable-CSS3-border-radius
> browsers?

Kang-Hao,

Such test does not fail in non-capable-CSS3-border-radius browsers.  
This is an exception to the rule I mentioned. As a general rule, when  
creating CSS3 (module) tests, you want tests to fail in  
only-CSS1-capable browsers.


>>> 2) have some
>>> statements like "FAIL if the corners are not rounded."
>>
>> I suggest to use
>>
>> Test passes if the 4 corners of the rectangle are <strong>rounded</strong>.
>>
>> Test passes if the 4 corners of the rectangle are <strong>square</strong>.
>>
>> I recommend to use the same introductory formulation: Test passes if
>> [boolean condition].
>
> We could do that, but aren't reftests supposed to not to require human
> inspection?

We prefer self-describing tests with their correspondent reftests.

"
(...) it allows for both machine comparison and manual  
verification–particularly useful if the test and the reference both  
render incorrectly in the same way!
"

Reftests
http://wiki.csswg.org/test/reftest


>>> So, should we drop that requirement or do we actually allow test
>>> submitters to do something like 2) ? I feel like I am misunderstanding
>>> the requirement so I'd like to be educated.
>>
>> There is a number of situations where border-radius declarations can not
>> create rounded corners. Therefore, such requirement can not in all
>> fairness be applied.
>
> What do we do for test cases like these then? Do we have a list of these
> exceptions?

Regarding border-radius, I gave 2 examples of exception: table  
elements and internal table elements. If you are testing table with  
border-collapsed tables, then those tests should display square  
corners, not rounded corners... and such tests will "pass" in  
only-CSS1-capable browsers.

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/

Received on Monday, 22 October 2012 01:34:17 UTC