tor-browser

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

2d.layer.restore-style-expected.html (823B)


      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: 2d.layer.restore-style</title>
      5 <h1>2d.layer.restore-style</h1>
      6 <p class="desc">Test that ensure layers restores style values upon endLayer.</p>
      7 <canvas id="canvas" width="200" height="200">
      8  <p class="fallback">FAIL (fallback content)</p>
      9 </canvas>
     10 <script>
     11  const canvas = document.getElementById("canvas");
     12  const ctx = canvas.getContext('2d');
     13 
     14  ctx.fillStyle = 'rgba(0, 0, 255, 1)';
     15  ctx.fillRect(50, 50, 75, 50);
     16  ctx.globalAlpha = 0.5;
     17 
     18  canvas2 = document.createElement("canvas");
     19  ctx2 = canvas2.getContext("2d");
     20  ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
     21  ctx2.fillRect(60, 60, 75, 50);
     22  ctx.drawImage(canvas2, 0, 0);
     23 
     24  ctx.fillRect(70, 70, 75, 50);
     25 </script>