Re: About Microsoft test white-space-processing-006.xht

On 02/27/2010 11:49 PM, Bruno Fassino wrote:
>    http://test.csswg.org/source/contributors/microsoft/submitted/Chapter_16/white-space-processing-006.xht
> says:
>    "Test passes if the black box below is the same width, or shorter,
> than the blue box"
> and the assertion is:
>    "A carriage return before a linefeed is removed...."
>
> It's not clear how the width of the blue and black boxes can prove the
> assertion. If the carriage return would not be removed I doubt the
> effect would be in the width of the above boxes.
> Am I missing something?
> Similar comments apply to other white-space-processing-nnn tests.

The test is overall incorrect, because the white space at the end
of #div1 gets removed by step 3 in part II of the white-space
processing rules. There needs to be another character before the
end of the <div> to make sure we're testing Part I and not Part II
of the algorithm. Also since we're looking at white space, and white
space is not visible without a background, the width of the character
sequence is not visible for comparison here.

Once there's a character after the white space sequence, it's
possible to tell if the CR was removed because if it wasn't, you'd
either get a line break or an extra space representing the CR.
You'd probably want to use a <span> instead of a <div>, though,
to let the white space show up; and give it a background that
matches the text color to avoid distracting the tester by the
makeup of the box.

Also, changing the reference to use Xes and &nbsp; to match the
expected output could make the Ahem font helpful but unnecessary,
which would be nice.

~fantasai

Received on Thursday, 18 March 2010 01:24:31 UTC