summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/mathml/presentation-markup/tokens
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/mathml/presentation-markup/tokens')
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mi-mozilla-409125-ref.xhtml11
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mi-mozilla-409125.xhtml15
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mi-mozilla-414123-ref.xhtml32
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mi-mozilla-414123.xhtml45
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mtext-like-001-ref.html43
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mtext-like-001.html70
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mtext-like-002.html70
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/tokens/mi-mathvariant-1-ref.xhtml9
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/tokens/mi-mathvariant-1.xhtml13
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/tokens/mi-mathvariant-2-ref.xhtml14
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/tokens/mi-mathvariant-2.xhtml12
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/tokens/ms-001-ref.html22
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/tokens/ms-001.html30
13 files changed, 386 insertions, 0 deletions
diff --git a/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mi-mozilla-409125-ref.xhtml b/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mi-mozilla-409125-ref.xhtml
new file mode 100644
index 0000000000..04d9eeba31
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mi-mozilla-409125-ref.xhtml
@@ -0,0 +1,11 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Mozilla bug 409125</title>
+</head>
+
+<body>
+
+<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mi id="mi">mi</mi></math>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mi-mozilla-409125.xhtml b/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mi-mozilla-409125.xhtml
new file mode 100644
index 0000000000..35b9951dcb
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mi-mozilla-409125.xhtml
@@ -0,0 +1,15 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Mozilla bug 409125</title>
+ <head>
+ <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=409125"/>
+ <link rel="match" href="dynamic-mi-mozilla-409125-ref.xhtml"/>
+ </head>
+</head>
+
+<body onload="document.getElementById('mi').firstChild.data = 'mi';">
+
+<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mi id="mi"> </mi></math>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mi-mozilla-414123-ref.xhtml b/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mi-mozilla-414123-ref.xhtml
new file mode 100644
index 0000000000..7ec9cb751c
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mi-mozilla-414123-ref.xhtml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Testcase for bug 414123</title>
+</head>
+<body>
+
+<math xmlns="http://www.w3.org/1998/Math/MathML">
+ <msup>
+ <mi>M</mi>
+ <mn>2</mn>
+ </msup>
+</math>
+
+<math xmlns="http://www.w3.org/1998/Math/MathML">
+ <msup>
+ <mi>M</mi>
+ <mn>2</mn>
+ </msup>
+</math>
+
+<math xmlns="http://www.w3.org/1998/Math/MathML">
+ <msup>
+ <mi>M</mi>
+ <mn>2</mn>
+ </msup>
+</math>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mi-mozilla-414123.xhtml b/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mi-mozilla-414123.xhtml
new file mode 100644
index 0000000000..b2d7e2d166
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mi-mozilla-414123.xhtml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+<head>
+ <title>Testcase for Mozilla bug 414123</title>
+ <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=414123"/>
+ <link rel="match" href="dynamic-mi-mozilla-414123-ref.xhtml"/>
+<script>
+function doTest() {
+ var t = document.createTextNode('M')
+ document.getElementById('mi1').appendChild(t);
+
+ var mi = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mi");
+ var mn = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mn");
+ var msup = document.createElementNS("http://www.w3.org/1998/Math/MathML", "msup");
+ mi.appendChild(document.createTextNode('M'));
+ mn.appendChild(document.createTextNode('2'));
+ msup.appendChild(mi);
+ msup.appendChild(mn);
+ document.getElementById('m').appendChild(msup);
+ document.documentElement.removeAttribute("class");
+}
+document.documentElement.addEventListener("TestRendered", doTest);
+</script>
+</head>
+<body>
+
+<math xmlns="http://www.w3.org/1998/Math/MathML">
+ <msup>
+ <mi id="mi1"></mi>
+ <mn>2</mn>
+ </msup>
+</math>
+
+<math xmlns="http://www.w3.org/1998/Math/MathML">
+ <msup>
+ <mi>M</mi>
+ <mn>2</mn>
+ </msup>
+</math>
+
+<math id="m" xmlns="http://www.w3.org/1998/Math/MathML"></math>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mtext-like-001-ref.html b/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mtext-like-001-ref.html
new file mode 100644
index 0000000000..a145a8eb51
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mtext-like-001-ref.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Dynamic mtext-like elements (reference)</title>
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<style>
+ math {
+ font: 25px/1 Ahem;
+ background: lightblue;
+ }
+ li {
+ padding: 2px;
+ }
+</style>
+</head>
+<body>
+ <ol>
+ <li><math><mtext class="testedElement">É</mtext></math></li>
+ <li><math><mtext class="testedElement">pX</mtext></math></li>
+ <li><math><mtext class="testedElement"><span>Xp</span></mtext></math></li>
+ <li><math><mi class="testedElement">É</mi></math></li>
+ <li><math><mi class="testedElement">pX</mi></math></li>
+ <li><math><mi class="testedElement"><span>Xp</span></mi></math></li>
+ <li><math><mn class="testedElement">É</mn></math></li>
+ <li><math><mn class="testedElement">pX</mn></math></li>
+ <li><math><mn class="testedElement"><span>Xp</span></mn></math></li>
+ <li><math><mo class="testedElement">É</mo></math></li>
+ <li><math><mo class="testedElement">pX</mo></math></li>
+ <li><math><mo class="testedElement"><span>Xp</span></mo></math></li>
+ <li><math><mo class="testedElement">É</mo></math></li>
+ <li><math><mo class="testedElement">pX</mo></math></li>
+ <li><math><mo class="testedElement"><span>Xp</span></mo></math></li>
+ <li><math><ms class="testedElement">É</ms></math></li>
+ <li><math><ms class="testedElement">pX</ms></math></li>
+ <li><math><ms class="testedElement"><span>Xp</span></ms></math></li>
+ <li><math><annotation class="testedElement">É</annotation></math></li>
+ <li><math><annotation class="testedElement">pX</annotation></math></li>
+ <li><math><annotation-xml class="testedElement">É</annotation-xml></math></li>
+ <li><math><annotation-xml class="testedElement">pX</annotation-xml></math></li>
+ </ol>
+</body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mtext-like-001.html b/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mtext-like-001.html
new file mode 100644
index 0000000000..8e42f7fa17
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mtext-like-001.html
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<meta charset="utf-8">
+<title>Dynamic mtext-like elements</title>
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext">
+<script src="/mathml/support/mathml-fragments.js"></script>
+<meta name="assert" content="Dynamically set children of mtext-like elements.">
+<style>
+ math {
+ font: 25px/1 Ahem;
+ background: lightblue;
+ }
+ li {
+ padding: 2px;
+ }
+</style>
+<link rel="match" href="dynamic-mtext-like-001-ref.html">
+<script>
+ window.addEventListener("load", function() {
+
+ // force initial layout so we're sure what we're testing against
+ document.documentElement.getBoundingClientRect();
+
+ Array.from(document.getElementsByClassName("testedElement")).forEach(e => {
+ if (e.textContent === "")
+ e.textContent = "É";
+ else if (e.textContent === "X")
+ e.textContent = "pX";
+ else if (e.textContent === "p") {
+ while (e.firstChild)
+ e.removeChild(e.firstChild);
+ e.insertAdjacentHTML("beforeend", "<span>Xp</span>")
+ }
+ });
+
+ document.documentElement.classList.remove('reftest-wait');
+ });
+</script>
+</head>
+<body>
+ <ol>
+ <li><math><mtext class="testedElement"></mtext></math></li>
+ <li><math><mtext class="testedElement">X</mtext></math></li>
+ <li><math><mtext class="testedElement">p</mtext></math></li>
+ <li><math><mi class="testedElement"></mi></math></li>
+ <li><math><mi class="testedElement">X</mi></math></li>
+ <li><math><mi class="testedElement">p</mi></math></li>
+ <li><math><mn class="testedElement"></mn></math></li>
+ <li><math><mn class="testedElement">X</mn></math></li>
+ <li><math><mn class="testedElement">p</mn></math></li>
+ <li><math><mo class="testedElement"></mo></math></li>
+ <li><math><mo class="testedElement">X</mo></math></li>
+ <li><math><mo class="testedElement">p</mo></math></li>
+ <li><math><mo class="testedElement"></mo></math></li>
+ <li><math><mo class="testedElement">X</mo></math></li>
+ <li><math><mo class="testedElement">p</mo></math></li>
+ <li><math><ms class="testedElement"></ms></math></li>
+ <li><math><ms class="testedElement">X</ms></math></li>
+ <li><math><ms class="testedElement">p</ms></math></li>
+ <!-- HTML parser does not accept span as a child of annotation or
+ annotation-xml, so we can't test dynamic VS static. -->
+ <li><math><annotation class="testedElement"></annotation></math></li>
+ <li><math><annotation class="testedElement">X</annotation></math></li>
+ <li><math><annotation-xml class="testedElement"></annotation-xml></math></li>
+ <li><math><annotation-xml class="testedElement">X</annotation-xml></math></li>
+ </ol>
+</body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mtext-like-002.html b/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mtext-like-002.html
new file mode 100644
index 0000000000..f04504bb8c
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/tokens/dynamic-mtext-like-002.html
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<meta charset="utf-8">
+<title>Dynamic mtext-like elements</title>
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<link rel="help" href="https://w3c.github.io/mathml-core/#text-mtext">
+<script src="/mathml/support/mathml-fragments.js"></script>
+<meta name="assert" content="Dynamically set children of mtext-like elements.">
+<style>
+ math {
+ font: 25px/1 Ahem;
+ background: lightblue;
+ }
+ li {
+ padding: 2px;
+ }
+</style>
+<link rel="match" href="dynamic-mtext-like-001-ref.html">
+<script>
+ window.addEventListener("load", function() {
+
+ // force initial layout so we're sure what we're testing against
+ document.documentElement.getBoundingClientRect();
+
+ Array.from(document.getElementsByClassName("testedElement")).forEach(e => {
+ if (e.textContent === "")
+ e.textContent = "É";
+ else if (e.textContent === "X")
+ e.firstChild.data = "pX";
+ else if (e.textContent === "p") {
+ while (e.firstChild)
+ e.removeChild(e.firstChild);
+ e.insertAdjacentHTML("beforeend", "<span>Xp</span>")
+ }
+ });
+
+ document.documentElement.classList.remove('reftest-wait');
+ });
+</script>
+</head>
+<body>
+ <ol>
+ <li><math><mtext class="testedElement"></mtext></math></li>
+ <li><math><mtext class="testedElement">X</mtext></math></li>
+ <li><math><mtext class="testedElement">p</mtext></math></li>
+ <li><math><mi class="testedElement"></mi></math></li>
+ <li><math><mi class="testedElement">X</mi></math></li>
+ <li><math><mi class="testedElement">p</mi></math></li>
+ <li><math><mn class="testedElement"></mn></math></li>
+ <li><math><mn class="testedElement">X</mn></math></li>
+ <li><math><mn class="testedElement">p</mn></math></li>
+ <li><math><mo class="testedElement"></mo></math></li>
+ <li><math><mo class="testedElement">X</mo></math></li>
+ <li><math><mo class="testedElement">p</mo></math></li>
+ <li><math><mo class="testedElement"></mo></math></li>
+ <li><math><mo class="testedElement">X</mo></math></li>
+ <li><math><mo class="testedElement">p</mo></math></li>
+ <li><math><ms class="testedElement"></ms></math></li>
+ <li><math><ms class="testedElement">X</ms></math></li>
+ <li><math><ms class="testedElement">p</ms></math></li>
+ <!-- HTML parser does not accept span as a child of annotation or
+ annotation-xml, so we can't test dynamic VS static. -->
+ <li><math><annotation class="testedElement"></annotation></math></li>
+ <li><math><annotation class="testedElement">X</annotation></math></li>
+ <li><math><annotation-xml class="testedElement"></annotation-xml></math></li>
+ <li><math><annotation-xml class="testedElement">X</annotation-xml></math></li>
+ </ol>
+</body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/tokens/mi-mathvariant-1-ref.xhtml b/testing/web-platform/tests/mathml/presentation-markup/tokens/mi-mathvariant-1-ref.xhtml
new file mode 100644
index 0000000000..ec3bb1a83e
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/tokens/mi-mathvariant-1-ref.xhtml
@@ -0,0 +1,9 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<body>
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
+ <mi mathvariant="normal">cos</mi>
+ <mo>&#x2061;</mo>
+ <mi>x</mi>
+ </math>
+</body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/tokens/mi-mathvariant-1.xhtml b/testing/web-platform/tests/mathml/presentation-markup/tokens/mi-mathvariant-1.xhtml
new file mode 100644
index 0000000000..04fe19194e
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/tokens/mi-mathvariant-1.xhtml
@@ -0,0 +1,13 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <link rel="help" href="https://w3c.github.io/mathml-core/#the-mathvariant-attribute"/>
+ <link rel="match" href="mi-mathvariant-1-ref.xhtml"/>
+</head>
+<body>
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
+ <mi>cos</mi>
+ <mo>&#x2061;</mo>
+ <mi>x</mi>
+ </math>
+</body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/tokens/mi-mathvariant-2-ref.xhtml b/testing/web-platform/tests/mathml/presentation-markup/tokens/mi-mathvariant-2-ref.xhtml
new file mode 100644
index 0000000000..35e6bf6ecd
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/tokens/mi-mathvariant-2-ref.xhtml
@@ -0,0 +1,14 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<body>
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
+ <!-- infinity has no corresponding mathematical italic alphanumeric
+ character and so should not be rendered with italic style.
+ bug 413115.
+ -->
+ <mi mathvariant="normal">&#x221e;</mi>
+ <!-- PLANCK CONSTANT already has italic style, and shouldn't have
+ additional slant applied -->
+ <mi mathvariant="normal">&#x210e;</mi>
+ </math>
+</body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/tokens/mi-mathvariant-2.xhtml b/testing/web-platform/tests/mathml/presentation-markup/tokens/mi-mathvariant-2.xhtml
new file mode 100644
index 0000000000..e83a24c5d3
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/tokens/mi-mathvariant-2.xhtml
@@ -0,0 +1,12 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <link rel="help" href="https://w3c.github.io/mathml-core/#the-mathvariant-attribute"/>
+ <link rel="match" href="mi-mathvariant-2-ref.xhtml"/>
+</head>
+<body>
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
+ <mi>&#x221e;</mi>
+ <mi>&#x210e;</mi>
+ </math>
+</body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/tokens/ms-001-ref.html b/testing/web-platform/tests/mathml/presentation-markup/tokens/ms-001-ref.html
new file mode 100644
index 0000000000..bbd42a93ee
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/tokens/ms-001-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8"/>
+ <title>ms legacy lquote and rquote attributes (reference)</title>
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+ <style>
+ math {
+ font: 25px/1 Ahem;
+ }
+ </style>
+ </head>
+ <body>
+
+ <p>
+ <math>
+ <ms>X</ms>
+ </math>
+ </p>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/mathml/presentation-markup/tokens/ms-001.html b/testing/web-platform/tests/mathml/presentation-markup/tokens/ms-001.html
new file mode 100644
index 0000000000..abac0c8b2e
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/tokens/ms-001.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8"/>
+ <title>ms legacy lquote and rquote attributes</title>
+ <link rel="help" href="https://w3c.github.io/mathml-core/#attributes-common-to-html-and-mathml-elements">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#css-styling">
+ <link rel="help" href="https://w3c.github.io/mathml-core/#string-literal-ms">
+ <meta name="assert" content="Verify that legacy lquote and rquote attributes are ignored on the ms element.">
+ <link rel="match" href="ms-001-ref.html">
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+ <style>
+ math {
+ font: 25px/1 Ahem;
+ }
+ </style>
+ </head>
+ <body>
+
+ <p>
+ <math>
+ <ms lquote="É" rquote="p">X</ms>
+ </math>
+ </p>
+
+ <script src="/mathml/support/feature-detection.js"></script>
+ <script>MathMLFeatureDetection.ensure_for_match_reftest("has_ms");</script>
+
+ </body>
+</html>