blob: e8d06744f1a52ee6a3dac7d964bb38e77d0f013b [file] [log] [blame]
<html>
<head>
<title>inferred mrows</title>
<meta charset="utf-8">
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script type="text/javascript">
setup({ "explicit_done": true });
function run()
{
var tags = ["Mrow", "Sqrt", "Style", "Error", "Phantom", "Math", "Menclose", "Mpadded"];
for (var i in tags) {
var tag = tags[i];
var x = document.getElementById("above" + tag).getBoundingClientRect();
var y = document.getElementById("below" + tag).getBoundingClientRect();
test(function() {
assert_equals(x.bottom, y.top);
}, "baseline alignment inside " + tag);
}
done();
}
</script>
</head>
<body onload="run()">
<p>This test passes if rectangles are correctly aligned with respect to the baseline.</p>
<p>
<math><mrow><mspace id="aboveMrow" width="10px" height="30px" mathbackground="red"></mspace><mspace id="belowMrow" width="10px" depth="30px" mathbackground="blue"></mspace></mrow></math>
<math><msqrt><mspace id="aboveSqrt" width="10px" height="30px" mathbackground="red"></mspace><mspace id="belowSqrt" width="10px" depth="30px" mathbackground="blue"></mspace></msqrt></math>
<math><mstyle><mspace id="aboveStyle" width="10px" height="30px" mathbackground="red"></mspace><mspace id="belowStyle" width="10px" depth="30px" mathbackground="blue"></mspace></mstyle></math>
<math><merror><mspace id="aboveError" width="10px" height="30px" mathbackground="red"></mspace><mspace id="belowError" width="10px" depth="30px" mathbackground="blue"></mspace></merror></math>
<math><mphantom><mspace style="visibility: visible;" id="abovePhantom" width="10px" height="30px" mathbackground="red"></mspace><mspace style="visibility: visible;" id="belowPhantom" width="10px" depth="30px" mathbackground="blue"></mspace></mphantom></math>
<math><mspace id="aboveMath" width="10px" height="30px" mathbackground="red"></mspace><mspace id="belowMath" width="10px" depth="30px" mathbackground="blue"></mspace></math>
<math><menclose notation="box"><mspace id="aboveMenclose" width="10px" height="30px" mathbackground="red"></mspace><mspace id="belowMenclose" width="10px" depth="30px" mathbackground="blue"></mspace></menclose></math>
<math><mpadded notation="box"><mspace id="aboveMpadded" width="10px" height="30px" mathbackground="red"></mspace><mspace id="belowMpadded" width="10px" depth="30px" mathbackground="blue"></mspace></mpadded></math>
</p>
</body>
</html>