blob: 6e5628036ba5873c2427a0a71a28e0e597eac0d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: {{ name }}</title>
{% if timeout %}<meta name="timeout" content="{{ timeout }}">{% endif %}
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
<script>
{% for variant in offscreen_variants %}
{% if test_type == 'promise' %}
promise_test(async t => {
{% elif test_type == 'async' %}
async_test(t => {
{% else %}
test(t => {
{% endif %}
const canvas = new OffscreenCanvas({{
variant.size[0] }}, {{ variant.size[1] }});
const ctx = canvas.getContext('2d'{%
if variant.attributes %}, {{ variant.attributes }}{% endif %});
{{ variant.code_offscreen | trim | indent(2)}}
}, "{{ variant.desc | double_quote_escape }}");
{% endfor %}
</script>
|