Unify template to create canvas and offscreencanvas tests #31822
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The typical way to add tests for canvas and offscreencanvas is as
following:
This is because the API for canvas and offscreencanvas are mostly the
same.
This cl updates templates and gentestutils to allow the framework of
generate canvas and offscreencanvas test from test.
I removed both yaml/element/color_space.yaml and
yaml/offscreencanvas/color_space.yaml and add yaml_new/color_space.yaml.
Now the yaml_new/color_space.yaml generates the same results as before.
Note that it's possible to add test for a particular canvas type
by using canvasType as keyword.
Bug: 1275750
Change-Id: I6bf48ec3081f5fe3669bf585f92b39a712045c6b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3307080
Reviewed-by: Fernando Serboncini <[email protected]>
Reviewed-by: Juanmi Huertas <[email protected]>
Commit-Queue: Yi Xu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#947713}