MyGit

merge_pr_45558

web-platform-tests/wpt

版本发布时间: 2024-04-05 23:45:25

web-platform-tests/wpt最新发布版本:merge_pr_48029(2024-09-07 13:25:31)

Add sync/async test types for generated canvas tests

Generated canvas WPT tests use a custom _addTest helper method. This helper offers a domain-specific API (only supported for canvas tests) that can be used to "easily" implementing either synchronous or asynchronous canvas tests.

This helper however strays away from standard testharness.js test format, making it impossible to use many features that are otherwise standard in WPT. For instance, it used to be impossible to test using promises. We had to modify the test generator to bypass the _addTest helper so we could use the standard promise_test feature. Using a custom domain specific API also makes it harder to move between canvas and non-canvas folders, making maintenance and collaboration more difficult.

In a follow-up CL, we will add support for generating canvas tests packing multiple test cases in the same file. This is commonly done in WPT, where we would put in the same file multiple test/async_test/ promise_test that are all related with each other. This cannot be done with _addTest however because that function expects the DOM to have a single unique canvas element to be used by the test, making it impossible to have multiple test cases in the same file.

This CL adds support for using the standard test and async_test API, specified via the test_type YAML parameter. If test_type is unspecified, the default _addTest API is used.

Bug: 330885075 Change-Id: Idcf996eb8b391c67057716da999d05e205f454c1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5392305 Reviewed-by: Andres Ricardo Perez andresrperez@chromium.org Commit-Queue: Jean-Philippe Gravel jpgravel@chromium.org Cr-Commit-Position: refs/heads/main@{#1283138}

相关地址:原始地址 下载(tar) 下载(zip)

1、 MANIFEST-e1a96e36dbf0b9aa08dab4ef30a52f9e0fffd498.json.bz2 2.4MB

2、 MANIFEST-e1a96e36dbf0b9aa08dab4ef30a52f9e0fffd498.json.gz 2.95MB

3、 MANIFEST-e1a96e36dbf0b9aa08dab4ef30a52f9e0fffd498.json.zst 2.43MB

4、 WEB_FEATURES_MANIFEST-e1a96e36dbf0b9aa08dab4ef30a52f9e0fffd498.json.bz2 48.24KB

5、 WEB_FEATURES_MANIFEST-e1a96e36dbf0b9aa08dab4ef30a52f9e0fffd498.json.gz 54.44KB

6、 WEB_FEATURES_MANIFEST-e1a96e36dbf0b9aa08dab4ef30a52f9e0fffd498.json.zst 47.32KB

查看:2024-04-05发行的版本