-
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
- Loading branch information
1 parent
1f1e4df
commit ce0ff19
Showing
12 changed files
with
610 additions
and
67 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.