Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9428916

Browse files
fred-wangnatechapin
authored andcommittedAug 23, 2019
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
1 parent 79aca86 commit 9428916

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed
 

‎mathml/relations/css-styling/lengths-2.html

+8-5
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
assert_equals(getBox("unitPercentage").width, 60, "%");
4545
assert_equals(getBox("unitPt").width, 96, "pt");
4646
assert_equals(getBox("unitPx").width, 123, "px");
47-
assert_equals(getBox("unitNone").width, 150, "Unitless");
4847
}, "Units");
4948

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

6361
test(function() {
6462
assert_approx_equals(getBox("n0").width, 0, epsilon, "n0");
6563
assert_approx_equals(getBox("n1").width, 90, epsilon, "n1");
6664
assert_approx_equals(getBox("n2").width, 8, epsilon, "n2");
67-
assert_approx_equals(getBox("n3").width, 70, epsilon, "n3");
6865
assert_approx_equals(getBox("n4").width, 650, epsilon, "n4");
6966
assert_approx_equals(getBox("n5").width, 4320, epsilon, "n5");
7067
assert_approx_equals(getBox("n6").width, 1, epsilon, "n6");
@@ -79,7 +76,6 @@
7976
assert_approx_equals(getBox("N0").top - topRef, -0, epsilon, "N0");
8077
assert_approx_equals(topRef - getBox("N1").top, -90, epsilon, "N1");
8178
assert_approx_equals(topRef - getBox("N2").top, -8, epsilon, "N2");
82-
assert_approx_equals(topRef - getBox("N3").top, -70, epsilon, "N3");
8379
assert_approx_equals(topRef - getBox("N4").top, -650, epsilon, "N4");
8480
assert_approx_equals(topRef - getBox("N5").top, -4320, epsilon, "N5");
8581
assert_approx_equals(topRef - getBox("N6").top, -1, epsilon, "N6");
@@ -113,6 +109,14 @@
113109
});
114110
}, "Legacy namedspaces");
115111

112+
test(function() {
113+
// These values are invalid in MathML Core.
114+
assert_equals(getBox("unitNone").width, 30, "Unitless");
115+
assert_approx_equals(getBox("n3").width, 0, epsilon, "n3");
116+
var topRef = getBox("ref").top;
117+
assert_approx_equals(topRef - getBox("N3").top, 0, epsilon, "N3");
118+
}, "Legacy numbers");
119+
116120
done();
117121
}
118122
</script>
@@ -144,7 +148,6 @@
144148
<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>
145149
<mspace id="spacePt" width="&#x20;&#x9;&#xA;&#xD;&#x20;&#x9;&#xA;&#xD;72pt&#x20;&#x9;&#xA;&#xD;&#x20;&#x9;&#xA;&#xD;"/>
146150
<mspace id="spacePx" width="&#x20;&#x9;&#xA;&#xD;&#x20;&#x9;&#xA;&#xD;123px&#x20;&#x9;&#xA;&#xD;&#x20;&#x9;&#xA;&#xD;"/>
147-
<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>
148151
</math>
149152
</p>
150153
<p>

0 commit comments

Comments
 (0)
Please sign in to comment.