Skip to content

Commit 44eb0ac

Browse files
committed
Add reftest for namedspace.
1 parent 8789c52 commit 44eb0ac

File tree

4 files changed

+147
-11
lines changed

4 files changed

+147
-11
lines changed

mathml/relations/css-styling/lengths-1-ref.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html class="reftest-wait">
2+
<html>
33
<head>
44
<meta charset="utf-8"/>
55
<title>MathML lengths</title>

mathml/relations/css-styling/lengths-1.html

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html class="reftest-wait">
2+
<html>
33
<head>
44
<meta charset="utf-8"/>
55
<title>MathML lengths</title>
@@ -13,7 +13,7 @@
1313
}
1414
span, math {
1515
font-family: TestFont;
16-
font-size: 100px; /* 1em = 100px, 1ex is about 50px */
16+
font-size: 10px; /* 1em = 10px, 1ex is about 5px */
1717
}
1818
span {
1919
position: absolute;
@@ -41,12 +41,12 @@
4141
<span style="top: 30px; width: 192px"></span>
4242

4343
<!-- em -->
44-
<span style="top: 40px"><math><mspace width="2em"/></math></span>
44+
<span style="top: 40px"><math><mspace width="20em"/></math></span>
4545
<span style="top: 50px; width: 200px"></span>
4646

4747
<!-- ex -->
48-
<span style="top: 60px"><math><mspace width="3ex"/></math></span>
49-
<span style="top: 70px; width: 3ex"></span>
48+
<span style="top: 60px"><math><mspace width="30ex"/></math></span>
49+
<span style="top: 70px; width: 30ex"></span>
5050

5151
<!-- in -->
5252
<span style="top: 80px"><math><mspace width="2in"/></math></span>
@@ -83,12 +83,12 @@
8383
<span style="top: 20px; width: 192px"></span>
8484

8585
<!-- em -->
86-
<span title="em" style="top: 50px"><math><mspace width="2em"/></math></span>
86+
<span title="em" style="top: 50px"><math><mspace width="20em"/></math></span>
8787
<span title="em" style="top: 40px; width: 200px"></span>
8888

8989
<!-- ex -->
90-
<span title="ex" style="top: 70px"><math><mspace width="3ex"/></math></span>
91-
<span title="ex" style="top: 60px; width: 3ex"></span>
90+
<span title="ex" style="top: 70px"><math><mspace width="30ex"/></math></span>
91+
<span title="ex" style="top: 60px; width: 30ex"></span>
9292

9393
<!-- in -->
9494
<span style="top: 90px"><math><mspace width="2in"/></math></span>
@@ -107,11 +107,11 @@
107107
<span style="top: 140px; width: 200px"></span>
108108

109109
<!-- % -->
110-
<span style="top: 170px"><math><mstyle mathsize="200%"><mspace width="1em"/></mstyle></math></span>
110+
<span style="top: 170px"><math><mstyle mathsize="2000%"><mspace width="1em"/></mstyle></math></span>
111111
<span style="top: 160px; width: 200px"></span>
112112

113113
<!-- unitless -->
114-
<span style="top: 190px"><math><mstyle mathsize="2.0"><mspace width="1em"/></mstyle></math></span>
114+
<span style="top: 190px"><math><mstyle mathsize="20.0"><mspace width="1em"/></mstyle></math></span>
115115
<span style="top: 180px; width: 200px"></span>
116116
</div>
117117
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8"/>
5+
<title>MathML lengths (reference)</title>
6+
</head>
7+
<body>
8+
<p>Test passes if there is a green square and no red.</p>
9+
<div>
10+
<div id="red" style="position: absolute; width: 200px; height: 200px; background: green;">
11+
</div>
12+
</div>
13+
</body>
14+
</html>
+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8"/>
5+
<title>MathML lengths</title>
6+
<link rel="help" href="http://www.mathml-association.org/MathMLinHTML5/S2.html#SS3.SSS1"/>
7+
<link rel="match" href="lengths-1-ref.html"/>
8+
<meta name="assert" content="Verify whether the different namedspaces are accepted for MathML lengths.">
9+
<style>
10+
@font-face {
11+
font-family: TestFont;
12+
src: url("/fonts/math/xheight500.woff");
13+
}
14+
mpadded {
15+
font-family: TestFont;
16+
font-size: 200px; /* 1em = 200px */
17+
}
18+
div {
19+
position: absolute;
20+
}
21+
#red mspace {
22+
background: red;
23+
}
24+
#green mspace {
25+
background: green;
26+
}
27+
</style>
28+
</head>
29+
<body>
30+
<p>Test passes if there is a green square and no red.</p>
31+
<div>
32+
<div id="red" style="position: absolute; width: 200px; height: 200px; background: green;">
33+
<!-- veryverythinmathspace -->
34+
<div style="left: 0px;"><math><mpadded height="100px" depth="100px" voffset="veryverythinmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
35+
<div style="left: 10px;"><math><mpadded height="100px" depth="100px" voffset="0.05555555555555556em"><mspace width="10px" height="10px"/></mpadded></math></div>
36+
<!-- verythinmathspace -->
37+
<div style="left: 20px;"><math><mpadded height="100px" depth="100px" voffset="verythinmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
38+
<div style="left: 30px;"><math><mpadded height="100px" depth="100px" voffset="0.1111111111111111em"><mspace width="10px" height="10px"/></mpadded></math></div>
39+
<!-- thinmathspace -->
40+
<div style="left: 40px;"><math><mpadded height="100px" depth="100px" voffset="thinmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
41+
<div style="left: 50px;"><math><mpadded height="100px" depth="100px" voffset="0.1666666666666667em"><mspace width="10px" height="10px"/></mpadded></math></div>
42+
<!-- mediummathspace -->
43+
<div style="left: 60px;"><math><mpadded height="100px" depth="100px" voffset="mediummathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
44+
<div style="left: 70px;"><math><mpadded height="100px" depth="100px" voffset="0.2222222222222222em"><mspace width="10px" height="10px"/></mpadded></math></div>
45+
<!-- thickmathspace -->
46+
<div style="left: 80px;"><math><mpadded height="100px" depth="100px" voffset="thickmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
47+
<div style="left: 90px;"><math><mpadded height="100px" depth="100px" voffset="0.2777777777777778em"><mspace width="10px" height="10px"/></mpadded></math></div>
48+
<!-- verythickmathspace -->
49+
<div style="left: 100px;"><math><mpadded height="100px" depth="100px" voffset="verythickmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
50+
<div style="left: 110px;"><math><mpadded height="100px" depth="100px" voffset="0.3333333333333333em"><mspace width="10px" height="10px"/></mpadded></math></div>
51+
<!-- veryverythickmathspace -->
52+
<div style="left: 120px;"><math><mpadded height="100px" depth="100px" voffset="veryverythickmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
53+
<div style="left: 130px;"><math><mpadded height="100px" depth="100px" voffset="0.3888888888888889em"><mspace width="10px" height="10px"/></mpadded></math></div>
54+
<!-- negativeveryverythinmathspace -->
55+
<div style="left: 0px;"><math><mpadded height="100px" depth="100px" voffset="negativeveryverythinmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
56+
<div style="left: 10px;"><math><mpadded height="100px" depth="100px" voffset="-0.05555555555555556em"><mspace width="10px" height="10px"/></mpadded></math></div>
57+
<!-- negativeverythinmathspace -->
58+
<div style="left: 20px;"><math><mpadded height="100px" depth="100px" voffset="negativeverythinmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
59+
<div style="left: 30px;"><math><mpadded height="100px" depth="100px" voffset="-0.1111111111111111em"><mspace width="10px" height="10px"/></mpadded></math></div>
60+
<!-- negativethinmathspace -->
61+
<div style="left: 40px;"><math><mpadded height="100px" depth="100px" voffset="negativethinmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
62+
<div style="left: 50px;"><math><mpadded height="100px" depth="100px" voffset="-0.1666666666666667em"><mspace width="10px" height="10px"/></mpadded></math></div>
63+
<!-- negativemediummathspace -->
64+
<div style="left: 60px;"><math><mpadded height="100px" depth="100px" voffset="negativemediummathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
65+
<div style="left: 70px;"><math><mpadded height="100px" depth="100px" voffset="-0.2222222222222222em"><mspace width="10px" height="10px"/></mpadded></math></div>
66+
<!-- negativethickmathspace -->
67+
<div style="left: 80px;"><math><mpadded height="100px" depth="100px" voffset="negativethickmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
68+
<div style="left: 90px;"><math><mpadded height="100px" depth="100px" voffset="-0.2777777777777778em"><mspace width="10px" height="10px"/></mpadded></math></div>
69+
<!-- negativeverythickmathspace -->
70+
<div style="left: 100px;"><math><mpadded height="100px" depth="100px" voffset="negativeverythickmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
71+
<div style="left: 110px;"><math><mpadded height="100px" depth="100px" voffset="-0.3333333333333333em"><mspace width="10px" height="10px"/></mpadded></math></div>
72+
<!-- negativeveryverythickmathspace -->
73+
<div style="left: 120px;"><math><mpadded height="100px" depth="100px" voffset="negativeveryverythickmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
74+
<div style="left: 130px;"><math><mpadded height="100px" depth="100px" voffset="-0.3888888888888889em"><mspace width="10px" height="10px"/></mpadded></math></div>
75+
</div>
76+
<div id="green" style="position: absolute; width: 200px; height: 200px;">
77+
<!-- veryverythinmathspace -->
78+
<div style="left: 10px;"><math><mpadded height="100px" depth="100px" voffset="veryverythinmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
79+
<div style="left: 0px;"><math><mpadded height="100px" depth="100px" voffset="0.05555555555555556em"><mspace width="10px" height="10px"/></mpadded></math></div>
80+
<!-- verythinmathspace -->
81+
<div style="left: 30px;"><math><mpadded height="100px" depth="100px" voffset="verythinmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
82+
<div style="left: 20px;"><math><mpadded height="100px" depth="100px" voffset="0.1111111111111111em"><mspace width="10px" height="10px"/></mpadded></math></div>
83+
<!-- thinmathspace -->
84+
<div style="left: 50px;"><math><mpadded height="100px" depth="100px" voffset="thinmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
85+
<div style="left: 40px;"><math><mpadded height="100px" depth="100px" voffset="0.1666666666666667em"><mspace width="10px" height="10px"/></mpadded></math></div>
86+
<!-- mediummathspace -->
87+
<div style="left: 70px;"><math><mpadded height="100px" depth="100px" voffset="mediummathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
88+
<div style="left: 60px;"><math><mpadded height="100px" depth="100px" voffset="0.2222222222222222em"><mspace width="10px" height="10px"/></mpadded></math></div>
89+
<!-- thickmathspace -->
90+
<div style="left: 90px;"><math><mpadded height="100px" depth="100px" voffset="thickmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
91+
<div style="left: 80px;"><math><mpadded height="100px" depth="100px" voffset="0.2777777777777778em"><mspace width="10px" height="10px"/></mpadded></math></div>
92+
<!-- verythickmathspace -->
93+
<div style="left: 110px;"><math><mpadded height="100px" depth="100px" voffset="verythickmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
94+
<div style="left: 100px;"><math><mpadded height="100px" depth="100px" voffset="0.3333333333333333em"><mspace width="10px" height="10px"/></mpadded></math></div>
95+
<!-- veryverythickmathspace -->
96+
<div style="left: 130px;"><math><mpadded height="100px" depth="100px" voffset="veryverythickmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
97+
<div style="left: 120px;"><math><mpadded height="100px" depth="100px" voffset="0.3888888888888889em"><mspace width="10px" height="10px"/></mpadded></math></div>
98+
<!-- negativeveryverythinmathspace -->
99+
<div style="left: 10px;"><math><mpadded height="100px" depth="100px" voffset="negativeveryverythinmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
100+
<div style="left: 0px;"><math><mpadded height="100px" depth="100px" voffset="-0.05555555555555556em"><mspace width="10px" height="10px"/></mpadded></math></div>
101+
<!-- negativeverythinmathspace -->
102+
<div style="left: 30px;"><math><mpadded height="100px" depth="100px" voffset="negativeverythinmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
103+
<div style="left: 20px;"><math><mpadded height="100px" depth="100px" voffset="-0.1111111111111111em"><mspace width="10px" height="10px"/></mpadded></math></div>
104+
<!-- negativethinmathspace -->
105+
<div style="left: 50px;"><math><mpadded height="100px" depth="100px" voffset="negativethinmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
106+
<div style="left: 40px;"><math><mpadded height="100px" depth="100px" voffset="-0.1666666666666667em"><mspace width="10px" height="10px"/></mpadded></math></div>
107+
<!-- negativemediummathspace -->
108+
<div style="left: 70px;"><math><mpadded height="100px" depth="100px" voffset="negativemediummathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
109+
<div style="left: 60px;"><math><mpadded height="100px" depth="100px" voffset="-0.2222222222222222em"><mspace width="10px" height="10px"/></mpadded></math></div>
110+
<!-- negativethickmathspace -->
111+
<div style="left: 90px;"><math><mpadded height="100px" depth="100px" voffset="negativethickmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
112+
<div style="left: 80px;"><math><mpadded height="100px" depth="100px" voffset="-0.2777777777777778em"><mspace width="10px" height="10px"/></mpadded></math></div>
113+
<!-- negativeverythickmathspace -->
114+
<div style="left: 110px;"><math><mpadded height="100px" depth="100px" voffset="negativeverythickmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
115+
<div style="left: 100px;"><math><mpadded height="100px" depth="100px" voffset="-0.3333333333333333em"><mspace width="10px" height="10px"/></mpadded></math></div>
116+
<!-- negativeveryverythickmathspace -->
117+
<div style="left: 130px;"><math><mpadded height="100px" depth="100px" voffset="negativeveryverythickmathspace"><mspace width="10px" height="10px"/></mpadded></math></div>
118+
<div style="left: 120px;"><math><mpadded height="100px" depth="100px" voffset="-0.3888888888888889em"><mspace width="10px" height="10px"/></mpadded></math></div>
119+
</div>
120+
</div>
121+
</body>
122+
</html>

0 commit comments

Comments
 (0)