<!DOCTYPE html>
<title>Whitespace in <integer> attribute values</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="resources/whitespace-helper.js"></script>
<svg height="0">
<filter>
<feTurbulence></feTurbulence>
</filter>
</svg>
<script>
var turbulence = document.querySelector("feTurbulence");
// test integer values
var whitespace = [ "", " ", " " ];
var garbage = [ "a", "e", "foo", ")90", "em", "ex", "px", "in", "cm", "mm",
"pt", "pc", "%" ];
var validunits = [ "" ];
testType("<integer>",
turbulence,
"numOctaves",
1, // expected default value
whitespace,
[ "-47", "0", "+32", "1241245" ],
validunits,
garbage,
function(elm, value) {
assert_equals(elm.numOctaves.baseVal, parseInt(value));
},
function(elm, expected) {
assert_equals(elm.numOctaves.baseVal, expected);
});
</script>