tor-browser

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

testharness_offscreen.html (1412B)


      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>OffscreenCanvas 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 
     11 <h1>{{ name }}</h1>
     12 <p class="desc">{{ desc }}</p>
     13 
     14 {% if notes %}<p class="notes">{{ notes }}{% endif +%}
     15 <script>
     16 
     17 {#- Promise vs. async test header: +#}
     18 {% if test_type == 'promise' %}
     19 promise_test(async t => {
     20 
     21 {% elif test_type == 'async' %}
     22 async_test(t => {
     23 {% elif test_type == 'sync' %}
     24 test(t => {
     25 {% else %}
     26 var t = async_test("{{ desc | double_quote_escape }}");
     27 var t_pass = t.done.bind(t);
     28 var t_fail = t.step_func(function(reason) {
     29    throw reason;
     30 });
     31 t.step(function() {
     32 
     33 {% endif %}
     34 
     35 {#- Test body: #}
     36  var canvas = new OffscreenCanvas({{ size[0] }}, {{ size[1] }});
     37  var ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %});
     38 
     39  {{ code | trim | indent(2)}}
     40 
     41 {#- Promise vs. async test footer: +#}
     42 {% if not test_type %}
     43  t.done();
     44 
     45 });
     46 {% else %}
     47 
     48 }, "{{ desc | double_quote_escape }}");
     49 {% endif %}
     50 </script>
     51 {% for svgimage in svgimages %}
     52 <svg><image xlink:href="/images/{{ svgimage }}" id="{{ svgimage }}" class="resource"></svg>
     53 {% endfor %}