Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify template to create canvas and offscreencanvas tests #31822

Merged
merged 1 commit into from
Dec 4, 2021

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Dec 2, 2021

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}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

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}
@past past force-pushed the chromium-export-cl-3307080 branch from c3947f9 to f22c5ee Compare December 3, 2021 23:42
@past
Copy link
Member

past commented Dec 4, 2021

A rebase didn't fix the issue, but I don't think there is a problem with the CL. The Firefox failure is on a test that isn't touched and the Chrome failure looks like issue #7660. I'll admin merge and we'll see what happens.

@past past merged commit ff72283 into master Dec 4, 2021
@past past deleted the chromium-export-cl-3307080 branch December 4, 2021 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants