tor-browser

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

test_bug764125.html (1052B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=764125
      5 
      6 Test the correct behaviour for isPointInPath in the presence of multiple transforms,
      7 where only one tranform ought to be applied.
      8 -->
      9 <head>
     10  <title>Test for Bug 764125</title>
     11  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     12  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     13 </head>
     14 <body>
     15 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=764125">Mozilla Bug 764125</a>
     16 <p id="display"></p>
     17 <div id="content" style="display: none">
     18  
     19 </div>
     20 <pre id="test">
     21 <script>
     22 /** Test for Bug 764125 */
     23 
     24 var c = document.createElement("canvas");
     25 
     26 var ctx = c.getContext("2d");
     27 ctx.translate(50, 0);
     28 ctx.rect(50, 0, 20, 20);
     29 ctx.translate(0, 50);
     30 ok(ctx.isPointInPath(60, 10) === false, "ctx.isPointInPath(60, 10) === false");
     31 ok(ctx.isPointInPath(110, 10) === true, "ctx.isPointInPath(110, 10) === true");
     32 ok(ctx.isPointInPath(110, 60) === false, "ctx.isPointInPath(110, 60) === false");
     33 </script>
     34 </pre>
     35 </body>
     36 </html>