-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unify template to create canvas and offscreencanvas tests
The typical way to add tests for canvas and offscreencanvas is as following: - write the test in yaml/element (create the test for canvas) - copy the the test to yaml/offscreencanvas - add t.done() to the end of test (create the test for offscreencanvas) 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}
- Loading branch information
1 parent
6e3c94a
commit c3947f9
Showing
12 changed files
with
609 additions
and
66 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
from gentestutils import genTestUtils | ||
from gentestutilsunion import genTestUtils_union | ||
|
||
genTestUtils('../element', '../element', 'templates.yaml', 'name2dir.yaml', False) | ||
genTestUtils('../offscreen', '../offscreen', 'templates-offscreen.yaml', 'name2dir-offscreen.yaml', True) | ||
genTestUtils('../element', '../element', 'templates.yaml', 'name2dir-canvas.yaml', False) | ||
genTestUtils('../offscreen', '../offscreen', 'templates.yaml', 'name2dir-offscreen.yaml', True) | ||
genTestUtils_union('templates-new.yaml', 'name2dir-canvas.yaml') |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from gentestutilsunion import genTestUtils_union | ||
|
||
genTestUtils_union('templates-new.yaml', 'name2dir-canvas.yaml') |
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
Oops, something went wrong.