Feedback on Philip Taylors Canvas Tests

Here is feedback on the rest of Philip Tayor's tests, tests not listed below seem vaild per the spec.
If other have feedback on Philip tests please send these to the list.

Thanks again for contributing these tests Philip.

Test case doesn't actually test what is stated in the spec...
>From the spec: "If the first argument to the method is null or not an ImageData object then the putImageData() method must raise a TYPE_MISMATCH_ERR exception."
There is nothing in the spec that describes how the stroke width should be applied for a zero-height rect.
The spec only says "the method will draw a line instead (the path for the outline is just a straight line along the non-zero dimension)."
The test description claims that the WebIDL describes that this should throw a TypeError.
This seems to conflict with the canvas spec - "The image argument is an instance of either HTMLImageElement, HTMLCanvasElement, or HTMLVideoElement. If the image is null, the implementation must raise a TYPE_MISMATCH_ERR exception." and "If the first argument isn't an img, canvas, or video element, throws a TYPE_MISMATCH_ERR exception. If the image has no image data, throws an INVALID_STATE_ERR exception."
This test seems odd - what is it testing?
I don't believe any UA actually passes IMHO.
These tests description indicates that it's a test for 'Parsing of non-negative integers'.
Though I see no negative attributes? Test case bug?
There is no interoperable consensus among the browsers for how strings should be parsed with a null suffix.
It's also not a part of HTML5 (though seems like a fine test for javascript or webidl, given the interop issues)
I believe we can test canvas without resorting to using null suffixes.
Spec does not have normative requirements for "space characters" that should be parsed by canvas.
I'd change these tests to be normative rather than a non-normative css+html5 integration test.
This test needs to have its tolerance updated to allow more UA's to pass, if this test gets approved.
Might be better to change this test in some fashion to not have a tolerance value, since the image format is lossy.
'0.01' should be valid input....
Canvas Spec (
 "For the purposes of these rules, an argument is considered to be a number if it is converted to an IDL double value by the rules for handling arguments of type any in the Web IDL specification. [WEBIDL]".   
The WebIDL for converting an argument to double ( states that the first step is to compute ToNumber on the argument passed in, '0.01', which should be valid."
Test is out of date with the spec, since the spec no longer has normative requirments that states a 'NOT_SUPPORTED_ERR' should be raised.
Test should check for TYPE_MISMATCH_ERR not TypeError per the canvas spec for createPattern
This is seems incorrect....
All browsers fail because the image's "complete" attribute actually evaluates to true, but the code expects it to be false.  
The test should find an interoperable way to pass in an image who's "complete" attribute is false
Many of the test here are invalid per the latest version of the spec.  The only normative requirements are: "If the numeric arguments don't make sense (e.g. the destination is a 00 rectangle), throws an INDEX_SIZE_ERR exception."
The tests uses that CanvasTest.ttf font which contains two different contradictory sets of values in <OS/2> and <hhea> tables, both can be used depending on UA or font system.
For example Firefox is using different metrics for regular HTML and Canvas.  
Which one to use is not part of the HTML5 or the OpenType spec.
It's possible to create a Font can be "fixed", so all UAs will use the same value (with high probability) and no longer use '_assertPixlelApprox' that seems to work around this issue?

Received on Tuesday, 4 January 2011 03:51:27 UTC