Skip to content

Commit 8a68da2

Browse files
[web-tests] Fix incorrect fuzziness parameter minimums
A W(P)T may specify fuzziness parameters as either an inclusive range [min, max], or a single expected value [1] (e.g., `totalPixels=30` means exactly 30 pixels must be different for a test/reference to match). This patch corrects a few tests that mistakenly reject exact matches (i.e., maxDifference = totalPixels = 0) because they specify exact nonzero parameters. WPT unfortunately doesn't interpret this as `0-<N>`, even though this is almost always what we want in practice. `run_web_tests.py` allowed these parameters to land because it ignores fuzzy parameters when the image hashes match exactly. Now, to be consistent with [1] and its implementation in wptrunner, only skip diffing when exact matches are expected. [1]: https://web-platform-tests.org/writing-tests/reftests.html#fuzzy-matching Bug: 1254776 Change-Id: I868e571a891b2a570934d17dd605f42db22a0ddf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4908234 Reviewed-by: Weizhong Xia <[email protected]> Commit-Queue: Jonathan Lee <[email protected]> Cr-Commit-Position: refs/heads/main@{#1206623}
1 parent 8c76a95 commit 8a68da2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

html/semantics/embedded-content/the-img-element/image-compositing-change.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html class="reftest-wait">
33
<title>Composited images correctly re-raster when the image and bounds change</title>
44
<meta charset="utf-8">
5-
<meta name=fuzzy content="maxDifference=150;totalPixels=296">
5+
<meta name=fuzzy content="maxDifference=0-150;totalPixels=0-296">
66
<link rel="match" href="image-compositing-change-ref.html"/>
77
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-img-element">
88
<style>

0 commit comments

Comments
 (0)