W3C home > Mailing lists > Public > www-style@w3.org > May 2014

Re: [css-flexbox] Edits to testsuite have broken some submitted tests

From: Gérard Talbot <www-style@gtalbot.org>
Date: Thu, 22 May 2014 14:24:58 -0400
To: Daniel Holbert <dholbert@mozilla.com>
Cc: www-style <www-style@w3.org>
Message-ID: <fdc6f234b62c741776564ede43661e8e@gtalbot.org>
Le 2014-05-22 13:39, Daniel Holbert a écrit :
> On 05/22/2014 10:21 AM, Gérard Talbot wrote:
>> One importantissimo detail.
>> 
>> If the src file is an XHTML file, then
>> 
>> <style type="text/css"><![CDATA[
> [...]
>> http://testthewebforward.org/docs/test-templates.html#including-styles
>> 
>> should be used so that problem-free XHTML-to-HTML autoconversion can 
>> be
>> done.
> 
> Thanks. Does this mean I should operate under the assumption that all
> submitted XHTML tests are going to be autoconverted and displayed as
> HTML, then?


Yes, you should assume that all submitted XHTML tests are going to be 
autoconverted and displayed accordingly as HTML.

> 
> (If so, it seems like it'd be more worthwhile for me to manually 
> convert
> them to HTML myself, so that I can verify that they work & predict what
> the result will look like.)

I do not think it'd be more worthwile for you to manually convert them 
to HTML yourself. This would
a) cause you to do more work
b) postpone finding-and-fixing (or ignore) possible XHTML-to-HTML 
auto-conversion problems that Peter Linss could fix. A software bug by 
itself is always an opportunity to improve software; ignoring, avoiding, 
working-around a bug does not improve software.


>> As I understand this, the .htm versions can not be tracked. There is
>> only 1 src for all tests and they are converted into HTML4 and/or 
>> HTML5
>> and/or XHTML1 versions.
> 
> What determines whether it'll be "and" vs. "or", in the "and/or"
> branches you mentioned above?


Let's say I submit a test in CSS2.1. My latest one was

http://test.csswg.org/source/contributors/gtalbot/submitted/line-height-129.xht

Then, here, I already knew it was going to be converted into HTML 4.01 
strict

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd">

and I knew it would not be converted into HTML5.

Some more recent specs like Flexbox do not convert tests into HTML4.01 
strict but rather into HTML5. Why is that? Not sure... (maybe... since 
HTML5 will become eventually the trend, the future, we might as well 
start coding for HTML5 and ditch HTML4 now ... or some arguments like 
that.)


> Is there any way to predict into what
> format a test will be converted? (or if it it'll be converted at all)

Go to the nightly unstable page of test suites

eg.

http://test.csswg.org/suites/css-multicol-1_dev/nightly-unstable/

and then you'll see in which formats the test suites are.

CSS multicol layout test suite is only in HTML4 format and XHTML1 
format. So, submitting tests for CSS multicol layout test suite should 
be acceptable in HTML4 format or in XHTML1 format. Note that you have 
less choice if the test involves svg elements. In which case, you need 
to use XHMTL format with the following doctype

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 
1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" 
xmlns:svg="http://www.w3.org/2000/svg">

or the HTML5 doctype.



Flexbox

http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/

on the other hand is in HTML5 and XHTML1 formats only. So, if I was to 
submit tests for flexbox test suite, I would probably submit those in 
XHTML1 format (but submitting them in HTML5 format should be okay, 
acceptable too, and should be autoconverted accordingly, without an 
itch).

Maybe there is no file describing the information related to your 
question. Maybe there should be.

I think test creators, test authors like yourself should just follow 
(and systematically comply with) Test Format Guidelines or 
systematically use/reuse available Test Templates.



> E.g. If I hand-convert my submitted tests to HTML & resubmit them in
> that format (as I'm now sort of planning on doing), how do I know
> whether they will be actually displayed as that HTML, as opposed to
> being auto-converted back to XHTML due to some cruel twist of fate? :)

Huh... they will be reserialized unless you add the asis flag or 
HTMLonly flag.


XHTML imposes a few more restrictions. One that has been missed by 
several test authors is that ">" character inside a <style> block must 
be escaped accordingly with <![CDATA[ ... ]]>
.


"
The preferred submission format for tests is either XHTML or HTML5, in 
UTF-8. HTML < 5 is also acceptable, but it will be processed by an HTML5 
compatible parser. SVG is also acceptable where necessary.

Note that in general, the test source will be parsed and re- serialized, 
even in its source format. The re-serialization will cause minor changes 
to the test file, notably: attribute values will always be quoted, 
whitespace between attributes will be collapsed to a single space, 
duplicate attributes will be removed, optional closing tags will be 
inserted, and invalid markup will be normalized. If these changes should 
make the test inoperable, for example if the test is testing markup 
error recovery, add the flag 'asis' to prevent re-serialization. This 
flag will also prevent format conversions so it may be necessary to 
provide alternate versions of the test in other formats (XHTML, HTML, 
etc.)
"
Test Format Guidelines
Acceptable Test Formats
http://testthewebforward.org/docs/test-format-guidelines.html#acceptable-test-formats

Gérard


> 
>> The file name format is test-topic-###.ext
> 
> Ah, thanks -- I see that is documented here:
>  http://testthewebforward.org/docs/test-format-guidelines.html
> 
> I'll add that numbering change to my list of planned fixes.
> 
> ~Daniel
Received on Thursday, 22 May 2014 18:25:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:27 UTC