Re: CSS 2.1 tests: again (III)

Gabriele Romanato wrote:
> Just finished to upload the new tests:
> 
> http://www.css-zibaldone.com/test/more/

comments0.html
comments1.html
comments3.html
comments4.html

   These four are short enough and related enough that I'd combine
   them into one test, similar to
     http://www.w3.org/Style/CSS/Test/CSS2.1/current/xhtml1/t040109-c17-comments-00-b.xht

comments5.html

   This looks pretty good. I've checked it in as sgml-comments-000.xht.

   I also suggest creating

     - a more advanced version that tests different valid combinations of '<!--',
       '-->' and other bits of CSS.
     - an invalid version that makes sure '<!--' and '-->' in invalid places
       causes those rules to be ignored
     - an invalid version that makes sure combinations of '<', '!', '-', '>' that
       don't form '<!--' and '-->' also cause their associated rules to be ignored.

declaration1.html
declaration2.html

   For both of these, you should combine the valid declaration and the invalid
   declaration into one style rule. Preferably there should be a valid declaration
   both before and after the invalid declaration. We need to make sure that only the
   invalid declaration is ignored, not the whole style rule.

key.html

   This is already covered by dbaron's test
     http://www.w3.org/Style/CSS/Test/CSS2.1/current/xhtml1/t040102-keywords-00-b.xht
   so I think we'll skip it.

declaration0.html
parsingerror0.html

   I'd combine these two into one test, starting with
     p {
       color: green;
       text-color: red;
       font-color: red;
   and then adding more rules that append or prepend letters and/or punctuation to
   'color', e.g.
       -color: red;
       @color: red;
       color-: red;
       color(): red;
   etc. Since "font-color" and "text-color" are rather arbitrary strings that probably
   wouldn't be in the parser, it's unlikely that a UA will fail on those. It's more likely
   that the parser doesn't know where to begin, where to stop, and/or ignores unexpected
   punctuation instead of throwing out the whole declaration.

parsingerror1.html

   This is not so much a declaration parsing test as a color value parsing test. I'd
   link to
      http://www.w3.org/TR/CSS21/syndata.html#color-units
   as the primary section. Also, we don't know if a broken UA would treat #ff00 as red
   or yellow or some other color, so I'd just assert that the line is green and not
   mention red.

parsingerror2.html

   Again, you want to combine these into one style rule and make sure only the invalid
   declarations are thrown out, not the whole style rule. I'd also split each error
   into its own declaration, e.g. split "color:: red !" into "color:: red;" and
   "color: red !".this

parsingerror3.html

   I'd suggest splitting out the @font-face rule and turning this into a nested @media
   rule test for
     http://www.w3.org/TR/CSS21/media.html#at-media-rule
   You'll need to add some valid rules inside the top-level @media rule to make sure
   they aren't ignored, that only the rules inside the nested @media rule are ignored.

parsingerror4.html

   This test is incorrect. You need to swap "green" and "red".

parsingerror5.html

   Great test, however I'd change it slightly to add something like
     background: red;
     border: solid green;
   (and change the description appropriately) to make sure the parser recovers after
   the unfinished string.

rulesets0.html

   This is also a great test, but I'd mark it as primarily a test for Selector grouping
     http://www.w3.org/TR/CSS21/selector.html#grouping

rulesets1.html

   Similarly, I'd mark this as primarily a test for Descendant selectors
     http://www.w3.org/TR/CSS21/selector.html#descendant-selectors
   Also, I'd add a few rules doing such a combination with ID selectors or the universal
   selector
     div*
     div#foo
   Because the punctuation ends parsing of the div's token, these are more likely to
   trigger errors than combining alphanumeric tag selectors.

~fantasai

Received on Saturday, 12 January 2008 04:21:07 UTC