Bug 1539571 [wpt PR 16075] - Add tests for creating mfrac children dynamically, a=testonly
authorRob Buis <rbuis@igalia.com>
Thu, 18 Apr 2019 11:55:10 +0000
changeset 529914 af9bb8396c0d2efec4c37e116aa573f57f056ee6
parent 529913 8eb9c2619cc8b42114483876e7e7b497b9e00ec4
child 529915 a7b5df407099463ade924561af5ac9aedd529880
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1539571, 16075
milestone68.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 1539571 [wpt PR 16075] - Add tests for creating mfrac children dynamically, a=testonly Automatic update from web-platform-tests Add tests for creating mfrac children dynamically (#16075) * Add tests for creating mfrac children dynamically -- wpt-commits: e5cb5a68d2b0b0491c2cf1e7a0804c5ccd9b515e wpt-pr: 16075
testing/web-platform/tests/mathml/presentation-markup/fractions/frac-created-dynamically-2-ref.html
testing/web-platform/tests/mathml/presentation-markup/fractions/frac-created-dynamically-2.html
testing/web-platform/tests/mathml/presentation-markup/fractions/frac-created-dynamically-3-ref.html
testing/web-platform/tests/mathml/presentation-markup/fractions/frac-created-dynamically-3.html
testing/web-platform/tests/mathml/presentation-markup/fractions/frac-created-dynamically-ref.html
testing/web-platform/tests/mathml/presentation-markup/fractions/frac-created-dynamically.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-created-dynamically-2-ref.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>mfrac created dynamically</title>
+  </head>
+  <body>
+    <p>This test passes if it renders the same as an invalid fraction with 3 children.</p>
+    <math>
+      <mfrac>
+        <mspace width="50px" height="50px" style="background: black"></mspace>
+        <mspace width="50px" height="50px" style="background: black"></mspace>
+        <mspace width="50px" height="50px" style="background: black"></mspace>
+      </mfrac>
+    </math>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-created-dynamically-2.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>mfrac created dynamically</title>
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#mfrac">
+<meta name="assert" content="A dynamically added mfrac should render like the equivalent markup.">
+<link rel="match" href="frac-created-dynamically-2-ref.html">
+<script>
+  window.addEventListener("DOMContentLoaded", function() {
+  var mfrac = document.createElementNS("http://www.w3.org/1998/Math/MathML","mfrac");
+  var mspace1 = document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");
+  mspace1.setAttribute("width", "50px");
+  mspace1.setAttribute("height", "50px");
+  mspace1.setAttribute("style", "background: black");
+  var mspace2 = document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");
+  mspace2.setAttribute("width", "50px");
+  mspace2.setAttribute("height", "50px");
+  mspace2.setAttribute("style", "background: black");
+  var mspace3 = document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");
+  mspace3.setAttribute("width", "50px");
+  mspace3.setAttribute("height", "50px");
+  mspace3.setAttribute("style", "background: black");
+  document.getElementsByTagName("math")[0].appendChild(mfrac);
+  mfrac.appendChild(mspace1);
+  mfrac.appendChild(mspace2);
+  mfrac.appendChild(mspace3);
+  });
+</script>
+</head>
+<body>
+  <p>This test passes if it renders the same as an invalid fraction with 3 children.</p>
+  <math>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-created-dynamically-3-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>mfrac created dynamically</title>
+  </head>
+  <body>
+    <p>This test passes if you see a fraction 1/3.</p>
+    <math>
+      <mfrac>
+        <mi>1</mi>
+        <mi>3</mi>
+      </mfrac>
+    </math>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-created-dynamically-3.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>mfrac created dynamically</title>
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#mfrac">
+<meta name="assert" content="A dynamically added mfrac should render like the equivalent markup.">
+<link rel="match" href="frac-created-dynamically-3-ref.html">
+<script>
+  window.addEventListener("DOMContentLoaded", function() {
+  var mi3 = document.createElementNS("http://www.w3.org/1998/Math/MathML","mi");
+  mi3.appendChild(document.createTextNode("3"));
+  document.getElementsByTagName("mfrac")[0].appendChild(mi3);
+  document.getElementById("mi2").remove();
+  });
+</script>
+</head>
+<body>
+  <p>This test passes if you see a fraction 1/3.</p>
+  <math>
+    <mfrac>
+      <mi>1</mi>
+      <mi id="mi2">2</mi>
+    </mfrac>
+  </math>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-created-dynamically-ref.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>mfrac created dynamically</title>
+  </head>
+  <body>
+    <p>This test passes if you see a fraction.</p>
+    <math>
+      <mfrac>
+        <mspace width="50px" height="50px" style="background: black"></mspace>
+        <mspace width="50px" height="50px" style="background: black"></mspace>
+      </mfrac>
+    </math>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-created-dynamically.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>mfrac created dynamically</title>
+<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#mfrac">
+<meta name="assert" content="A dynamically added mfrac should render like the equivalent markup.">
+<link rel="match" href="frac-created-dynamically-ref.html">
+<script>
+  window.addEventListener("DOMContentLoaded", function() {
+  var mfrac = document.createElementNS("http://www.w3.org/1998/Math/MathML","mfrac");
+  var mspace1 = document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");
+  mspace1.setAttribute("width", "50px");
+  mspace1.setAttribute("height", "50px");
+  mspace1.setAttribute("style", "background: black");
+  var mspace2 = document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");
+  mspace2.setAttribute("width", "50px");
+  mspace2.setAttribute("height", "50px");
+  mspace2.setAttribute("style", "background: black");
+  mfrac.appendChild(mspace1);
+  mfrac.appendChild(mspace2);
+  document.getElementsByTagName("math")[0].appendChild(mfrac);
+  });
+</script>
+</head>
+<body>
+  <p>This test passes if you see a fraction.</p>
+  <math>
+</body>
+</html>