summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/mathml/presentation-markup/operators
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /testing/web-platform/tests/mathml/presentation-markup/operators
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/mathml/presentation-markup/operators')
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/operators/stretchy-largeop-with-default-font-1.html64
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/operators/stretchy-largeop-with-default-font-2.html132
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/operators/stretchy-largeop-with-default-font-3.html145
3 files changed, 341 insertions, 0 deletions
diff --git a/testing/web-platform/tests/mathml/presentation-markup/operators/stretchy-largeop-with-default-font-1.html b/testing/web-platform/tests/mathml/presentation-markup/operators/stretchy-largeop-with-default-font-1.html
new file mode 100644
index 0000000000..9f37cddc39
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/operators/stretchy-largeop-with-default-font-1.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Stretchy/Largeop with default fonts</title>
+ <meta charset="utf-8"/>
+ <link rel="help" href="https://www.w3.org/TR/mathml-core/#layout-of-operators">
+ <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1092053">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script type="text/javascript">
+ function heightOf(aElement) {
+ return document.getElementById(aElement).getBoundingClientRect().height;
+ }
+ promise_test(() => {
+ return new Promise(resolve => {
+ window.addEventListener("load", resolve);
+ }).then(() => {
+ assert_greater_than(heightOf("mo0"), heightOf("mo0a"));
+ assert_greater_than(heightOf("mo1"), heightOf("mo1a"));
+ assert_greater_than(heightOf("mo2"), heightOf("mo2a"));
+ assert_greater_than(heightOf("mo3"), heightOf("mo3a"));
+ });
+ }, "The size of displaystyle largeops is taken into account when stretching fences.");
+ </script>
+ </head>
+ <body>
+ <p>
+ <math displaystyle="true">
+ <mrow>
+ <mo id="mo0">(</mo>
+ <mo>∫</mo>
+ <mo id="mo1">)</mo>
+ <mrow>
+ </math>
+ </p>
+ <p>
+ <math>
+ <mrow>
+ <mo id="mo0a">(</mo>
+ <mo>∫</mo>
+ <mo id="mo1a">)</mo>
+ <mrow>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mrow>
+ <mo id="mo2">(</mo>
+ <mo>&Product;</mo>
+ <mo id="mo3">)</mo>
+ <mrow>
+ </math>
+ </p>
+ <p>
+ <math>
+ <mrow>
+ <mo id="mo2a">(</mo>
+ <mo>&Product;</mo>
+ <mo id="mo3a">)</mo>
+ <mrow>
+ </math>
+ </p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/operators/stretchy-largeop-with-default-font-2.html b/testing/web-platform/tests/mathml/presentation-markup/operators/stretchy-largeop-with-default-font-2.html
new file mode 100644
index 0000000000..7c43c80acc
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/operators/stretchy-largeop-with-default-font-2.html
@@ -0,0 +1,132 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Stretchy/Largeop with default fonts</title>
+ <meta charset="utf-8"/>
+ <link rel="help" href="https://www.w3.org/TR/mathml-core/#layout-of-operators">
+ <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1092053">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script type="text/javascript">
+ function contentOf(aElement) {
+ return document.getElementById(aElement).textContent;
+ }
+ function heightOf(aElement) {
+ return document.getElementById(aElement).getBoundingClientRect().height;
+ }
+ promise_test(() => {
+ return new Promise(resolve => {
+ window.addEventListener("load", resolve);
+ }).then(() => {
+ const numTests = 10; // zero indexed
+ for (let i = 0; i < numTests; i++) {
+ const operatorName = contentOf(`mo${i}`);
+ assert_greater_than(heightOf(`mo${i}`), heightOf(`moRef${i}`), `size of largeop '${operatorName}'`);
+ }
+ });
+ }, "Test that non-stretchy largeops are bigger in display mode.");
+ </script>
+ </head>
+ <body>
+ <p>
+ <math displaystyle="true">
+ <mo id="mo0">&bigodot;</mo>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mo id="mo1">&bigoplus;</mo>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mo id="mo2">&#x2a03;</mo>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mo id="mo3">&#x2a05;</mo>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mo id="mo4">&#x2a07;</mo>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mo id="mo5">&#x2a08;</mo>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mo id="mo6">&#x2a09;</mo>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mo id="mo7">&#x2a0a;</mo>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mo id="mo8">&#x2afc;</mo>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mo id="mo9">&#x2aff;</mo>
+ </math>
+ </p>
+ <p>
+ <math>
+ <mo id="moRef0">&bigodot;</mo>
+ </math>
+ </p>
+ <p>
+ <math>
+ <mo id="moRef1">&bigoplus;</mo>
+ </math>
+ </p>
+ <p>
+ <math>
+ <mo id="moRef2">&#x2a03;</mo>
+ </math>
+ </p>
+ <p>
+ <math>
+ <mo id="moRef3">&#x2a05;</mo>
+ </math>
+ </p>
+ <p>
+ <math>
+ <mo id="moRef4">&#x2a07;</mo>
+ </math>
+ </p>
+ <p>
+ <math>
+ <mo id="moRef5">&#x2a08;</mo>
+ </math>
+ </p>
+ <p>
+ <math>
+ <mo id="moRef6">&#x2a09;</mo>
+ </math>
+ </p>
+ <p>
+ <math>
+ <mo id="moRef7">&#x2a0a;</mo>
+ </math>
+ </p>
+ <p>
+ <math>
+ <mo id="moRef8">&#x2afc;</mo>
+ </math>
+ </p>
+ <p>
+ <math>
+ <mo id="moRef9">&#x2aff;</mo>
+ </math>
+ </p>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/operators/stretchy-largeop-with-default-font-3.html b/testing/web-platform/tests/mathml/presentation-markup/operators/stretchy-largeop-with-default-font-3.html
new file mode 100644
index 0000000000..d588b9d4e0
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/operators/stretchy-largeop-with-default-font-3.html
@@ -0,0 +1,145 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Stretchy/Largeop with default fonts</title>
+ <meta charset="utf-8"/>
+ <link rel="help" href="https://www.w3.org/TR/mathml-core/#layout-of-operators">
+ <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1092053">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script type="text/javascript">
+ function contentOf(aElement) {
+ return document.getElementById(aElement).textContent;
+ }
+ promise_test(() => {
+ return new Promise(resolve => {
+ window.addEventListener("load", resolve);
+ }).then(() => {
+ const numTests = 10; // zero indexed
+ const epsilon = 2;
+ for (let i = 0; i < numTests; i++) {
+ const operatorName = contentOf(`mo${i}`);
+ const box = document.getElementById(`mo${i}`).getBoundingClientRect();
+ const ref = document.getElementById(`moRef${i}`).getBoundingClientRect();
+ assert_approx_equals(box.width, ref.width, epsilon, `width of largeop '${operatorName}'`);
+ assert_approx_equals(box.height, ref.height, epsilon, `height of largeop '${operatorName}'`);
+ }
+ });
+ }, "Test that non-stretchy largeops do not stretch.");
+ </script>
+ </head>
+ <body>
+ <p>
+ <math displaystyle="true">
+ <mrow>
+ <mspace height="3em" />
+ <mo id="mo0">&bigodot;</mo>
+ </mrow>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mrow>
+ <mspace height="3em" />
+ <mo id="mo1">&bigoplus;</mo>
+ </mrow>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mrow>
+ <mspace height="3em" />
+ <mo id="mo2">&#x2a03;</mo>
+ </mrow>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mrow>
+ <mspace height="3em" />
+ <mo id="mo3">&#x2a05;</mo>
+ </mrow>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mrow>
+ <mspace height="3em" />
+ <mo id="mo4">&#x2a07;</mo>
+ </mrow>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mrow>
+ <mspace height="3em" />
+ <mo id="mo5">&#x2a08;</mo>
+ </mrow>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mrow>
+ <mspace height="3em" />
+ <mo id="mo6">&#x2a09;</mo>
+ </mrow>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mrow>
+ <mspace height="3em" />
+ <mo id="mo7">&#x2a0a;</mo>
+ </mrow>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mrow>
+ <mspace height="3em" />
+ <mo id="mo8">&#x2afc;</mo>
+ </mrow>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mrow>
+ <mspace height="3em" />
+ <mo id="mo9">&#x2aff;</mo>
+ </mrow>
+ </math>
+ </p>
+ <p>
+ <math displaystyle="true">
+ <mo id="moRef0">&bigodot;</mo>
+ </math>
+ <math displaystyle="true">
+ <mo id="moRef1">&bigoplus;</mo>
+ </math>
+ <math displaystyle="true">
+ <mo id="moRef2">&#x2a03;</mo>
+ </math>
+ <math displaystyle="true">
+ <mo id="moRef3">&#x2a05;</mo>
+ </math>
+ <math displaystyle="true">
+ <mo id="moRef4">&#x2a07;</mo>
+ </math>
+ <math displaystyle="true">
+ <mo id="moRef5">&#x2a08;</mo>
+ </math>
+ <math displaystyle="true">
+ <mo id="moRef6">&#x2a09;</mo>
+ </math>
+ <math displaystyle="true">
+ <mo id="moRef7">&#x2a0a;</mo>
+ </math>
+ <math displaystyle="true">
+ <mo id="moRef8">&#x2afc;</mo>
+ </math>
+ <math displaystyle="true">
+ <mo id="moRef9">&#x2aff;</mo>
+ </math>
+ </p>
+ </body>
+</html>