reftest_element.html (1426B)
1 <!DOCTYPE html> 2 <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> 3 <meta charset="UTF-8"> 4 {% if test_type == 'promise' %}<html class="reftest-wait"> 5 {% endif %} 6 {% if reference_file_link %} 7 <link rel="match" href="{{ reference_file_link }}"> 8 {% if fuzzy %}<meta name=fuzzy content="{{ fuzzy }}"> 9 {% endif %} 10 {% endif %} 11 {% if timeout %}<meta name="timeout" content="{{ timeout }}"> 12 {% endif %} 13 <title>Canvas test: {{ name }}</title> 14 <h1>{{ name }}</h1> 15 <p class="desc">{{ desc }}</p> 16 {% if notes %}<p class="notes">{{ notes }}{% endif %} 17 <canvas id="canvas" width="{{ size[0] }}" height="{{ size[1] }}"{{ canvas }}> 18 <p class="fallback">FAIL (fallback content)</p> 19 </canvas> 20 <script{% if test_type == 'promise' %} type="module"{% endif %}> 21 const canvas = document.getElementById("canvas"); 22 const ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}); 23 24 {{ reference | trim | indent(2) if not reference_file_link else 25 code | trim | indent(2) }} 26 {% if test_type == 'promise' %} 27 document.documentElement.classList.remove("reftest-wait"); 28 {% endif %} 29 </script> 30 {% for image in images %} 31 <img src="/images/{{ image }}" id="{{ image }}" class="resource"> 32 {% endfor -%} 33 {% for svgimage in svgimages %} 34 <svg><image xlink:href="/images/{{ svgimage }}" id="{{ svgimage }}" class="resource"></svg> 35 {% endfor -%} 36 {% if test_type == 'promise' %}</html>{% endif %}