Closed Bug 1945617 Opened 15 days ago Closed 13 days ago

[wpt-sync] Sync PR 50459 - Use dedicated params dict for each canvas type in WPT test generator

Categories

(Core :: Graphics: Canvas2D, task, P4)

task

Tracking

()

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Jean-Philippe Gravel <jpgravel@chromium.org> wrote:

Use dedicated params dict for each canvas type in WPT test generator

Some generated canvas tests have different implementations for
different canvas types (HTML element, OffscreenCanvas or
OffscreenCanvas in a worker). To support this, the code generator
rendered the test's code three times, into different template
parameters: code_element, code_offscreen and code_worker. Likewise,
grid tests can have different variants for different canvas types,
so the test generator used three different params to store the variant
list: element_variants, offscreen_variants and worker_variants.

This strategy wasn't scalable though. In theory the test implementation
is free to customize any parameter based on the canvas type and thus,
we'd need to carry three different versions of each of these param.
We can actually do this automatically, for all parameters, by simply
cloning the whole params list, once for each canvas type. This CL
does this by using a dict _canvas_type_params, which stores the
params specific to each canvas type.

Bug: 40207206
Change-Id: I733dfb50865eb6f0ca263bc1805ffdba37cdb54d
Reviewed-on: https://chromium-review.googlesource.com/6204421
WPT-Export-Revision: 6a615c752d69b382fdfcfa1577620f9af7e073ef

Component: web-platform-tests → Graphics: Canvas2D
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
The PR was not expected to affect any tests, but the try push wasn't a success. Check the try results for infrastructure issues
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3e2eeee25f8d [wpt PR 50459] - Use dedicated params dict for each canvas type in WPT test generator, a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 13 days ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
You need to log in before you can comment on or make changes to this bug.