In v2, - Fix test failures on broken XP, Vista, 2003. - Fix the expected value for 1bpp gray scale image with tRNS chunk. - Introduce color_space_mask to test other color space flags aren't set.
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com --- dlls/gdiplus/tests/image.c | 226 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 185 insertions(+), 41 deletions(-)
+ else + ok(status != Ok || broken(status == Ok), /* XP */
This sort of non-test test makes me nervous.
+ /* In order to test the image data with and without PLTE and tRNS chunks + * it's been decided to simply sero out the chunk id for testing puposes, + * and under Windows such images get loaded just fine. But unfortunately + * libpng refuses to load such images complaining about unknown chunk type. + * A workaround for this libpng limitation is to mark the "disabled" chunks + * with tEXt id. + */
I suggest choosing a private chunk name, like teSt, which would leave the image valid other than the failed CRC. See http://www.libpng.org/pub/png/spec/1.2/PNG-Structure.html#Chunk-naming-conve...
I know we have this problem already in the existing code, but it's hard for me to tell if we're really testing what we're supposed to be testing on Windows. Could we check for the old image flags behavior and win_skip these tests if we get it? That would also remove the need for the new broken() check in load_image.