summaryrefslogtreecommitdiffstats
path: root/layout/svg/tests/test_multiple_font_size.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /layout/svg/tests/test_multiple_font_size.html
parentInitial commit. (diff)
downloadthunderbird-upstream.tar.xz
thunderbird-upstream.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--layout/svg/tests/test_multiple_font_size.html25
1 files changed, 25 insertions, 0 deletions
diff --git a/layout/svg/tests/test_multiple_font_size.html b/layout/svg/tests/test_multiple_font_size.html
new file mode 100644
index 0000000000..aca32eac03
--- /dev/null
+++ b/layout/svg/tests/test_multiple_font_size.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1370646">Mozilla Bug 1370646</a>
+
+<svg xmlns="http://www.w3.org/2000/svg" width="440" height="100" viewBox="0 0 440 100">
+ <text>
+ <tspan id="a" style="font-size:100px">3</tspan>
+ </text>
+ <text>
+ <tspan id="b" style="font-size:100px">3</tspan>
+ <tspan style="font-size:0.1px">0</tspan>
+ </text>
+</svg>
+
+<script type="application/javascript">
+ SimpleTest.waitForExplicitFinish();
+
+ let alen = document.getElementById("a").getComputedTextLength(),
+ blen = document.getElementById("b").getComputedTextLength();
+
+ SimpleTest.isfuzzy(alen, blen, 5, "lengths should be close");
+
+ SimpleTest.finish();
+</script>