W3C home > Mailing lists > Public > public-css-testsuite@w3.org > March 2017

[css-conditional-3] Review of Cameron McCormack's conditional rules tests ( @supports )

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Wed, 22 Mar 2017 23:08:39 -0400
To: Cameron McCormack <cam@mcc.id.au>
Cc: Public CSS Test suite mailing list <public-css-testsuite@w3.org>
Message-ID: <ffa86c925d626aa94d5475118344346b@gtalbot.org>
Cameron,

Some feedback. Overall, your tests are excellent. Consider the following 
as mere proposals and, generally speaking, more accurate text asserts.

- - - - - -

http://test.csswg.org/suites/css-conditional-3_dev/nightly-unstable/html/css-supports-001.htm 
test:

     @supports (color: green) {
       html { background-color: green }
     }

I do not understand why the tested property and value (declaration 
block) are not the one being applied in the test. It is like testing for 
"x" but doing something unrelated if "x" is supported. Several examples 
in the spec do something related to "x" if support for "x" is true. Eg 
@supports (display: flex) { body {display: flex} } is coherent and 
consequent. So, I would do:

     @supports (background-color: green) {
       html { background-color: green }
     }

This comment also affect a wide majority of your tests.

- - - - - -

http://test.csswg.org/suites/css-conditional-3_dev/nightly-unstable/html/css-supports-005.htm 
test:

html { background-color: green }
     @supports (color: rainbow) {
       html { background-color: red }
     }

Proposal:
html { background-color: green }
     @supports (background-color: rainbow) {
       html { background-color: red }
     }

or even

html { background-color: green }
     @supports (background-color: foo) {
       html { background-color: red }
     }

which is more in the spirit of the goal, purpose of the spec.

- - - - - -

http://test.csswg.org/suites/css-conditional-3_dev/nightly-unstable/html/css-supports-006.htm 
test:

<meta name="assert" content="A disjunction of two @supports conditions 
must cause the @supports condition to pass if the left condition 
passes.">

Proposal:
<meta name="assert" content="A disjunction of two @supports conditions 
must cause the @supports condition to pass if one of the 2 conditions 
passes. In this test, the right condition passes.">

- - - - - -

http://test.csswg.org/suites/css-conditional-3_dev/nightly-unstable/html/css-supports-009.htm 
test:

<meta name="assert" content="A conjunction of two @supports conditions 
must cause the @supports condition to fail if the left sub-condition 
passes.">

The spec does not use the term sub-condition; maybe it should. 
Otherwise, I would not use the term sub-condition in the assert text.

Proposal:
<meta name="assert" content="A conjunction of two @supports conditions 
must cause the @supports condition to fail if one of the 2 condition 
fails. In this test, the left condition fails.">

- - - - - -

http://test.csswg.org/suites/css-conditional-3_dev/nightly-unstable/html/css-supports-010.htm 
test:

<meta name="assert" content="A conjunction of two @supports conditions 
must cause the @supports condition to fail if the right sub-condition 
passes.">

Proposal:
<meta name="assert" content="A conjunction of two @supports conditions 
must cause the @supports condition to fail if one of the 2 conditions 
fails. In this test, the right condition fails.">

- - - - - -

http://test.csswg.org/suites/css-conditional-3_dev/nightly-unstable/html/css-supports-032.htm 
test:

<meta name="assert" content="An @supports condition must successfully 
parse and evaluate to false a parenthesized expression has invalid 
syntax.">

Proposal:
<meta name="assert" content="An @supports condition must successfully 
parse and evaluate to false if a parenthesized expression has invalid 
syntax.">

"if" is missing

- - - - - -

http://test.csswg.org/suites/css-conditional-3_dev/nightly-unstable/html/css-supports-038.htm 
test:

<meta name="assert" content="An @supports condition with 'not(' must 
parse be parsed as a FUNCTION token.">

Proposal:
<meta name="assert" content="An @supports condition with 'not(' must be 
parsed as a FUNCTION token. In this test, there would have to be a white 
blank space between 'not' and '(' in order to be parsed as a negation of 
support condition.">

- - - - - -

http://test.csswg.org/suites/css-conditional-3_dev/nightly-unstable/html/css-supports-039.htm 
test:

<meta name="assert" content="An @supports condition with 'or(' must 
parse be parsed as a FUNCTION token.">

Proposal:
<meta name="assert" content="An @supports condition with 'or(' must be 
parsed as a FUNCTION token. In this test, there would have to be a white 
blank space between 'or' and '(' in order to be parsed as a disjunction 
of 2 support conditions. ">

Gérard
-- 
Test Format Guidelines
http://testthewebforward.org/docs/test-format-guidelines.html

Test Style Guidelines
http://testthewebforward.org/docs/test-style-guidelines.html

Test Templates
http://testthewebforward.org/docs/test-templates.html

CSS Naming Guidelines
http://testthewebforward.org/docs/css-naming.html

Test Review Checklist
http://testthewebforward.org/docs/review-checklist.html

CSS Metadata
http://testthewebforward.org/docs/css-metadata.html
Received on Thursday, 23 March 2017 03:09:19 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 23 March 2017 03:09:22 UTC