tor-browser

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

2d.path.roundrect.radius.noarugment.html (1627B)


      1 <!DOCTYPE html>
      2 <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
      3 <title>Canvas test: 2d.path.roundrect.radius.noarugment</title>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="/html/canvas/resources/canvas-tests.js"></script>
      7 <link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
      8 <body class="show_output">
      9 
     10 <h1>2d.path.roundrect.radius.noarugment</h1>
     11 <p class="desc">Check that roundRect draws a rectangle when no radii are provided.</p>
     12 
     13 
     14 <p class="output">Actual output:</p>
     15 <canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
     16 
     17 <ul id="d"></ul>
     18 <script>
     19 var t = async_test("Check that roundRect draws a rectangle when no radii are provided.");
     20 _addTest(function(canvas, ctx) {
     21 
     22 ctx.fillStyle = '#f00';
     23 ctx.fillRect(0, 0, 100, 50);
     24 ctx.roundRect(10, 10, 80, 30);
     25 ctx.fillStyle = '#0f0';
     26 ctx.fill();
     27 // upper left corner (10, 10)
     28 _assertPixel(canvas, 10,9, 255,0,0,255);
     29 _assertPixel(canvas, 9,10, 255,0,0,255);
     30 _assertPixel(canvas, 10,10, 0,255,0,255);
     31 
     32 // upper right corner (89, 10)
     33 _assertPixel(canvas, 90,10, 255,0,0,255);
     34 _assertPixel(canvas, 89,9, 255,0,0,255);
     35 _assertPixel(canvas, 89,10, 0,255,0,255);
     36 
     37 // lower right corner (89, 39)
     38 _assertPixel(canvas, 89,40, 255,0,0,255);
     39 _assertPixel(canvas, 90,39, 255,0,0,255);
     40 _assertPixel(canvas, 89,39, 0,255,0,255);
     41 
     42 // lower left corner (10, 30)
     43 _assertPixel(canvas, 9,39, 255,0,0,255);
     44 _assertPixel(canvas, 10,40, 255,0,0,255);
     45 _assertPixel(canvas, 10,39, 0,255,0,255);
     46 
     47 
     48 });
     49 </script>