Skip to content

Commit 6f432c6

Browse files
committed
Add test for mathjax/MathJax#1187
1 parent 53ac18b commit 6f432c6

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed
+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<!DOCTYPE html>
2+
<html class="reftest-wait">
3+
<head>
4+
<title>Issue 1186</title>
5+
<!-- Copyright (c) 2016 MathJax Consortium
6+
License: Apache License 2.0 -->
7+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
8+
<script type="text/javascript" src="../header.js"></script>
9+
<script type="text/javascript" src="../scriptTests.js"></script>
10+
11+
<script>
12+
function getTestCases() {
13+
var h1 = document.getElementById("minus-up").offsetHeight;
14+
var h2 = document.getElementById("plus-up").offsetHeight;
15+
var h3 = document.getElementById("minus-down").offsetHeight;
16+
var h4 = document.getElementById("plus-down").offsetHeight;
17+
return [
18+
newScriptReftestResult('Minus matches plus height ('+h1+','+h2+') ', Math.abs(h1-h2) < 2),
19+
newScriptReftestResult('Minus matches plus depth ('+h3+','+h4+') ', Math.abs(h3-h4) < 2)
20+
];
21+
}
22+
</script>
23+
24+
</head>
25+
26+
<body>
27+
28+
<!-- Height and depth of minus shoudl match plus
29+
https://github.com/mathjax/MathJax/issues/1187 -->
30+
31+
<span id="minus-up" style="display:inline-block">
32+
<math>
33+
<mpadded height="+1em" voffset="1em">
34+
<mstyle style="border:1px solid red">
35+
<mo>&#x2212;</mo>
36+
</mstyle>
37+
</mpadded>
38+
</math>
39+
</span>
40+
<span id="plus-up" style="display:inline-block">
41+
<math>
42+
<mpadded height="+1em" voffset="1em">
43+
<mstyle style="border:1px solid red">
44+
<mo>+</mo>
45+
</mstyle>
46+
</mpadded>
47+
</math>
48+
</span>
49+
50+
<span id="minus-down" style="display:inline-block">
51+
<math>
52+
<mpadded depth="+1em" voffset="-1em">
53+
<mstyle style="border:1px solid red">
54+
<mo>&#x2212;</mo>
55+
</mstyle>
56+
</mpadded>
57+
</math>
58+
</span>
59+
<span id="plus-down" style="display:inline-block">
60+
<math>
61+
<mpadded depth="+1em" voffset="-1em">
62+
<mstyle style="border:1px solid red">
63+
<mo>+</mo>
64+
</mstyle>
65+
</mpadded>
66+
</math>
67+
</span>
68+
<br/>
69+
70+
</body>
71+
</html>

testsuite/MathMLToDisplay/reftest.list

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ require(HTML-CSS) script issue1158.html
4949
require(HTML-CSS) script issue1163.html
5050
require(HTML-CSS) script issue1179.html
5151
require(SVG) == issue1176.html issue1176-ref.html
52+
script issue1187.html
5253
require(!NativeMML) == issue1231.html issue1231-ref.html
5354
require(SVG) script issue1233.html
5455
script issue1278.html

0 commit comments

Comments
 (0)