diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
commit | 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch) | |
tree | a31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /testing/web-platform/tests/svg/scripted/text-tspan-attrs-indexed-access.svg | |
parent | Initial commit. (diff) | |
download | firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip |
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/svg/scripted/text-tspan-attrs-indexed-access.svg')
-rw-r--r-- | testing/web-platform/tests/svg/scripted/text-tspan-attrs-indexed-access.svg | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/testing/web-platform/tests/svg/scripted/text-tspan-attrs-indexed-access.svg b/testing/web-platform/tests/svg/scripted/text-tspan-attrs-indexed-access.svg new file mode 100644 index 0000000000..b14b6bfc28 --- /dev/null +++ b/testing/web-platform/tests/svg/scripted/text-tspan-attrs-indexed-access.svg @@ -0,0 +1,33 @@ +<?xml version="1.0" standalone="no"?> +<svg xmlns="http://www.w3.org/2000/svg" + xmlns:h="http://www.w3.org/1999/xhtml"> + <metadata> + <h:link rel="help" href="https://svgwg.org/svg2-draft/single-page.html#text-TSpanNotes"/> + <h:meta name="assert" content="x y dx dy and rotate attributes on text and tspan elements are lists that support length()"/> +</metadata> + <text id="text" font-family="Verdana" font-size="55" fill="blue" + y="150 130 160" x="120 160 200 240" rotate="0 0 10, -10, 0"> + My <tspan id="tspan" x="280 325" y="150 155 160 165 170" rotate="-30,0,30">socks</tspan> + are blue. + </text> + <h:script src="/resources/testharness.js"/> + <h:script src="/resources/testharnessreport.js"/> + <script><![CDATA[ + test(function() { + /* Make sure that we can get at list items with indexed access. + */ + var text = document.getElementById('text'); + assert_equals(text.x.baseVal[0].value, 120); + assert_equals(text.y.baseVal[2].value, 160); + assert_equals(text.rotate.baseVal[3].value, -10); + assert_equals(text.rotate.baseVal[0].value, 0); + + /* same for tspan */ + var tspan = document.getElementById('tspan'); + assert_equals(tspan.x.baseVal[1].value, 325); + assert_equals(tspan.y.baseVal[4].value, 170); + assert_equals(tspan.rotate.baseVal[0].value, -30); + }); + + ]]></script> +</svg> |