Bug 616542 - Shorten file path length of mochitest; r=ted
[gecko.git] / content / svg / content / test / test_pointAtLength.xhtml
blobc02b02dc8b1cb276e425a13dfc62c1220692be23
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 type="text/javascript" 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[
14 SimpleTest.waitForExplicitFinish();
16 function run()
18 var p1 = document.getElementById("p1");
19 var point = p1.getPointAtLength(200);
20 is(point.x, 200);
21 is(point.y, 50);
23 // set the pathLength to twice its actual length
24 p1.setAttribute("pathLength", "800");
25 var point = p1.getPointAtLength(200);
26 is(point.x, 100);
27 is(point.y, 50);
29 SimpleTest.finish();
32 window.addEventListener("load", run, false);
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">
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>
45 </div>
46 <pre id="test">
47 </pre>
48 </body>
49 </html>