-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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/c/chromium/src/+/6172744 Reviewed-by: Yi Xu <[email protected]> Commit-Queue: Jean-Philippe Gravel <[email protected]> Cr-Commit-Position: refs/heads/main@{#1406444}
- Loading branch information
1 parent
06be9fb
commit 9aa25c6
Showing
2 changed files
with
47 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters