| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <title>Whitespace in <angle> attribute values</title> | 2 <title>Whitespace in <angle> attribute values</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 <script src=resources/whitespace-helper.js></script> | 5 <script src=resources/whitespace-helper.js></script> |
| 6 <svg id="testcontainer"> | 6 <svg id="testcontainer"> |
| 7 <defs> | 7 <defs> |
| 8 <marker/> | 8 <marker/> |
| 9 </defs> | 9 </defs> |
| 10 </svg> | 10 </svg> |
| 11 <div id=log></div> | 11 <div id=log></div> |
| 12 <script> | 12 <script> |
| 13 | 13 |
| 14 // test length values | 14 // test length values |
| 15 var EPSILON = Math.pow(2, -24); // float epsilon | 15 var EPSILON = Math.pow(2, -24); // float epsilon |
| 16 var whitespace = [ "", " ", " ", "\r\n\t ", "\f" ]; | 16 var whitespace = [ "", " ", " ", "\r\n\t ", "\f" ]; |
| 17 | 17 |
| 18 testInvalidType("<angle>", | 18 testInvalidType("<angle>", |
| 19 document.querySelector("marker"), | 19 document.querySelector("marker"), |
| 20 "orient", | 20 "orient", |
| 21 0, // expected default value | 21 0, // expected default value |
| 22 whitespace, | 22 whitespace, |
| 23 [ Number.NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, "fnor
d", "E", "e", "e+", "E-", "-", "+", "-.", ".-", ".", "+.", ".E0", "e1" ], // inv
alid | 23 [ Number.NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, "fnor
d", "E", "e", "e+", "E-" ], // invalid |
| 24 [ "", "deg", "rad", "grad" ], // valid units | 24 [ "", "deg", "rad", "grad" ], // valid units |
| 25 function(elm, value) { assert_approx_equals(elm.orientAngle.baseVal.val
ueInSpecifiedUnits, parseFloat(value), EPSILON); }, | 25 function(elm, value) { assert_approx_equals(elm.orientAngle.baseVal.val
ueInSpecifiedUnits, parseFloat(value), EPSILON); }, |
| 26 function(elm, expected) { assert_approx_equals(elm.orientAngle.baseVal.
value, expected, EPSILON); } ); | 26 function(elm, expected) { assert_approx_equals(elm.orientAngle.baseVal.
value, expected, EPSILON); } ); |
| 27 | 27 |
| 28 | 28 |
| 29 </script> | 29 </script> |
| OLD | NEW |