Open Bug 1628334 Opened 6 years ago Updated 4 years ago

[wpt-sync] Sync PR 22791 - Shape-verifying fuzzy-matched SVG reference tests

Categories

(Core :: SVG, task, P4)

task

Tracking

()

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 22791 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/22791
Details from upstream follow.

Skef Iterum <github@skef.org> wrote:

Shape-verifying fuzzy-matched SVG reference tests

There is currently very little automated verification of shape rendering for SVG elements. This pull request adds reference tests with very-close-to-equivalent path geometries and fuzzy matching. The "fuzz factors" were chosen based by putting a medium-tight margin above the worse of (Linux) Firefox and Chromium rendering. (Opera was verified to be equivalent to the latter; no other browsers were tested.)

The circles, ellipses, lines, and polygons are taken from shapes-circle-01-t-manual.svg, shapes-ellipse-01-t-manual.svg, shapes-line-02-f-manual.svg and shapes-polygon-01-t-manual.svg. shapes-polygon-02-t-manual.svg is also superseded. The (somewhat trivial) "strokefill" paths are taken from render-elems-02-t-manual.svg and render-elems-03-t-manual.svg. The "linejoincap" tests are taken from paths-data-10-t-manual.svg. The "miterlimit" test is taken from painting-stroke-07-t-manual-ref.svg. The "linejoin", "linecap", and "rect" tests are new but more or less supersede painting-stroke-02-t-manual.svg, painting-stroke-03-t-manual.svg, shapes-rect-02-t-manual.svg, and shapes-rect-03-t-manual.svg. (All of these existing files are in the import directory; none are deleted in this PR.)

This zip archive has a record of the max channel difference and pixel counts (in info.txt), the rasterizations in both browsers, and a difference image for each reference test generated with ImageMagick's compare option.

images.zip

(This PR is a sort of rehearsal for a more interesting/future-oriented one along similar lines.)

Component: web-platform-tests → SVG
Product: Testing → Core
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.