diff options
Diffstat (limited to 'testing/web-platform/tests/mathml/presentation-markup')
28 files changed, 1372 insertions, 17 deletions
diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html index 2463c40476..0b14ac5334 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/legacy-mstyle-attributes.html @@ -35,11 +35,12 @@ </head> <body> <div id="log"></div> - <!-- Note: mpadded attributes are not tested since MathML3 did not allow to - set them from mstyle. Also, it is not clear whether munderover's - accent/accentunder could be applied from mstyle, given that the former - clashes with mo@accent. Other legacy mstyle attributes not in MathML - Core or without visual effect are not tested. + <!-- Note: In earlier versions of MathML, putting some attributes on the + mstyle element was supposed to produce the same rendering as putting them + on the all descendants (with some exceptions). In MathML Core, relevant + style attributes are implemented as CSS properties and are no longer + specific to the mstyle element. The tests below verify that attributes + on mstyle that are not mapped to CSS have no effect. --> <p class="TestContainer" id="mspace"> <math> @@ -84,12 +85,12 @@ <mn>3</mn> </munder> </mstyle> - <mstyle accent="false"> - <mover> - <mn>4</mn> - <mo>⇀</mo> - </mover> - </mstyle> + <!-- Note: accent was a shared attribute name for mover and mo, so + make mstyle an ancestor of mo but not of mover. --> + <mover> + <mn>4</mn> + <mstyle accent="false"><mo>⇀</mo></mstyle> + </mover> <mstyle stretchy="false" symmetric="false" maxsize="20px"> <mrow> <mo>|</mo> @@ -102,6 +103,15 @@ <mn>4</mn> </mrow> </mstyle> + <mstyle form="prefix"> + <mrow> + <mn>1</mn> + <!-- Infix and prefix forms of − do not have the same lspace/rspace + values in the operator dictionary --> + <mo>−</mo> + <mn>2</mn> + </mrow> + </mstyle> </math> <math displaystyle="true"> <mstyle> @@ -115,12 +125,10 @@ <mn>3</mn> </munder> </mstyle> - <mstyle> - <mover> - <mn>4</mn> - <mo>⇀</mo> - </mover> - </mstyle> + <mover> + <mn>4</mn> + <mstyle><mo>⇀</mo></mstyle> + </mover> <mstyle> <mrow> <mo>|</mo> @@ -133,6 +141,13 @@ <mn>4</mn> </mrow> </mstyle> + <mstyle> + <mrow> + <mn>1</mn> + <mo>−</mo> + <mn>2</mn> + </mrow> + </mstyle> </math> </p> <!-- notation attribute is from MathML3's menclose element --> @@ -160,5 +175,92 @@ </mstyle> </math> </p> + <p class="TestContainer" id="mpadded"> + <math> + <mstyle width="100px" height="50px" depth="50px" + lspace="10px" voffset="15px"> + <mpadded style="background: lightblue"> + <mspace width="10px" height="10px" style="background: black"></mspace> + </mpadded> + </mstyle> + </math> + <math> + <mstyle> + <mpadded style="background: lightblue"> + <mspace width="10px" height="10px" style="background: black"></mspace> + </mpadded> + </mstyle> + </math> + </p> + <p class="TestContainer" id="mover"> + <math> + <mstyle accent="true"> + <mover> + <mn>1</mn> + <mn>2</mn> + </mover> + </mstyle> + </math> + <math> + <mstyle> + <mover> + <mn>1</mn> + <mn>2</mn> + </mover> + </mstyle> + </math> + </p> + <p class="TestContainer" id="munder"> + <math> + <mstyle accentunder="true"> + <munder> + <mn>1</mn> + <mn>2</mn> + </munder> + </mstyle> + </math> + <math> + <mstyle> + <munder> + <mn>1</mn> + <mn>2</mn> + </munder> + </mstyle> + </math> + </p> + <p class="TestContainer" id="munderover"> + <math> + <mstyle accent="true"> + <munderover> + <mn>1</mn> + <mn>2</mn> + <mn>3</mn> + </munderover> + </mstyle> + <mstyle accentunder="true"> + <munderover> + <mn>1</mn> + <mn>2</mn> + <mn>3</mn> + </munderover> + </mstyle> + </math> + <math> + <mstyle> + <munderover> + <mn>1</mn> + <mn>2</mn> + <mn>3</mn> + </munderover> + </mstyle> + <mstyle> + <munderover> + <mn>1</mn> + <mn>2</mn> + <mn>3</mn> + </munderover> + </mstyle> + </math> + </p> </body> </html> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-001-ref.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-001-ref.html new file mode 100644 index 0000000000..7d99e48c92 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-001-ref.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<meta charset="utf-8"/> +<title><semantics> - mozilla bug 468059 (reference)</title> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> + math, p { + font: 25px Ahem; + } +</style> +<p> + <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> + <semantics> + <mstyle displaystyle="true"> + <munderover> + <mo movablelimits="true">pXp</mo> + <mtext>XpXpXp</mtext> + <mtext>XpXpXp</mtext> + </munderover> + </mstyle> + </semantics> + </math> +</p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-001.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-001.html new file mode 100644 index 0000000000..63aa9a4da8 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-001.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<meta charset="utf-8"/> +<title><semantics> - mozilla bug 468059</title> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=468059"> +<link rel="help" href="https://w3c.github.io/mathml-core/#semantics-and-presentation"> +<link rel="match" href="semantics-001-ref.html"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<meta name="assert" content="MathML inside a semantics element inherits displaystyle."> +<style> + math, p { + font: 25px Ahem; + } +</style> +<p> + <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> + <semantics> + <munderover> + <mo movablelimits="true">pXp</mo> + <mtext>XpXpXp</mtext> + <mtext>XpXpXp</mtext> + </munderover> + </semantics> + </math> +</p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-002-ref.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-002-ref.html new file mode 100644 index 0000000000..8abdad93de --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-002-ref.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<title>semantics element and legacy rendering rules (reference)</title> +<meta charset="utf-8"/> +<p>Empty semantics: <math><mrow></mrow></math></p> +<p>annotation: <math><mrow><annotation>annotation</annotation></mrow></math></p> +<p>annotation-xml: <math><mrow><annotation-xml encoding="MathML-Presentation"><mtext>annotation-xml</mtext></annotation-xml></mrow></math></p> +<p>presentation MathML (no annotations): <math><mrow><mtext>presentation MathML</mtext></mrow></math></p> +<p>content MathML (no annotations): <math><mrow><csymbol>content MathML</csymbol></mrow></math></p> +<p>presentation MathML ; annotation: <math><mrow><mtext>presentation MathML</mtext></mrow></math></p> +<p>presentation MathML ; annotation-xml: <math><mrow><mtext>presentation MathML</mtext></mrow></math></p> +<p>content MathML ; annotation: <math><mrow><csymbol>content MathML</csymbol></mrow></math></p> +<p>content MathML ; annotation-xml: <math><mrow><csymbol>content MathML</csymbol></mrow></math></p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-002.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-002.html new file mode 100644 index 0000000000..62028fb863 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-002.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<title>semantics element and legacy rendering rules</title> +<meta charset="utf-8"/> +<link rel="help" href="https://developer.mozilla.org/en-US/docs/Web/MathML/Element/semantics"> +<link rel="help" href="https://w3c.github.io/mathml-core/#semantics-and-presentation"> +<link rel="match" href="semantics-002-ref.html"> +<meta name="assert" content="semantics element rendered as an mrow with only the first child displayed and does not rely on legacy rules to choose another child to display instead."> +<p>Empty semantics: <math><semantics></semantics></math></p> +<p>annotation: <math><semantics><annotation>annotation</annotation></semantics></math></p> +<p>annotation-xml: <math><semantics><annotation-xml encoding="MathML-Presentation"><mtext>annotation-xml</mtext></annotation-xml></semantics></math></p> +<p>presentation MathML (no annotations): <math><semantics><mtext>presentation MathML</mtext></semantics></math></p> +<p>content MathML (no annotations): <math><semantics><csymbol>content MathML</csymbol></semantics></math></p> +<p>presentation MathML ; annotation: <math><semantics><mtext>presentation MathML</mtext><annotation>annotation</annotation></semantics></math></p> +<p>presentation MathML ; annotation-xml: <math><semantics><mtext>presentation MathML</mtext><annotation-xml encoding="application/mathml-presentation+xml"><mtext>annotation-xml</mtext></annotation-xml></semantics></math></p> +<p>content MathML ; annotation: <math><semantics><csymbol>content MathML</csymbol><annotation>annotation</annotation></semantics></math></p> +<p>content MathML ; annotation-xml: <math><semantics><csymbol>content MathML</csymbol><annotation-xml encoding="application/mathml-presentation+xml"><mtext>annotation-xml</mtext></annotation-xml></semantics></math></p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-003-ref.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-003-ref.html new file mode 100644 index 0000000000..7b6e21a3eb --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-003-ref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<title>semantics element and legacy rendering rules (reference)</title> +<meta charset="utf-8"/> +<p>annotation 1: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation 2: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation 3: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation-xml 1: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation-xml 2: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation-xml 3: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation-xml 4: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation-xml 5: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation-xml 6: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> +<p>annotation-xml 7: <math><mrow><csymbol>Content MathML</csymbol></mrow></math></p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-003.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-003.html new file mode 100644 index 0000000000..83572f4c8c --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-003.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<title>semantics element and legacy rendering rules</title> +<meta charset="utf-8"/> +<link rel="help" href="https://developer.mozilla.org/en-US/docs/Web/MathML/Element/semantics"> +<link rel="help" href="https://w3c.github.io/mathml-core/#semantics-and-presentation"> +<link rel="match" href="semantics-003-ref.html"> +<meta name="assert" content="semantics element rendered as an mrow with only the first child displayed and does not rely on legacy rules to choose another child to display instead."> +<p>annotation 1: <math><semantics><csymbol>Content MathML</csymbol><annotation>annotation</annotation><annotation>error</annotation><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml></semantics></math></p> +<p>annotation 2: <math><semantics><csymbol>Content MathML</csymbol><annotation encoding="application/x-tex">\sin x + 5</annotation><annotation>error</annotation><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml></semantics></math></p> +<p>annotation 3: <math><semantics><csymbol>Content MathML</csymbol><annotation src="external-resource">error</annotation><annotation>annotation</annotation><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml></semantics></math></p> +<p>annotation-xml 1: <math><semantics><csymbol>Content MathML</csymbol><annotation-xml encoding="application/mathml-presentation+xml"><mtext>application/mathml-presentation+xml</mtext></annotation-xml><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml><annotation>error</annotation></semantics></math></p> +<p>annotation-xml 2: <math><semantics><csymbol>Content MathML</csymbol><annotation-xml encoding="MathML-Presentation"><mtext>MathML-Presentation</mtext></annotation-xml><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml><annotation>error</annotation></semantics></math></p> +<p>annotation-xml 3: <math><semantics><csymbol>Content MathML</csymbol><annotation-xml encoding="image/svg+xml"><svg xmlns="http://www.w3.org/2000/svg" height="2em"><text y="1em">image/svg+xml</text></svg></annotation-xml><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml><annotation>error</annotation></semantics></math></p> +<p>annotation-xml 4: <math><semantics><csymbol>Content MathML</csymbol><annotation-xml encoding="SVG1.1"><svg xmlns="http://www.w3.org/2000/svg" height="2em"><text y="1em">SVG1.1</text></svg></annotation-xml><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml><annotation>error</annotation></semantics></math></p> +<p>annotation-xml 5: <math><semantics><csymbol>Content MathML</csymbol><annotation-xml encoding="application/xhtml+xml"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>application/xhtml+xml</title></head><body><p>application/xhtml+xml</p></body></html></annotation-xml><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml><annotation>error</annotation></math></p> +<p>annotation-xml 6: <math><semantics><csymbol>Content MathML</csymbol><annotation-xml encoding="text/html"><html><head><title>text/html</title></head><body><p>text/html</p></body></html></annotation-xml><annotation-xml encoding="application/mathml-presentation+xml"><mtext>error</mtext></annotation-xml><annotation>error</annotation></semantics></math></p> +<p>annotation-xml 7: <math><semantics><csymbol>Content MathML</csymbol><annotation-xml encoding="unknown"><mtext>error</mtext></annotation-xml><annotation-xml encoding="application/mathml-presentation+xml"><mtext>annotation-xml</mtext></annotation-xml><annotation>error</annotation></semantics></math></p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-004-ref.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-004-ref.html new file mode 100644 index 0000000000..855d887bbc --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-004-ref.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<meta charset="utf-8"/> +<title><semantics> - mozilla bug 512418 (reference)</title> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> + math, p { + font: 25px Ahem; + } +</style> +<p> + XpXpXp<math xmlns="http://www.w3.org/1998/Math/MathML"> + <mrow> + <mrow> + <mo>lcm</mo> + <mo>(</mo> + <mn>a</mn> + <mo>,</mo> + <mn>b</mn> + <mo>)</mo> + </mrow> + <mo>=</mo> + <mfrac> + <mrow> + <mo>(</mo> + <mn>a</mn> + <mo>⁢</mo> + <mn>b</mn> + <mo>)</mo> + </mrow> + <mrow> + <mo>gcd</mo> + <mo>(</mo> + <mn>a</mn> + <mo>,</mo> + <mn>b</mn> + <mo>)</mo> + </mrow> + </mfrac> + </mrow> + </math>XpXpXp +</p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-004.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-004.html new file mode 100644 index 0000000000..17f0f1ecd0 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-004.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<meta charset="utf-8"/> +<title><semantics> - mozilla bug 512418</title> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=512418"> +<link rel="help" href="https://w3c.github.io/mathml-core/#semantics-and-presentation"> +<link rel="match" href="semantics-004-ref.html"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<meta name="assert" content="The semantics element shouldn't add space around it."> +<style> + math, p { + font: 25px Ahem; + } +</style> +<p> + XpXpXp<math xmlns="http://www.w3.org/1998/Math/MathML"> + <semantics> + <mrow> + <mrow> + <mo>lcm</mo> + <mo>(</mo> + <mn>a</mn> + <mo>,</mo> + <mn>b</mn> + <mo>)</mo> + </mrow> + <mo>=</mo> + <mfrac> + <mrow> + <mo>(</mo> + <mn>a</mn> + <mo>⁢</mo> + <mn>b</mn> + <mo>)</mo> + </mrow> + <mrow> + <mo>gcd</mo> + <mo>(</mo> + <mn>a</mn> + <mo>,</mo> + <mn>b</mn> + <mo>)</mo> + </mrow> + </mfrac> + </mrow> + </semantics> + </math>XpXpXp +</p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-005-ref.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-005-ref.html new file mode 100644 index 0000000000..cf722603e1 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-005-ref.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<title><semantics> - mozilla bug 21479 (reference)</title> +<meta charset="utf-8"/> +<p> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <mover> + <mspace width="300px" height="10px" mathbackground="black"></mspace> + <mo>¯</mo> + </mover> + </math> +</p> diff --git a/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-005.html b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-005.html new file mode 100644 index 0000000000..e4fe611c47 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/mrow/semantics-005.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<title><semantics> - mozilla bug 21479</title> +<meta charset="utf-8"/> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=21479"> +<link rel="help" href="https://w3c.github.io/mathml-core/#semantics-and-presentation"> +<link rel="match" href="semantics-005-ref.html"> +<meta name="assert" content="The embellished operator made of a single mo inside a semantics element is treated the same as the mo alone."> +<p> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <mover> + <mspace width="300px" height="10px" mathbackground="black"></mspace> + <semantics><mo>¯</mo></semantics> + </mover> + </math> +</p> 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>∏</mo> + <mo id="mo3">)</mo> + <mrow> + </math> + </p> + <p> + <math> + <mrow> + <mo id="mo2a">(</mo> + <mo>∏</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">⨀</mo> + </math> + </p> + <p> + <math displaystyle="true"> + <mo id="mo1">⨁</mo> + </math> + </p> + <p> + <math displaystyle="true"> + <mo id="mo2">⨃</mo> + </math> + </p> + <p> + <math displaystyle="true"> + <mo id="mo3">⨅</mo> + </math> + </p> + <p> + <math displaystyle="true"> + <mo id="mo4">⨇</mo> + </math> + </p> + <p> + <math displaystyle="true"> + <mo id="mo5">⨈</mo> + </math> + </p> + <p> + <math displaystyle="true"> + <mo id="mo6">⨉</mo> + </math> + </p> + <p> + <math displaystyle="true"> + <mo id="mo7">⨊</mo> + </math> + </p> + <p> + <math displaystyle="true"> + <mo id="mo8">⫼</mo> + </math> + </p> + <p> + <math displaystyle="true"> + <mo id="mo9">⫿</mo> + </math> + </p> + <p> + <math> + <mo id="moRef0">⨀</mo> + </math> + </p> + <p> + <math> + <mo id="moRef1">⨁</mo> + </math> + </p> + <p> + <math> + <mo id="moRef2">⨃</mo> + </math> + </p> + <p> + <math> + <mo id="moRef3">⨅</mo> + </math> + </p> + <p> + <math> + <mo id="moRef4">⨇</mo> + </math> + </p> + <p> + <math> + <mo id="moRef5">⨈</mo> + </math> + </p> + <p> + <math> + <mo id="moRef6">⨉</mo> + </math> + </p> + <p> + <math> + <mo id="moRef7">⨊</mo> + </math> + </p> + <p> + <math> + <mo id="moRef8">⫼</mo> + </math> + </p> + <p> + <math> + <mo id="moRef9">⫿</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">⨀</mo> + </mrow> + </math> + </p> + <p> + <math displaystyle="true"> + <mrow> + <mspace height="3em" /> + <mo id="mo1">⨁</mo> + </mrow> + </math> + </p> + <p> + <math displaystyle="true"> + <mrow> + <mspace height="3em" /> + <mo id="mo2">⨃</mo> + </mrow> + </math> + </p> + <p> + <math displaystyle="true"> + <mrow> + <mspace height="3em" /> + <mo id="mo3">⨅</mo> + </mrow> + </math> + </p> + <p> + <math displaystyle="true"> + <mrow> + <mspace height="3em" /> + <mo id="mo4">⨇</mo> + </mrow> + </math> + </p> + <p> + <math displaystyle="true"> + <mrow> + <mspace height="3em" /> + <mo id="mo5">⨈</mo> + </mrow> + </math> + </p> + <p> + <math displaystyle="true"> + <mrow> + <mspace height="3em" /> + <mo id="mo6">⨉</mo> + </mrow> + </math> + </p> + <p> + <math displaystyle="true"> + <mrow> + <mspace height="3em" /> + <mo id="mo7">⨊</mo> + </mrow> + </math> + </p> + <p> + <math displaystyle="true"> + <mrow> + <mspace height="3em" /> + <mo id="mo8">⫼</mo> + </mrow> + </math> + </p> + <p> + <math displaystyle="true"> + <mrow> + <mspace height="3em" /> + <mo id="mo9">⫿</mo> + </mrow> + </math> + </p> + <p> + <math displaystyle="true"> + <mo id="moRef0">⨀</mo> + </math> + <math displaystyle="true"> + <mo id="moRef1">⨁</mo> + </math> + <math displaystyle="true"> + <mo id="moRef2">⨃</mo> + </math> + <math displaystyle="true"> + <mo id="moRef3">⨅</mo> + </math> + <math displaystyle="true"> + <mo id="moRef4">⨇</mo> + </math> + <math displaystyle="true"> + <mo id="moRef5">⨈</mo> + </math> + <math displaystyle="true"> + <mo id="moRef6">⨉</mo> + </math> + <math displaystyle="true"> + <mo id="moRef7">⨊</mo> + </math> + <math displaystyle="true"> + <mo id="moRef8">⫼</mo> + </math> + <math displaystyle="true"> + <mo id="moRef9">⫿</mo> + </math> + </p> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-001-ref.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-001-ref.html new file mode 100644 index 0000000000..d814944f53 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-001-ref.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> + <head> + <title>mmultiscript with no scripts (reference)</title> + </head> + <body> + <math> + <mmultiscripts> + <mtext>base</mtext> + <none/> + <none/> + </mmultiscripts> + </math> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-001.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-001.html new file mode 100644 index 0000000000..e55a04e128 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-001.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> + <head> + <title>mmultiscript with no scripts</title> + <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=208309"> + <link rel="help" href="https://w3c.github.io/mathml-core/#base-with-prescripts-and-postscripts"> + <link rel="match" href="mmultiscript-001-ref.html"> + <meta name="assert" content="mmultiscript with no scripts renders the same as if it had two none post-scripts"> + </head> + <body> + <math> + <mmultiscripts> + <mtext>base</mtext> + </mmultiscripts> + </math> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-002-ref.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-002-ref.html new file mode 100644 index 0000000000..33f12d7cdf --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-002-ref.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> + <head> + <title>mmultiscript with mprescripts (reference)</title> + </head> + <body> + <math> + <mmultiscripts> + <mtext>base</mtext> + <none/> + <none/> + <mprescripts/> + </mmultiscripts> + </math> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-002.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-002.html new file mode 100644 index 0000000000..c5e426008f --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-002.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> + <head> + <title>mmultiscript with mprescripts</title> + <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=208309"> + <link rel="help" href="https://w3c.github.io/mathml-core/#base-with-prescripts-and-postscripts"> + <link rel="match" href="mmultiscript-002-ref.html"> + <meta name="assert" content="mmultiscript with no scripts and a mprescripts child renders the same as if it had two none pre-scripts"> + </head> + <body> + <math> + <mmultiscripts> + <mtext>base</mtext> + <mprescripts/> + </mmultiscripts> + </math> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-003-ref.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-003-ref.html new file mode 100644 index 0000000000..daac6b3346 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-003-ref.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<html> + <head> + <title>alignment of mmultiscript sub/superscripts</title> + </head> + <body> + <math> + <mmultiscripts> + <mspace width="50px" height="50px" mathbackground="red"/> + <mrow> + <mspace width="50px" height="10px" mathbackground="blue"/> + <mspace width="50px" height="10px"/> + </mrow> + <mspace width="100px" height="10px" mathbackground="green"/> + <mprescripts/> + <mrow> + <mspace width="50px" height="10px"/> + <mspace width="50px" height="10px" mathbackground="blue"/> + </mrow> + <mspace width="100px" height="10px" mathbackground="green"/> + </mmultiscripts> + </math> + <br/> + <br/> + <math> + <mmultiscripts> + <mspace width="50px" height="50px" mathbackground="red"/> + <mspace width="100px" height="10px" mathbackground="green"/> + <mrow> + <mspace width="50px" height="10px" mathbackground="blue"/> + <mspace width="50px" height="10px"/> + </mrow> + <mprescripts/> + <mspace width="100px" height="10px" mathbackground="green"/> + <mrow> + <mspace width="50px" height="10px"/> + <mspace width="50px" height="10px" mathbackground="blue"/> + </mrow> + </mmultiscripts> + </math> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-003.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-003.html new file mode 100644 index 0000000000..7de3e98b8a --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/mmultiscript-003.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<html> + <head> + <title>alignment of mmultiscript sub/superscripts</title> + <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=928675"> + <link rel="help" href="https://w3c.github.io/mathml-core/#base-with-prescripts-and-postscripts"> + <link rel="match" href="mmultiscript-003-ref.html"> + <meta name="assert" content="In LTR mode, pre-scripts are right-aligned and post-scripts are left-aligned."> + </head> + <body> + <math> + <mmultiscripts> + <mspace width="50px" height="50px" mathbackground="red"/> + <mrow> + <mspace width="50px" height="10px" mathbackground="blue"/> + </mrow> + <mspace width="100px" height="10px" mathbackground="green"/> + <mprescripts/> + <mrow> + <mspace width="50px" height="10px" mathbackground="blue"/> + </mrow> + <mspace width="100px" height="10px" mathbackground="green"/> + </mmultiscripts> + </math> + <br/> + <br/> + <math> + <mmultiscripts> + <mspace width="50px" height="50px" mathbackground="red"/> + <mspace width="100px" height="10px" mathbackground="green"/> + <mrow> + <mspace width="50px" height="10px" mathbackground="blue"/> + </mrow> + <mprescripts/> + <mspace width="100px" height="10px" mathbackground="green"/> + <mrow> + <mspace width="50px" height="10px" mathbackground="blue"/> + </mrow> + </mmultiscripts> + </math> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/munder-mover-align-accent-false-ref.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/munder-mover-align-accent-false-ref.html new file mode 100644 index 0000000000..db72d0c5e2 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/munder-mover-align-accent-false-ref.html @@ -0,0 +1,70 @@ +<!DOCTYPE html> +<html> + <head> + <title>Horizontal alignment of base with munder/mover scripts (accent="false")</title> + </head> + <body> + <table border="1"> + <tr> + <th colspan="2">mover</th> + <th colspan="2">munder</th> + </tr> + <tr> + <td align="center">Over < Base</td> + <td align="center">Over > Base</td> + <td align="center">Under < Base</td> + <td align="center">Under > Base</td> + </tr> + <tr> + <td align="center"> + <math> + <mover> + <mspace height="15px" width="75px" mathbackground="blue"/> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="red"/> + <mspace height="15px" width="25px"/> + </mrow> + </mover> + </math> + </td> + <td align="center"> + <math> + <mover> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="blue"/> + <mspace height="15px" width="25px"/> + </mrow> + <mspace height="15px" width="75px" mathbackground="red"/> + </mover> + </math> + </td> + <td align="center"> + <math> + <munder> + <mspace height="15px" width="75px" mathbackground="blue"/> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="red"/> + <mspace height="15px" width="25px"/> + </mrow> + </munder> + </math> + </td> + <td align="center"> + <math> + <munder> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="blue"/> + <mspace height="15px" width="25px"/> + </mrow> + <mspace height="15px" width="75px" mathbackground="red"/> + </munder> + </math> + </td> + </tr> + </table> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/munder-mover-align-accent-false.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/munder-mover-align-accent-false.html new file mode 100644 index 0000000000..0d4205410a --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/munder-mover-align-accent-false.html @@ -0,0 +1,57 @@ +<!DOCTYPE html> +<html> + <head> + <title>Horizontal alignment of base with munder/mover scripts (accent="false")</title> + <link rel="help" href="https://w3c.github.io/mathml-core/#underscripts-and-overscripts-munder-mover-munderover"> + <link rel="match" href="munder-mover-align-accent-false-ref.html"> + <meta name="assert" content="base, underscript and overscript should be horizontally aligned."> + </head> + <body> + <table border="1"> + <tr> + <th colspan="2">mover</th> + <th colspan="2">munder</th> + </tr> + <tr> + <td align="center">Over < Base</td> + <td align="center">Over > Base</td> + <td align="center">Under < Base</td> + <td align="center">Under > Base</td> + </tr> + <tr> + <td align="center"> + <math> + <mover> + <mspace height="15px" width="75px" mathbackground="blue"/> + <mspace height="15px" width="25px" mathbackground="red"/> + </mover> + </math> + </td> + <td align="center"> + <math> + <mover> + <mspace height="15px" width="25px" mathbackground="blue"/> + <mspace height="15px" width="75px" mathbackground="red"/> + </mover> + </math> + </td> + <td align="center"> + <math> + <munder> + <mspace height="15px" width="75px" mathbackground="blue"/> + <mspace height="15px" width="25px" mathbackground="red"/> + </munder> + </math> + </td> + <td align="center"> + <math> + <munder> + <mspace height="15px" width="25px" mathbackground="blue"/> + <mspace height="15px" width="75px" mathbackground="red"/> + </munder> + </math> + </td> + </tr> + </table> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/munder-mover-align-accent-true-ref.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/munder-mover-align-accent-true-ref.html new file mode 100644 index 0000000000..da1033563e --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/munder-mover-align-accent-true-ref.html @@ -0,0 +1,70 @@ +<!DOCTYPE html> +<html> + <head> + <title>Horizontal alignment of base with munder/mover scripts (accent="true")</title> + </head> + <body> + <table border="1"> + <tr> + <th colspan="2">mover</th> + <th colspan="2">munder</th> + </tr> + <tr> + <td align="center">Over < Base</td> + <td align="center">Over > Base</td> + <td align="center">Under < Base</td> + <td align="center">Under > Base</td> + </tr> + <tr> + <td align="center"> + <math> + <mover accent="true"> + <mspace height="15px" width="75px" mathbackground="blue"/> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="red"/> + <mspace height="15px" width="25px"/> + </mrow> + </mover> + </math> + </td> + <td align="center"> + <math> + <mover accent="true"> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="blue"/> + <mspace height="15px" width="25px"/> + </mrow> + <mspace height="15px" width="75px" mathbackground="red"/> + </mover> + </math> + </td> + <td align="center"> + <math> + <munder accentunder="true"> + <mspace height="15px" width="75px" mathbackground="blue"/> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="red"/> + <mspace height="15px" width="25px"/> + </mrow> + </munder> + </math> + </td> + <td align="center"> + <math> + <munder accentunder="true"> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="blue"/> + <mspace height="15px" width="25px"/> + </mrow> + <mspace height="15px" width="75px" mathbackground="red"/> + </munder> + </math> + </td> + </tr> + </table> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/munder-mover-align-accent-true.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/munder-mover-align-accent-true.html new file mode 100644 index 0000000000..aa70d244f3 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/munder-mover-align-accent-true.html @@ -0,0 +1,57 @@ +<!DOCTYPE html> +<html> + <head> + <title>Horizontal alignment of base with munder/mover scripts (accent="true")</title> + <link rel="help" href="https://w3c.github.io/mathml-core/#underscripts-and-overscripts-munder-mover-munderover"> + <link rel="match" href="munder-mover-align-accent-true-ref.html"> + <meta name="assert" content="base, underscript and overscript should be horizontally aligned."> + </head> + <body> + <table border="1"> + <tr> + <th colspan="2">mover</th> + <th colspan="2">munder</th> + </tr> + <tr> + <td align="center">Over < Base</td> + <td align="center">Over > Base</td> + <td align="center">Under < Base</td> + <td align="center">Under > Base</td> + </tr> + <tr> + <td align="center"> + <math> + <mover accent="true"> + <mspace height="15px" width="75px" mathbackground="blue"/> + <mspace height="15px" width="25px" mathbackground="red"/> + </mover> + </math> + </td> + <td align="center"> + <math> + <mover accent="true"> + <mspace height="15px" width="25px" mathbackground="blue"/> + <mspace height="15px" width="75px" mathbackground="red"/> + </mover> + </math> + </td> + <td align="center"> + <math> + <munder accentunder="true"> + <mspace height="15px" width="75px" mathbackground="blue"/> + <mspace height="15px" width="25px" mathbackground="red"/> + </munder> + </math> + </td> + <td align="center"> + <math> + <munder accentunder="true"> + <mspace height="15px" width="25px" mathbackground="blue"/> + <mspace height="15px" width="75px" mathbackground="red"/> + </munder> + </math> + </td> + </tr> + </table> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/munderover-align-accent-false-ref.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/munderover-align-accent-false-ref.html new file mode 100644 index 0000000000..c339149c25 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/munderover-align-accent-false-ref.html @@ -0,0 +1,85 @@ +<!DOCTYPE html> +<html> + <head> + <title>Horizontal alignment of base with munder/mover scripts (accent="false")</title> + </head> + <body> + <table border="1"> + <tr> + <th colspan="6">munderover</th> + </tr> + <tr> + <td align="center">Over < Base < Under</td> + <td align="center">Over > Base > Under</td> + <td align="center">Over = Under < Base</td> + <td align="center">Over = Under > Base</td> + </tr> + <tr> + <td align="center"> + <math> + <munderover accent="false" accentunder="false"> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="50px" mathbackground="blue"/> + <mspace height="15px" width="25px"/> + </mrow> + <mspace height="15px" width="75px" mathbackground="red"/> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="red"/> + <mspace height="15px" width="25px"/> + </mrow> + </munderover> + </math> + </td> + <td align="center"> + <math> + <munderover accent="false" accentunder="false"> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="50px" mathbackground="blue"/> + <mspace height="15px" width="25px"/> + </mrow> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="red"/> + <mspace height="15px" width="25px"/> + </mrow> + <mspace height="15px" width="75px" mathbackground="red"/> + </munderover> + </math> + </td> + <td align="center"> + <math> + <munderover accent="false" accentunder="false"> + <mspace height="15px" width="75px" mathbackground="blue"/> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="red"/> + <mspace height="15px" width="25px"/> + </mrow> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="red"/> + <mspace height="15px" width="25px"/> + </mrow> + </munderover> + </math> + </td> + <td align="center"> + <math> + <munderover accent="false" accentunder="false"> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="blue"/> + <mspace height="15px" width="25px"/> + </mrow> + <mspace height="15px" width="75px" mathbackground="red"/> + <mspace height="15px" width="75px" mathbackground="red"/> + </munderover> + </math> + </td> + </tr> + </table> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/munderover-align-accent-false.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/munderover-align-accent-false.html new file mode 100644 index 0000000000..2c082612a2 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/munderover-align-accent-false.html @@ -0,0 +1,60 @@ +<!DOCTYPE html> +<html> + <head> + <title>Horizontal alignment of base with munder/mover scripts (accent="false")</title> + <link rel="help" href="https://w3c.github.io/mathml-core/#underscripts-and-overscripts-munder-mover-munderover"> + <link rel="match" href="munderover-align-accent-false-ref.html"> + <meta name="assert" content="base, underscript and overscript should be horizontally aligned."> + </head> + <body> + <table border="1"> + <tr> + <th colspan="4">munderover</th> + </tr> + <tr> + <td align="center">Over < Base < Under</td> + <td align="center">Over > Base > Under</td> + <td align="center">Over = Under < Base</td> + <td align="center">Over = Under > Base</td> + </tr> + <tr> + <td align="center"> + <math> + <munderover> + <mspace height="15px" width="50px" mathbackground="blue"/> + <mspace height="15px" width="75px" mathbackground="red"/> + <mspace height="15px" width="25px" mathbackground="red"/> + </munderover> + </math> + </td> + <td align="center"> + <math> + <munderover> + <mspace height="15px" width="50px" mathbackground="blue"/> + <mspace height="15px" width="25px" mathbackground="red"/> + <mspace height="15px" width="75px" mathbackground="red"/> + </munderover> + </math> + </td> + <td align="center"> + <math> + <munderover> + <mspace height="15px" width="75px" mathbackground="blue"/> + <mspace height="15px" width="25px" mathbackground="red"/> + <mspace height="15px" width="25px" mathbackground="red"/> + </munderover> + </math> + </td> + <td align="center"> + <math> + <munderover> + <mspace height="15px" width="25px" mathbackground="blue"/> + <mspace height="15px" width="75px" mathbackground="red"/> + <mspace height="15px" width="75px" mathbackground="red"/> + </munderover> + </math> + </td> + </tr> + </table> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/munderover-align-accent-true-ref.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/munderover-align-accent-true-ref.html new file mode 100644 index 0000000000..aababcb17b --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/munderover-align-accent-true-ref.html @@ -0,0 +1,85 @@ +<!DOCTYPE html> +<html> + <head> + <title>Horizontal alignment of base with munder/mover scripts (accent="true")</title> + </head> + <body> + <table border="1"> + <tr> + <th colspan="6">munderover</th> + </tr> + <tr> + <td align="center">Over < Base < Under</td> + <td align="center">Over > Base > Under</td> + <td align="center">Over = Under < Base</td> + <td align="center">Over = Under > Base</td> + </tr> + <tr> + <td align="center"> + <math> + <munderover accent="true" accentunder="true"> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="50px" mathbackground="blue"/> + <mspace height="15px" width="25px"/> + </mrow> + <mspace height="15px" width="75px" mathbackground="red"/> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="red"/> + <mspace height="15px" width="25px"/> + </mrow> + </munderover> + </math> + </td> + <td align="center"> + <math> + <munderover accent="true" accentunder="true"> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="50px" mathbackground="blue"/> + <mspace height="15px" width="25px"/> + </mrow> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="red"/> + <mspace height="15px" width="25px"/> + </mrow> + <mspace height="15px" width="75px" mathbackground="red"/> + </munderover> + </math> + </td> + <td align="center"> + <math> + <munderover accent="true" accentunder="true"> + <mspace height="15px" width="75px" mathbackground="blue"/> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="red"/> + <mspace height="15px" width="25px"/> + </mrow> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="red"/> + <mspace height="15px" width="25px"/> + </mrow> + </munderover> + </math> + </td> + <td align="center"> + <math> + <munderover accent="true" accentunder="true"> + <mrow> + <mspace height="15px" width="25px"/> + <mspace height="15px" width="25px" mathbackground="blue"/> + <mspace height="15px" width="25px"/> + </mrow> + <mspace height="15px" width="75px" mathbackground="red"/> + <mspace height="15px" width="75px" mathbackground="red"/> + </munderover> + </math> + </td> + </tr> + </table> + </body> +</html> diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/munderover-align-accent-true.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/munderover-align-accent-true.html new file mode 100644 index 0000000000..e6578ade52 --- /dev/null +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/munderover-align-accent-true.html @@ -0,0 +1,60 @@ +<!DOCTYPE html> +<html> + <head> + <title>Horizontal alignment of base with munder/mover scripts (accent="true")</title> + <link rel="help" href="https://w3c.github.io/mathml-core/#underscripts-and-overscripts-munder-mover-munderover"> + <link rel="match" href="munderover-align-accent-true-ref.html"> + <meta name="assert" content="base, underscript and overscript should be horizontally aligned."> + </head> + <body> + <table border="1"> + <tr> + <th colspan="4">munderover</th> + </tr> + <tr> + <td align="center">Over < Base < Under</td> + <td align="center">Over > Base > Under</td> + <td align="center">Over = Under < Base</td> + <td align="center">Over = Under > Base</td> + </tr> + <tr> + <td align="center"> + <math> + <munderover accent="true" accentunder="true"> + <mspace height="15px" width="50px" mathbackground="blue"/> + <mspace height="15px" width="75px" mathbackground="red"/> + <mspace height="15px" width="25px" mathbackground="red"/> + </munderover> + </math> + </td> + <td align="center"> + <math> + <munderover accent="true" accentunder="true"> + <mspace height="15px" width="50px" mathbackground="blue"/> + <mspace height="15px" width="25px" mathbackground="red"/> + <mspace height="15px" width="75px" mathbackground="red"/> + </munderover> + </math> + </td> + <td align="center"> + <math> + <munderover accent="true" accentunder="true"> + <mspace height="15px" width="75px" mathbackground="blue"/> + <mspace height="15px" width="25px" mathbackground="red"/> + <mspace height="15px" width="25px" mathbackground="red"/> + </munderover> + </math> + </td> + <td align="center"> + <math> + <munderover accent="true" accentunder="true"> + <mspace height="15px" width="25px" mathbackground="blue"/> + <mspace height="15px" width="75px" mathbackground="red"/> + <mspace height="15px" width="75px" mathbackground="red"/> + </munderover> + </math> + </td> + </tr> + </table> + </body> +</html> |