OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <title>Whitespace in attribute values tests</title> | 2 <title>Whitespace in attribute values tests</title> |
3 <script src=../../resources/testharness.js></script> | 3 <script src=../../resources/testharness.js></script> |
4 <script src=../../resources/testharnessreport.js></script> | 4 <script src=../../resources/testharnessreport.js></script> |
5 <svg id="testcontainer"> | 5 <svg id="testcontainer"> |
6 </svg> | 6 </svg> |
7 <div id=log></div> | 7 <div id=log></div> |
8 <script> | 8 <script> |
9 var svg = document.querySelector("svg"); | 9 var svg = document.querySelector("svg"); |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 }); | 52 }); |
53 }); | 53 }); |
54 } | 54 } |
55 | 55 |
56 testTypeLocal("<length>", | 56 testTypeLocal("<length>", |
57 svg, | 57 svg, |
58 "x", | 58 "x", |
59 0, // expected default value | 59 0, // expected default value |
60 whitespace, | 60 whitespace, |
61 [], // valid | 61 [], // valid |
62 » » [ Number.NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINIT
Y, "fnord", "E", "e", "e+", "E-", "-", "+", "-.", ".-", ".", "+.", ".E0", "e1" ]
, // invalid | 62 » » [ Number.NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINIT
Y, "fnord", "E", "e" ], // invalid |
63 validunits, | 63 validunits, |
64 [], // garbage | 64 [], // garbage |
65 function(elm, value) { assert_approx_equals(elm.x.baseVal.value
InSpecifiedUnits, parseFloat(value), EPSILON); }, | 65 function(elm, value) { assert_approx_equals(elm.x.baseVal.value
InSpecifiedUnits, parseFloat(value), EPSILON); }, |
66 function(elm, expected) { assert_approx_equals(elm.x.baseVal.va
lue, expected, EPSILON); } ); | 66 function(elm, expected) { assert_approx_equals(elm.x.baseVal.va
lue, expected, EPSILON); } ); |
67 | 67 |
68 </script> | 68 </script> |
OLD | NEW |