tor-browser

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

test_pointAtLength.xhtml (1138B)


      1 <html xmlns="http://www.w3.org/1999/xhtml">
      2 <!--
      3 https://bugzilla.mozilla.org/show_bug.cgi?id=643419
      4 -->
      5 <head>
      6  <title>Test getPointAtLength</title>
      7  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      8  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
      9 </head>
     10 <body>
     11 <script class="testbody" type="text/javascript">
     12 <![CDATA[
     13 
     14 SimpleTest.waitForExplicitFinish();
     15 
     16 function run() {
     17  var p1 = document.getElementById("p1");
     18  var point = p1.getPointAtLength(200);
     19  is(point.x, 200);
     20  is(point.y, 50);
     21 
     22  // set the pathLength to twice its actual length
     23  // and check that makes no difference
     24  p1.setAttribute("pathLength", "800");
     25  point = p1.getPointAtLength(200);
     26  is(point.x, 200);
     27  is(point.y, 50);
     28 
     29  SimpleTest.finish();
     30 }
     31 
     32 window.addEventListener("load", run);
     33 ]]>
     34 </script>
     35 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=643419">Mozilla Bug 643419</a>
     36 <p id="display"></p>
     37 <div id="content">
     38 
     39  <svg xmlns="http://www.w3.org/2000/svg" width="750">
     40    <defs>
     41      <path id="p1" d="M 0 50 h 400"/>
     42    </defs>
     43  </svg>
     44 
     45 </div>
     46 <pre id="test">
     47 </pre>
     48 </body>
     49 </html>