tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

reftest_offscreen.html (1255B)


      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 <link rel="match" href="{{ reference_file_link }}">
      7 {% if fuzzy %}<meta name=fuzzy content="{{ fuzzy }}">
      8 {% endif %}
      9 {% if timeout %}<meta name="timeout" content="{{ timeout }}">
     10 {% endif %}
     11 <title>Canvas test: {{ name }}</title>
     12 <h1>{{ name }}</h1>
     13 <p class="desc">{{ desc }}</p>
     14 {% if notes %}<p class="notes">{{ notes }}{% endif %}
     15 <canvas id="canvas" width="{{ size[0] }}" height="{{ size[1] }}"{{ canvas }}>
     16  <p class="fallback">FAIL (fallback content)</p>
     17 </canvas>
     18 <script{% if test_type == 'promise' %} type="module"{% endif %}>
     19  const canvas = new OffscreenCanvas({{ size[0] }}, {{ size[1] }});
     20  const ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %});
     21 
     22  {{ code | trim | indent(2) }}
     23 
     24  const outputCanvas = document.getElementById("canvas");
     25  outputCanvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}).drawImage(canvas, 0, 0);
     26  {% if test_type == 'promise' %}
     27  document.documentElement.classList.remove("reftest-wait");
     28  {% endif %}
     29 </script>
     30 {% if test_type == 'promise' %}</html>{% endif %}