Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/animations/svgtransformlist-animation-invalid-value-3.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>Test SVGTransformList animation with invalid values: String value in transform list values for from and to attributes.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/svg/resources/svg-transform-equals.js"></script>
<svg id="svg">
<text id="text" transform="scale(2, 1)" y="50">ABCD
<animateTransform attributeName="transform" begin="0s" dur="14s" from="scale(2, 2)" to="scale(3, 3), b" />
</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(() => {
const expected = svg.createSVGTransform();
expected.setScale(2, 1);
assert_svg_transform_equals(text.transform.animVal.getItem(0), expected);
assert_array_equals(
Array.from(text.transform.animVal).map(v => v.value),
Array.from(text.transform.baseVal).map(v => v.value)
);
}));
}));
});
</script>