Currently the ImageDiff binary determines when an image diff passes (diff is less than the tolerance), but it makes more sense for webkitpy to make that decision.
Created attachment 442462 [details] Patch
Comment on attachment 442462 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=442462&action=review > Tools/ChangeLog:3 > + The script should decide when an image diff cases, not ImageDiff passes, not cases
Comment on attachment 442462 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=442462&action=review This is a nice change. > Tools/ImageDiff/ImageDiff.cpp:71 > + fprintf(stdout, "diff: %01.8f%%\n", differenceData.percentageDifference); This is a nice simplification. > Tools/Scripts/webkitpy/port/image_diff.py:137 > + return ImageDiffResult(passed=False, diff_image=None, difference=0, tolerance=self._tolerance, error_string=err_str or "Failed to match ImageDiff output %s" % diff_output) I think using "Failed to match ImageDiff output {}".format(diff_output) would be better for future-proofing this code against changes to Python.
Committed r284878 (243555@main): <https://commits.webkit.org/243555@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 442462 [details].
<rdar://problem/84670441>