Skip to content

Commit

Permalink
Bug 1567156 [wpt PR 17908] - Update MathML tests for lengths now that…
Browse files Browse the repository at this point in the history
… some numbers are invalid in …, a=testonly

Automatic update from web-platform-tests
Update MathML tests for lengths now that some numbers are invalid in core.

Basically things like "7.em", "-7.em" or "5" are now invalid.

w3c/mathml#24
w3c/mathml#23

--

wpt-commits: a7bec3cae6324dfadbc93705eb8b119d550e094a
wpt-pr: 17908
  • Loading branch information
fred-wang authored and jgraham committed Jul 24, 2019
1 parent 521d873 commit 02db322
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
assert_equals(getBox("unitPercentage").width, 60, "%");
assert_equals(getBox("unitPt").width, 96, "pt");
assert_equals(getBox("unitPx").width, 123, "px");
assert_equals(getBox("unitNone").width, 150, "Unitless");
}, "Units");

test(function() {
Expand All @@ -57,14 +56,12 @@
assert_equals(getBox("spacePercentage").width, 60, "%");
assert_equals(getBox("spacePt").width, 96, "pt");
assert_equals(getBox("spacePx").width, 123, "px");
assert_equals(getBox("spaceNone").width, 150, "Unitless");
}, "Trimming of space");

test(function() {
assert_approx_equals(getBox("n0").width, 0, epsilon, "n0");
assert_approx_equals(getBox("n1").width, 90, epsilon, "n1");
assert_approx_equals(getBox("n2").width, 8, epsilon, "n2");
assert_approx_equals(getBox("n3").width, 70, epsilon, "n3");
assert_approx_equals(getBox("n4").width, 650, epsilon, "n4");
assert_approx_equals(getBox("n5").width, 4320, epsilon, "n5");
assert_approx_equals(getBox("n6").width, 1, epsilon, "n6");
Expand All @@ -79,7 +76,6 @@
assert_approx_equals(getBox("N0").top - topRef, -0, epsilon, "N0");
assert_approx_equals(topRef - getBox("N1").top, -90, epsilon, "N1");
assert_approx_equals(topRef - getBox("N2").top, -8, epsilon, "N2");
assert_approx_equals(topRef - getBox("N3").top, -70, epsilon, "N3");
assert_approx_equals(topRef - getBox("N4").top, -650, epsilon, "N4");
assert_approx_equals(topRef - getBox("N5").top, -4320, epsilon, "N5");
assert_approx_equals(topRef - getBox("N6").top, -1, epsilon, "N6");
Expand Down Expand Up @@ -113,6 +109,14 @@
});
}, "Legacy namedspaces");

test(function() {
// These values are invalid in MathML Core.
assert_equals(getBox("unitNone").width, 30, "Unitless");
assert_approx_equals(getBox("n3").width, 0, epsilon, "n3");
var topRef = getBox("ref").top;
assert_approx_equals(topRef - getBox("N3").top, 0, epsilon, "N3");
}, "Legacy numbers");

done();
}
</script>
Expand Down Expand Up @@ -144,7 +148,6 @@
<mstyle mathsize="200%"><mspace id="spacePercentage" width="&#x20;&#x9;&#xA;&#xD;&#x20;&#x9;&#xA;&#xD;3em&#x20;&#x9;&#xA;&#xD;&#x20;&#x9;&#xA;&#xD;"/></mstyle>
<mspace id="spacePt" width="&#x20;&#x9;&#xA;&#xD;&#x20;&#x9;&#xA;&#xD;72pt&#x20;&#x9;&#xA;&#xD;&#x20;&#x9;&#xA;&#xD;"/>
<mspace id="spacePx" width="&#x20;&#x9;&#xA;&#xD;&#x20;&#x9;&#xA;&#xD;123px&#x20;&#x9;&#xA;&#xD;&#x20;&#x9;&#xA;&#xD;"/>
<mstyle mathsize="5"><mspace id="spaceNone" width="&#x20;&#x9;&#xA;&#xD;&#x20;&#x9;&#xA;&#xD;3em&#x20;&#x9;&#xA;&#xD;&#x20;&#x9;&#xA;&#xD;"/></mstyle>
</math>
</p>
<p>
Expand Down

0 comments on commit 02db322

Please sign in to comment.