Skip to content

Commit

Permalink
Bug 1921829 [wpt PR 48382] - Add a new canvas WPT template using pyca…
Browse files Browse the repository at this point in the history
…iro-generated reference images, a=testonly

Automatic update from web-platform-tests
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 <img> 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 <img> 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 <andresrperezchromium.org>
Commit-Queue: Jean-Philippe Gravel <jpgravelchromium.org>
Cr-Commit-Position: refs/heads/main{#1369396}

--

wpt-commits: 2af17a84e98cd28940d2882c68ff824d6e98f4b7
wpt-pr: 48382

UltraBlame original commit: c2e9874a21e2b6da498e387093096588f90d5a61
  • Loading branch information
marco-c committed Oct 22, 2024
1 parent a2d7325 commit caac056
Show file tree
Hide file tree
Showing 3 changed files with 1,193 additions and 104 deletions.
Loading

0 comments on commit caac056

Please sign in to comment.