From 0a79733f32d122c976c6dae16dd7fb81d3a066f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?= Date: Tue, 4 Feb 2020 13:22:16 +0000 Subject: [PATCH] Bug 1613049 [wpt PR 21568] - Update space-like tests., a=testonly Automatic update from web-platform-tests Update space-like tests. (#21568) https://github.com/mathml-refresh/mathml/issues/183 -- wpt-commits: 56c5d893f8a3fc6cf2a889d1c42616098ac7959b wpt-pr: 21568 --- .../spaces/space-like-001.html | 41 +++++++++++++++++++ .../spaces/space-like-002.html | 12 +++--- .../spaces/space-like-003.html | 12 ------ 3 files changed, 47 insertions(+), 18 deletions(-) diff --git a/testing/web-platform/tests/mathml/presentation-markup/spaces/space-like-001.html b/testing/web-platform/tests/mathml/presentation-markup/spaces/space-like-001.html index 61375bcd8e320..62ad0f1278e29 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/spaces/space-like-001.html +++ b/testing/web-platform/tests/mathml/presentation-markup/spaces/space-like-001.html @@ -108,6 +108,18 @@ assert_approx_equals(spaceAfter("mpadded2"), 2 * emToPx, epsilon); }, "non-space-like mpadded"); + test(function() { + assert_true(MathMLFeatureDetection.has_operator_spacing()); + assert_approx_equals(spaceBefore("merror1"), emToPx, epsilon); + assert_approx_equals(spaceAfter("merror1"), emToPx, epsilon); + }, "space-like merror"); + + test(function() { + assert_true(MathMLFeatureDetection.has_operator_spacing()); + assert_approx_equals(spaceBefore("merror2"), 0, epsilon); + assert_approx_equals(spaceAfter("merror2"), 2 * emToPx, epsilon); + }, "non-space-like merror"); + done(); } @@ -253,5 +265,34 @@ X

+

+ + X + + + + X + + + X + + X + +

+

+ + X + + + + X + + + X + + X + +

diff --git a/testing/web-platform/tests/mathml/presentation-markup/spaces/space-like-002.html b/testing/web-platform/tests/mathml/presentation-markup/spaces/space-like-002.html index f5f4e5a84b248..b12c61b34ba03 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/spaces/space-like-002.html +++ b/testing/web-platform/tests/mathml/presentation-markup/spaces/space-like-002.html @@ -56,9 +56,9 @@ test(function() { assert_true(MathMLFeatureDetection.has_operator_spacing()); - assert_approx_equals(spaceBefore("maction2"), 0, epsilon); - assert_approx_equals(spaceAfter("maction2"), 2 * emToPx, epsilon); - }, "non-space like maction (no first child)"); + assert_approx_equals(spaceBefore("maction2"), emToPx, epsilon); + assert_approx_equals(spaceAfter("maction2"), emToPx, epsilon); + }, "space-like maction (no first child)"); test(function() { assert_approx_equals(spaceBefore("maction3"), 0, epsilon); @@ -74,9 +74,9 @@ test(function() { assert_true(MathMLFeatureDetection.has_operator_spacing()); - assert_approx_equals(spaceBefore("semantics2"), 0, epsilon); - assert_approx_equals(spaceAfter("semantics2"), 2 * emToPx, epsilon); - }, "non-space like semantics (no first child)"); + assert_approx_equals(spaceBefore("semantics2"), emToPx, epsilon); + assert_approx_equals(spaceAfter("semantics2"), emToPx, epsilon); + }, "space-like semantics (no first child)"); test(function() { assert_true(MathMLFeatureDetection.has_operator_spacing()); diff --git a/testing/web-platform/tests/mathml/presentation-markup/spaces/space-like-003.html b/testing/web-platform/tests/mathml/presentation-markup/spaces/space-like-003.html index 6d3d007744e7a..7398ebe2d5665 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/spaces/space-like-003.html +++ b/testing/web-platform/tests/mathml/presentation-markup/spaces/space-like-003.html @@ -60,18 +60,6 @@
-

- - X - - - X - - X - - X - -

X