[PATCH 1/3] [v2] gdiplus/tests: Add more PNG color format tests.

Vincent Povirk vincent at codeweavers.com
Tue Nov 6 10:47:40 CST 2018


+    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-conventions

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.



More information about the wine-devel mailing list