Skip to content

Commit

Permalink
Allow multi-files variants to have no parameters in canvas WPT generator
Browse files Browse the repository at this point in the history
It was already possible to have variants without parameters, but it was
only working for single-file variant layout. This CL fixed it for
multi-files, allowing tests like:

- name: 2d.example-empty-params
  code: ctx.globalCompositeOperation = {{ variant_name }};
  variants:
  - source-over:
    source-in:
    source-out:

Change-Id: Ibf4584cb693f8e2aa2a1dc432baf303c98812cbe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6227183
Reviewed-by: Aaron Krajeski <aaronhk@chromium.org>
Commit-Queue: Jean-Philippe Gravel <jpgravel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1424216}
  • Loading branch information
graveljp authored and chromium-wpt-export-bot committed Feb 25, 2025
1 parent 426c683 commit 941cd9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion html/canvas/tools/gentest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ def _get_variant_grids(
variants = dimension.variants
if dimension.layout == _VariantLayout.MULTI_FILES:
grids = [
grid.merge_params(name, params)
grid.merge_params(name, params or {})
for name, params in variants.items() for grid in grids
]
else:
Expand Down

0 comments on commit 941cd9e

Please sign in to comment.