github web-platform-tests/wpt merge_pr_48382

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
11 months ago

Add a new canvas WPT template using pycairo-generated reference images

Using the "cairo_reference:" key in the YAML config, we can now express
the expected result of a test using pycairo code. Contrary to the
existing "expected:" key which produces an image that is only used for
"informational" purpose, "cairo_reference:" produces a reference test,
meaning that the test runner automatically compares the test result
with that generated image and fails the test if the result differs.

Both single variant tests (non-variant or tests with a single variant
per file) and variant grids are supported. For single variant, the
generated reference file is an HMTL page with a single tag
pointing to the PNG generated with pycairo. To cut down on the number of
files generated for variant grids, all the reference images for all of
the cells of the grid are packed into a single PNG file,
3d-model-texture-style. The reference HTML file is a grid of tags,
each framing a different portion of the PNG image.

Bug: 364549423
Change-Id: Icb3c246b22347054b7cc9b5e5cc40d21b30565bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5894774
Reviewed-by: Andres Ricardo Perez andresrperez@chromium.org
Commit-Queue: Jean-Philippe Gravel jpgravel@chromium.org
Cr-Commit-Position: refs/heads/main@{#1369396}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.