Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/animations/svglength-animation-invalid-value-9.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>Test SVGLength animation with invalid value: No spaces between number and unit in values attribute.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<svg id="svg">
<rect id="rect" x="0" width="100" height="100" fill="green">
<animate attributeName="width" begin="0s" dur="4s" values="0px;100px;300px;500 px;700px" />
</rect>
</svg>
<script>
async_test(t => {
const svg = document.getElementById("svg");
const rect = document.getElementById("rect");
window.addEventListener('load', t.step_func(() => {
svg.setCurrentTime(2);
requestAnimationFrame(t.step_func_done(() => {
assert_equals(rect.width.baseVal.value, 100);
assert_equals(rect.width.animVal.value, rect.width.baseVal.value);
}));
}));
});
</script>