summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/mozilla/tests/mathml/fonts/opentype-limits.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/mozilla/tests/mathml/fonts/opentype-limits.html')
-rw-r--r--testing/web-platform/mozilla/tests/mathml/fonts/opentype-limits.html60
1 files changed, 60 insertions, 0 deletions
diff --git a/testing/web-platform/mozilla/tests/mathml/fonts/opentype-limits.html b/testing/web-platform/mozilla/tests/mathml/fonts/opentype-limits.html
new file mode 100644
index 0000000000..575dfefc11
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/mathml/fonts/opentype-limits.html
@@ -0,0 +1,60 @@
+<!doctype html>
+<html>
+ <head>
+ <title>Open Type MATH - limits</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=961365"/>
+ <meta charset="utf-8"/>
+ <style type="text/css">
+ math {
+ font-size: 10px;
+ }
+ @font-face {
+ font-family: limits-5;
+ src: url(limits-5.otf);
+ }
+ </style>
+ <script type="text/javascript">
+ setup({explicit_done : true});
+
+ var epsilon = 5;
+
+ function getBox(aId) {
+ return document.getElementById(aId).getBoundingClientRect();
+ }
+
+ function doTest() {
+ test(function() {
+ assert_approx_equals(getBox("base9").top - getBox("over9").bottom,
+ (6 - 2) * 10, epsilon);
+ assert_approx_equals(getBox("base10").top - getBox("over10").bottom,
+ (6 - 2) * 10, epsilon);
+ }, "AccentBaseHeight");
+ done();
+ }
+ </script>
+ </head>
+ <body onload="doTest()">
+
+ <p>
+ <math style="font-family: limits-5;" displaystyle="true">
+ <mspace id="ref5" height="1em" width="1em" mathbackground="green"/>
+ </math>
+ <math style="font-family: limits-5;" displaystyle="true">
+ <mover>
+ <mspace id="base9" height="2em" width="2em" mathbackground="blue"/>
+ <mo id="over9" stretchy="false">~</mo>
+ </mover>
+ </math>
+ <math style="font-family: limits-5;" displaystyle="true">
+ <munderover>
+ <mspace id="base10" height="2em" width="2em" mathbackground="blue"/>
+ <mspace id="under10" height="1em" width="1em" mathbackground="red"/>
+ <mo id="over10" stretchy="false">~</mo>
+ </munderover>
+ </math>
+ </p>
+
+ </body>
+</html>