summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/mathml/presentation-markup/tokens
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/mathml/presentation-markup/tokens
parentInitial commit. (diff)
downloadfirefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz
firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/mathml/presentation-markup/tokens')
-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/ms-001-ref.html22
-rw-r--r--testing/web-platform/tests/mathml/presentation-markup/tokens/ms-001.html30
4 files changed, 165 insertions, 0 deletions
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/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>