summaryrefslogtreecommitdiffstats
path: root/layout/reftests/mathml/stretchy-largeop-1.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/reftests/mathml/stretchy-largeop-1.html
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.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/reftests/mathml/stretchy-largeop-1.html81
1 files changed, 81 insertions, 0 deletions
diff --git a/layout/reftests/mathml/stretchy-largeop-1.html b/layout/reftests/mathml/stretchy-largeop-1.html
new file mode 100644
index 0000000000..bb63c8a435
--- /dev/null
+++ b/layout/reftests/mathml/stretchy-largeop-1.html
@@ -0,0 +1,81 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <title>Largeop stretching</title>
+ <meta charset="utf-8"/>
+ <script type="text/javascript">
+
+ function verifyGreaterThan(aElement, aReference) {
+ /* Verify that the height of the element is greater than that of the
+ reference, and otherwise paint the element in red. */
+ var element = document.getElementById(aElement);
+ var ref = document.getElementById(aReference);
+ if (element.getBoundingClientRect().height -
+ ref.getBoundingClientRect().height <= 1) {
+ element.setAttribute("mathcolor", "red");
+ }
+ }
+
+ function doTest() {
+ /* Ensure that the parentheses in the displaystyle case stretch more
+ than the alternative. */
+ verifyGreaterThan("mo0", "mo0a");
+ verifyGreaterThan("mo1", "mo1a");
+ verifyGreaterThan("mo2", "mo2a");
+ verifyGreaterThan("mo3", "mo3a");
+
+ document.documentElement.removeAttribute("class");
+
+ }
+ </script>
+ </head>
+ <body onload="doTest();">
+ <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>
+ <p>
+ <!-- &bigotimes; included in the test to check for an assertion involving
+ the direction of the largeop pre-stretch -->
+ <math displaystyle="true">
+ <mrow>
+ <mo id="mo4">(</mo>
+ <mo>&bigotimes;</mo>
+ <mo id="mo5">)</mo>
+ <mrow>
+ </math>
+ </p>
+ </body>
+</html>