1 <html xmlns=
"http://www.w3.org/1999/xhtml">
3 https://bugzilla.mozilla.org/show_bug.cgi?id=515116
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" />
11 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=515116">Mozilla Bug
515116</a>
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"/>
19 <script class=
"testbody" type=
"text/javascript">
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.
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');
48 window.addEventListener(
"load", run_tests, false);