Bug 1632190 [wpt PR 23171] - Add MathML tests for color/visibility of normal, large and stretchy mo., a=testonly
authorFrédéric Wang <fwang@igalia.com>
Tue, 28 Apr 2020 11:37:10 +0000
changeset 527571 486df864d8d4a36a5a3b6d4e8951c7db2ad6a039
parent 527570 46ecf7e8fcfcfcd7073bdc2cf812fd10cf27fd86
child 527572 d999146c5b07bcc326ee8f88a9fea0a5dd988405
push id37368
push userbtara@mozilla.com
push dateFri, 01 May 2020 21:45:51 +0000
treeherdermozilla-central@0f9c5a59e45d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1632190, 23171
milestone77.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1632190 [wpt PR 23171] - Add MathML tests for color/visibility of normal, large and stretchy mo., a=testonly Automatic update from web-platform-tests Add MathML tests for color/visibility of normal, large and stretchy mo. (#23171) https://github.com/mathml-refresh/mathml/issues/57 -- wpt-commits: 4338d5203d020abe7249f34f93dc170c32c23dfa wpt-pr: 23171
testing/web-platform/tests/mathml/relations/css-styling/color-005-ref.html
testing/web-platform/tests/mathml/relations/css-styling/color-005.html
testing/web-platform/tests/mathml/relations/css-styling/visibility-005-ref.html
testing/web-platform/tests/mathml/relations/css-styling/visibility-005.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/mathml/relations/css-styling/color-005-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>color (reference)</title>
+</head>
+<body>
+  <p>Test passes if you see a green square.</p>
+  <div style="background: green; width: 200px; height: 200px; padding: 1px;">
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/mathml/relations/css-styling/color-005.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<meta charset="utf-8">
+<title>color</title>
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
+<link rel="match" href="color-005-ref.html"/>
+<meta name="assert" content="Verify that the color is used for normal, stretchy and large operators.">
+<style>
+  math {
+      font: 20px/1 Ahem;
+  }
+  @font-face {
+      font-family: operators;
+      src: url("/fonts/math/operators.woff");
+  }
+  mo {
+      font-family: operators;
+  }
+</style>
+</head>
+<body>
+  <p>Test passes if you see a green square.</p>
+  <div id="square" style="background: green; color: red; width: 200px; height: 200px; padding: 1px;">
+    <math>
+      <!-- unstretched operators -->
+      <mo style="color: green">⥯</mo>
+      <mo style="color: green">+</mo>
+      <mo style="color: green">-</mo>
+    </math>
+    <math displaystyle="true">
+      <!-- large operator -->
+      <mo largeop="true" style="color: green">⥯</mo>
+    </math>
+    <math>
+      <mrow>
+        <!-- stretchy, small size -->
+        <mspace height="2em"/>
+        <mo style="color: green">⥯</mo>
+      </mrow>
+    </math>
+    <math>
+      <mrow>
+        <!-- stretchy, large size -->
+        <mspace height="4em"/>
+        <mo style="color: green">⥯</mo>
+      </mrow>
+    </math>
+    <div id="dynamic">
+      <math>
+        <!-- unstretched operators -->
+        <mo stretchy="false">⥯</mo>
+        <mo>+</mo>
+        <mo>-</mo>
+      </math>
+      <math displaystyle="true">
+        <!-- large operator -->
+        <mo largeop="true">⥯</mo>
+      </math>
+      <math>
+        <mrow>
+          <!-- stretchy, small size -->
+          <mspace height="2em"/>
+          <mo>⥯</mo>
+        </mrow>
+      </math>
+      <math>
+        <mrow>
+          <!-- stretchy, large size -->
+          <mspace height="4em"/>
+          <mo>⥯</mo>
+        </mrow>
+      </math>
+    </div>
+  </div>
+  <script>
+    window.addEventListener("load", () => document.fonts.ready.then(() => {
+        document.getElementById("dynamic").style.color = "green";
+        document.documentElement.classList.remove("reftest-wait");
+    }));
+  </script>
+  <script src="/mathml/support/feature-detection.js"></script>
+  <script>MathMLFeatureDetection.ensure_for_match_reftest("has_operator_spacing");</script>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/mathml/relations/css-styling/visibility-005-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>visibility (reference)</title>
+</head>
+<body>
+  <p>Test passes if you see a green square.</p>
+  <div style="background: green; width: 200px; height: 200px;">
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/mathml/relations/css-styling/visibility-005.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+<meta charset="utf-8">
+<title>visibility</title>
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#css-styling">
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#operator-fence-separator-or-accent-mo">
+<link rel="match" href="visibility-005-ref.html"/>
+<meta name="assert" content="Verify that visibility=hidden is used for normal, stretchy and large operators.">
+<style>
+  math {
+      font: 20px/1 Ahem;
+  }
+  @font-face {
+      font-family: operators;
+      src: url("/fonts/math/operators.woff");
+  }
+  mo {
+      font-family: operators;
+  }
+</style>
+</head>
+<body>
+  <p>Test passes if you see a green square.</p>
+  <div style="background: green; color: red; width: 200px; height: 200px;">
+    <math>
+      <!-- unstretched operators -->
+      <mo style="visibility: hidden">⥯</mo>
+      <mo style="visibility: hidden">+</mo>
+      <mo style="visibility: hidden">-</mo>
+    </math>
+    <math displaystyle="true">
+      <!-- large operator -->
+      <mo largeop="true" style="visibility: hidden">⥯</mo>
+    </math>
+    <math>
+      <mrow>
+        <!-- stretchy, small size -->
+        <mspace height="2em"/>
+        <mo style="visibility: hidden">⥯</mo>
+      </mrow>
+    </math>
+    <math>
+      <mrow>
+        <!-- stretchy, large size -->
+        <mspace height="4em"/>
+        <mo style="visibility: hidden">⥯</mo>
+      </mrow>
+    </math>
+    <div id="dynamic">
+      <math>
+        <!-- unstretched operators -->
+        <mo stretchy="false">⥯</mo>
+        <mo>+</mo>
+        <mo>-</mo>
+      </math>
+      <math displaystyle="true">
+        <!-- large operator -->
+        <mo largeop="true">⥯</mo>
+      </math>
+      <math>
+        <mrow>
+          <!-- stretchy, small size -->
+          <mspace height="2em"/>
+          <mo>⥯</mo>
+        </mrow>
+      </math>
+      <math>
+        <mrow>
+          <!-- stretchy, large size -->
+          <mspace height="4em"/>
+          <mo>⥯</mo>
+        </mrow>
+      </math>
+    </div>
+  </div>
+  <script>
+    window.addEventListener("load", () => document.fonts.ready.then(() => {
+        document.getElementById("dynamic").style.visibility = "hidden";
+        document.documentElement.classList.remove("reftest-wait");
+    }));
+  </script>
+  <script src="/mathml/support/feature-detection.js"></script>
+  <script>MathMLFeatureDetection.ensure_for_match_reftest("has_menclose");</script>
+</body>
+</html>