content/canvas/test/test_bug764125.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=764125
     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 type="application/javascript" 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">
    19 </div>
    20 <pre id="test">
    21 <script>
    22 /** Test for Bug 764125 **/
    24 var c = document.createElement("canvas");
    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>

mercurial