Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype html>
<title>Test SVGLength animation with invalid value: String values in from and to attributes.</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" from="ERROR" to="ERROR" />
</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>