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

Re: Format guidelines for tests (particularly HTML5)

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Mon, 16 Apr 2012 15:04:50 -0400
Message-ID: <53b5502e0a3397cab4bdddc5c533beef.squirrel@ed-sh-cp3.entirelydigital.com>
To: "Linss, Peter" <peter.linss@hp.com>
Cc: "Public CSS testsuite mailing list" <public-css-testsuite@w3.org>

Le Lun 16 avril 2012 13:14, Linss, Peter a écrit :
>
> On Apr 16, 2012, at 4:09 AM, Aryeh Gregor wrote:
>
>> Dirk Schulze submitted a bunch of feedback on my CSS Transforms test
>> submissions, mostly stylistic:
>> <http://test.csswg.org/shepherd/testcase/abspos-1b#event-4>.  I'd like
>> to make sure that it's agreed upon and written down somewhere.  So
>> here are some issues:
>>
>> 1) Tests in HTML format are accepted, but there's no template for
>> them.  The test format page <http://wiki.csswg.org/test/format> says
>> XHTML is preferred.  I suggest that it be changed to say that either
>> XHTML or HTML5 is preferred, and the following template be added:
>>
>> <!DOCTYPE html>
>> <html>
>> <head>
>>  <title>CSS Test: DESCRIPTION OF TEST</title>
>>  <link rel="author" title="NAME_OF_AUTHOR" href="mailto:EMAIL OR
>> http://CONTACT_PAGE"/>
>>  <link rel="help" href="RELEVANT_SPEC_SECTION"/>
>>  <meta name="flags" content="TOKENS" />
>>  <meta name="assert" content="TEST ASSERTION"/>
>>  <style>
>>   CSS FOR TEST
>>  </style>
>> </head>
>> <body>
>>  CONTENT OF TEST
>> </body>
>> </html>
>
> Look reasonable to me. Just remove the trailing '/' on the link and meta
> elements.

Peter,

Having the title attribute on the link to specification will help for
those using a site navigation bar. Firefox and Konqueror (and I think
Safari too) can display those.

>
>>
>> Note that I removed the CDATA, and the type="text/css" (which is
>> unnecessary in HTML5).  I personally don't think <html>/<head>/<body>
>> should be used unless necessary, but it seems most people disagree
>> with me.  Given that, I'm okay with this template.
>>
>> 2) Additionally, the guidelines should say that quotes on attribute
>> values shouldn't be omitted for HTML5.  Again, I prefer omitting
>> quotes for brevity, but it seems most people disagree.
>
> One of those situations where the extra safety wins over brevity.
>

It's not just about extra safety but about what specifications examples,
books, tutorials, magazines and HTML softwares actually do too.

>>
>> 3) It should be more specific about indentation.  The template uses
>> one space for indentation; the tests I submitted use two spaces
>> (Mozilla's convention); Dirk prefers four.  Do we have a preference?
>
> I really don't want to get into yet another indentation thread

Was there ever a thread on indentation in this list?

, I'm sure
> there are some that prefer tabs as well. I think indentation is
> valuable, I don't think mandating a specific style is worth it. Just
> keep it readable and if you edit someone else's test, try to stay
> consistent.
>
>>
>> 4) Dirk said that multiline <title>s cause problems for Shepherd.  If
>> this is so, should we make sure tests are formatted with one-line
>> <title>s or fix Shepherd?  (I usually break lines at 79 chars, which
>> is why I wrapped some of my <title>s to start with.)
>
> Note that Shepherd uses the test suite build code to extract metadata
> from the tests, so this looks like it's actually a bug in the build code
> (or possibly the HTML5 parser it uses). I'll look in to it. There
> shouldn't be a restriction on the number of lines the title takes up,
> but it should be kept brief.



Why title should be more than 60 or 80 characters long anyway? Title
text should be able to fit onto a browser titlebar. Exceeding that
limit, text will be replaced with ellipsis. The title text should not
replace the assert or comments in the code.

James Hopkins had a good system. He mentioned the property name, then an
hyphen and then a few other words like other property names.

E.g.
<title>CSS Test: overflow - max-width and percentage</title>

<title>CSS Test: list-style-position - text-indent</title>

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 Monday, 16 April 2012 19:05:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 16 April 2012 19:05:29 GMT