diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /layout/mathml/tests/test_opentype-axis-height.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/mathml/tests/test_opentype-axis-height.html')
-rw-r--r-- | layout/mathml/tests/test_opentype-axis-height.html | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/layout/mathml/tests/test_opentype-axis-height.html b/layout/mathml/tests/test_opentype-axis-height.html new file mode 100644 index 0000000000..f65e276253 --- /dev/null +++ b/layout/mathml/tests/test_opentype-axis-height.html @@ -0,0 +1,58 @@ +<!doctype html> +<html> + <head> + <title>Open Type MATH - axis-height</title> + <script src="/tests/SimpleTest/SimpleTest.js"></script> + <script src="/tests/SimpleTest/EventUtils.js"></script> + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> + <meta charset="utf-8"/> + <style type="text/css"> + math { + font-size: 10px; + } + @font-face { + font-family: axis-height-1; + src: url(/tests/fonts/math/axis-height-1.otf); + } + @font-face { + font-family: axis-height-2; + src: url(/tests/fonts/math/axis-height-2.otf); + } + </style> + <script type="application/javascript"> + SimpleTest.waitForExplicitFinish(); + + var epsilon = 5; + function almostEqual(x, y) { return Math.abs(x - y) < epsilon; } + + function getBox(aId) { + return document.getElementById(aId).getBoundingClientRect(); + } + + function doTest() { + ok(almostEqual(getBox("plus1").top - getBox("plus2").top, 10 * 20), + "Bad AxisHeight"); + + SimpleTest.finish(); + } + </script> + </head> + <body onload="doTest()"> + <a target="_blank" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=961365"> + Mozilla Bug 961365 + </a> + + <p id="display"></p> + + <p> + <math style="font-family: axis-height-1;"> + <mo id="plus1">+</mo> + </math> + <math style="font-family: axis-height-2;"> + <mo id="plus2">+</mo> + </math> + </p> + + </body> +</html> |