From e38a15e65aee60c35fe5e6d6af28b869a8400eaa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?=
Date: Thu, 18 Jul 2019 12:37:26 +0200
Subject: [PATCH] Make MathML tests for namedspaces verify that these values
are ignored. (#17907)
These values have been removed from MathML Core:
https://github.com/mathml-refresh/mathml/issues/75
---
.../fractions/frac-linethickness-002-ref.html | 4 +-
.../fractions/frac-linethickness-002.html | 3 +-
mathml/relations/css-styling/lengths-2.html | 104 +++++++++++++++++-
3 files changed, 104 insertions(+), 7 deletions(-)
diff --git a/mathml/presentation-markup/fractions/frac-linethickness-002-ref.html b/mathml/presentation-markup/fractions/frac-linethickness-002-ref.html
index 69663938c1951a3..bf1938bd282bf09 100644
--- a/mathml/presentation-markup/fractions/frac-linethickness-002-ref.html
+++ b/mathml/presentation-markup/fractions/frac-linethickness-002-ref.html
@@ -30,8 +30,8 @@
-
-
+
+
diff --git a/mathml/relations/css-styling/lengths-2.html b/mathml/relations/css-styling/lengths-2.html
index 73fd23bbfd91d0b..145ae35276dabfa 100644
--- a/mathml/relations/css-styling/lengths-2.html
+++ b/mathml/relations/css-styling/lengths-2.html
@@ -39,7 +39,6 @@
assert_equals(getBox("unitEm").width, 120, "em");
assert_equals(getBox("unitEx").width, 500, "ex");
assert_equals(getBox("unitIn").width, 288, "in");
- assert_equals(getBox("unitNamed").width, 700, "namedspace");
assert_equals(getBox("unitMm").width, 576, "mm");
assert_equals(getBox("unitPc").width, 96, "pc");
assert_equals(getBox("unitPercentage").width, 60, "%");
@@ -53,7 +52,6 @@
assert_equals(getBox("spaceEm").width, 120, "em");
assert_equals(getBox("spaceEx").width, 500, "ex");
assert_equals(getBox("spaceIn").width, 288, "in");
- assert_equals(getBox("spaceNamed").width, 700, "namedspace");
assert_equals(getBox("spaceMm").width, 576, "mm");
assert_equals(getBox("spacePc").width, 96, "pc");
assert_equals(getBox("spacePercentage").width, 60, "%");
@@ -91,6 +89,30 @@
assert_approx_equals(topRef - getBox("N10").top, -123, epsilon, "N10");
}, "Non-positive numbers");
+ test(function() {
+ // Namedspace values are invalid in MathML Core.
+ ["veryverythinmathspace",
+ "verythinmathspace",
+ "thinmathspace",
+ "mediummathspace",
+ "thickmathspace",
+ "verythickmathspace",
+ "veryverythickmathspace",
+ "negativeveryverythinmathspace",
+ "negativeverythinmathspace",
+ "negativethinmathspace",
+ "negativemediummathspace",
+ "negativethickmathspace",
+ "negativeverythickmathspace",
+ "negativeveryverythickmathspace"
+ ].forEach(function(space) {
+ var mrow = document.getElementById(space);
+ var boxBefore = mrow.firstElementChild.getBoundingClientRect();
+ var boxAfter = mrow.lastElementChild.getBoundingClientRect();
+ assert_equals(boxAfter.left - boxBefore.right, 0, space);
+ });
+ }, "Legacy namedspaces");
+
done();
}
@@ -103,7 +125,6 @@
-
@@ -118,7 +139,6 @@
-
@@ -158,5 +178,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+