Format guidelines for tests (particularly HTML5)

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>

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.

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?

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.)

5) The template's <title> starts with "CSS Test: ".  I'm guessing this
was written when all the tests were for CSS 2.1.  I wrote my transform
tests starting with "CSS Test (Transforms): " -- should we adopt a
convention like this for non-CSS 2.1 tests?  Maybe it should be "CSS
Test: Transforms - " or something else?  It looks like Shepherd
currently eats everything up to the first colon, so the "(Transforms)"
part is vanishing on Shepherd.

Received on Monday, 16 April 2012 11:10:21 UTC