summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/canvas/tools/templates/testharness_element.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
commitdef92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch)
tree2ef34b9ad8bb9a9220e05d60352558b15f513894 /testing/web-platform/tests/html/canvas/tools/templates/testharness_element.html
parentAdding debian version 125.0.3-1. (diff)
downloadfirefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz
firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/html/canvas/tools/templates/testharness_element.html')
-rw-r--r--testing/web-platform/tests/html/canvas/tools/templates/testharness_element.html24
1 files changed, 16 insertions, 8 deletions
diff --git a/testing/web-platform/tests/html/canvas/tools/templates/testharness_element.html b/testing/web-platform/tests/html/canvas/tools/templates/testharness_element.html
index 56cde7936a..c8de772ea6 100644
--- a/testing/web-platform/tests/html/canvas/tools/templates/testharness_element.html
+++ b/testing/web-platform/tests/html/canvas/tools/templates/testharness_element.html
@@ -42,21 +42,29 @@
{% if test_type == 'promise' %}
promise_test(async t => {
- var canvas = document.getElementById('c');
- var ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %});
-{% else %}
+{% elif test_type == 'async' %}
+async_test(t => {
+{% elif test_type == 'sync' %}
+test(t => {
+{% endif %}
+{% if not test_type %}
var t = async_test("{{ desc | double_quote_escape }}");
_addTest(function(canvas, ctx) {
+
+{% else %}
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %});
+
{% endif %}
- {# Test body: #}
- {{ code | trim | indent(2) }}
+ {#- Test body: #}
+ {{ code_element | trim | indent(2) }}
{# Promise vs. async test footer: #}
-{% if test_type == 'promise' %}
-}, "{{ desc }}");
-{% else %}
+{% if not test_type %}
}{% if attributes %}, {{ attributes }}{% endif %});
+{% else %}
+}, "{{ desc | double_quote_escape }}");
{% endif -%}
</script>