Closed Bug 1941679 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 50080 - Replace @unroll hack with standard Jinja loops in canvas WPT generator

Categories

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

task

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

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

Replace @unroll hack with standard Jinja loops in canvas WPT generator

The @unroll directive was added as a way of generating a statement with
the cross product of a number of possible argument values. It was added
before the test generator was migrated to Jinja. With Jinja, we can now
do the equivalent unrolling by simply using standard for loops.

The @... directives are just disguised regex string replacements and
their interaction with Jinja is delicate, often broken and hard to
maintain. The string replacement often fails for multi-line/statement
content or when combined with Jinja templating. We would be better off
just using standard Jinja templating.

The @unroll directive was only used in a single test and the interaction
with Jinja template expansion made the test definition very hard to
understand. The test is easier to follow if we just use Jinja logic.

Bug: 40207206
Change-Id: I6e31becd7c224d00c3d1d5a32bf8f47ea6ba411c

Reviewed-on: https://chromium-review.googlesource.com/6172744
WPT-Export-Revision: 7d6a7e337d8d4515234e1f82522304c03aff45c2

Component: web-platform-tests → Graphics: Canvas2D
Product: Testing → Core
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eadd810823b7 [wpt PR 50080] - Replace @unroll hack with standard Jinja loops in canvas WPT generator, a=testonly
Test result changes from PR not available.
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
You need to log in before you can comment on or make changes to this bug.