tor-browser

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

2d.fillStyle.parse.current.notrendered.html (1157B)


      1 <!DOCTYPE html>
      2 <title>Canvas test: 2d.fillStyle.parse.current.notrendered</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script src="/html/canvas/resources/canvas-tests.js"></script>
      6 <link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
      7 <body class="show_output">
      8 
      9 <h1>2d.fillStyle.parse.current.basic</h1>
     10 <p class="desc">currentColor is computed from the canvas element</p>
     11 
     12 
     13 <p class="output">Actual output:</p>
     14 <canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
     15 <p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
     16 <ul id="d"></ul>
     17 <script>
     18 var t = async_test("currentColor is computed from the canvas element even when element is not rendered");
     19 _addTest(function(canvas, ctx) {
     20 
     21 canvas.setAttribute('style', 'color: #0f0;');
     22 canvas.style.display = 'none';
     23 canvas.offsetTop;
     24 ctx.fillStyle = 'currentColor';
     25 canvas.style.display = 'inline';
     26 ctx.fillRect(0, 0, 100, 50);
     27 _assertPixel(canvas, 50,25, 0,255,0,255);
     28 
     29 
     30 });
     31 </script>