tor-browser

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

testharness_element_grid.html (1633B)


      1 <!DOCTYPE html>
      2 <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
      3 <meta charset="UTF-8">
      4 <title>Canvas test: {{ name }}</title>
      5 {% if timeout %}<meta name="timeout" content="{{ timeout }}">
      6 {% endif %}
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 <script src="/html/canvas/resources/canvas-tests.js"></script>
     10 <link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
     11 
     12 <h1>{{ name }}</h1>
     13 
     14 {% if fonts %}
     15 <style>
     16 {% for font in fonts %}
     17  @font-face {
     18    font-family: {{ font }};
     19    src: url("/fonts/{{ font }}.ttf");
     20  }
     21 {% endfor %}
     22 </style>
     23 {% if not font_unused_in_dom %}
     24 {% for font in fonts %}
     25 <span style="font-family: {{ font }};
     26             position: absolute; visibility: hidden">A</span>
     27 {% endfor %}
     28 {% endif %}
     29 {% endif %}
     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
     35      }}" class="resource"></svg>
     36 {% endfor %}
     37 <script>
     38 {% for variant in variants %}
     39 
     40 {% if test_type == 'promise' %}
     41 promise_test(async t => {
     42 {% elif test_type == 'async' %}
     43 async_test(t => {
     44 {% else %}
     45 test(t => {
     46 {% endif %}
     47  const canvas = document.createElement('canvas');
     48  canvas.width = {{ variant.size[0] }};
     49  canvas.height = {{ variant.size[1] }};
     50  const ctx = canvas.getContext('2d'{%
     51      if variant.attributes %}, {{ variant.attributes }}{% endif %});
     52 
     53  {{ variant.code | trim | indent(2) }}
     54 }, "{{ variant.desc | double_quote_escape }}");
     55 {% endfor %}
     56 
     57 </script>