Bug 616542 - Shorten file path length of mochitest; r=ted
[gecko.git] / content / svg / content / test / test_SVGLengthList.xhtml
blob876421df3f6016af84b0683746762fd8b7fd8bdf
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <!--
3 https://bugzilla.mozilla.org/show_bug.cgi?id=515116
4 -->
5 <head>
6 <title>Tests specific to SVGLengthList</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 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=515116">Mozilla Bug 515116</a>
12 <p id="display"></p>
13 <div id="content" style="display:none;">
14 <svg id="svg" xmlns="http://www.w3.org/2000/svg" width="100" height="100">
15 <text id="text" x="10cm 20cm 30mc"/>
16 </svg>
17 </div>
18 <pre id="test">
19 <script class="testbody" type="text/javascript">
20 <![CDATA[
22 SimpleTest.waitForExplicitFinish();
25 This file runs a series of SVGLengthList specific tests. Generic SVGXxxList
26 tests can be found in test_SVGxxxList.xhtml. Anything that can be generalized
27 to other list types belongs there.
30 function run_tests()
32 document.getElementById('svg').pauseAnimations();
34 var text = document.getElementById("text");
35 var lengths = text.x.baseVal;
37 is(lengths.numberOfItems, 0, 'Checking numberOfItems');
40 is(lengths.numberOfItems, 2, 'Checking numberOfItems');
41 is(lengths.getItem(1).valueInSpecifiedUnits == 20, 'Checking the value of the second length');
42 is(lengths.getItem(1).unitType == SVGLength.SVG_LENGTHTYPE_CM, 'Checking the unit of the second length');
45 SimpleTest.finish();
48 window.addEventListener("load", run_tests, false);
50 ]]>
51 </script>
52 </pre>
53 </body>
54 </html>