Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/animations/svglengthlist-animation-invalid-value-1.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>Test SVGLengthList animation with invalid values: String value in length list values for from and to attributes.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<svg id="svg">
<text id="text" x="50 70 90 110" y="50">ABCD
<animate attributeName="x" begin="0s" dur="4s" from="50 70 90 A" to="60 90 120 X" />
</text>
</svg>
<script>
async_test(t => {
const svg = document.getElementById("svg");
const text = document.getElementById("text");
window.addEventListener('load', t.step_func(() => {
svg.setCurrentTime(2);
requestAnimationFrame(t.step_func_done(() => {
assert_array_equals(
Array.from(text.x.baseVal).map(v => v.value),
[50, 70, 90, 110]
);
assert_array_equals(
Array.from(text.x.animVal).map(v => v.value),
Array.from(text.x.baseVal).map(v => v.value)
);
}));
}));
});
</script>