mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-27 10:50:35 +00:00
dccb496ee8
See https://groups.google.com/forum/#!topic/mozilla.dev.platform/CAqw0Nxw6Pg Differential Revision: https://phabricator.services.mozilla.com/D48766 --HG-- extra : moz-landing-system : lando
64 lines
2.3 KiB
HTML
64 lines
2.3 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<!--
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=706406
|
|
-->
|
|
<head>
|
|
<title>Test for Bug 706406</title>
|
|
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
</head>
|
|
<body>
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=827713">Mozilla Bug 827713</a>
|
|
<p id="display"></p>
|
|
<p><math>
|
|
<msub subscriptshift="50px">
|
|
<mspace width="50px" height="25px" depth="25px" mathbackground="blue" id ="subbase"></mspace>
|
|
<mspace width="50px" height="25px" depth="25px" mathbackground="red" id="subsub"></mspace>
|
|
</msub>
|
|
</math></p>
|
|
|
|
<p><math>
|
|
<msup superscriptshift="50px">
|
|
<mspace width="50px" height="25px" depth="25px" mathbackground="blue" id="supbase"></mspace>
|
|
<mspace width="50px" height="25px" depth="25px" mathbackground="green" id="supsup"></mspace>
|
|
</msup>
|
|
</math></p>
|
|
|
|
<p><math>
|
|
<msubsup subscriptshift="50px" superscriptshift="50px">
|
|
<mspace width="50px" height="25px" depth="25px" mathbackground="blue" id="ssbase"></mspace>
|
|
<mspace width="50px" height="25px" depth="25px" mathbackground="red" id="sssub"></mspace>
|
|
<mspace width="50px" height="25px" depth="25px" mathbackground="green" id="sssup"></mspace>
|
|
</msubsup>
|
|
</math></p>
|
|
<pre id="test">
|
|
<script type="application/javascript">
|
|
/** Test for the scriptshift aspect of bug 827713 **/
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
if (SpecialPowers.getBoolPref('mathml.script_shift_attributes.disabled')) {
|
|
ok(true, "Script shifts disabled");
|
|
} else {
|
|
subBaseRect = $("subbase").getBoundingClientRect();
|
|
subSubRect = $("subsub").getBoundingClientRect();
|
|
is(subBaseRect.bottom, subSubRect.top, "Bad subscript shift for msub");
|
|
|
|
supBaseRect = $("supbase").getBoundingClientRect();
|
|
supSupRect = $("supsup").getBoundingClientRect();
|
|
is(supBaseRect.top, supSupRect.bottom, "Bad superscript shift for msup");
|
|
|
|
ssBaseRect = $("ssbase").getBoundingClientRect();
|
|
ssSubRect = $("sssub").getBoundingClientRect();
|
|
ssSupRect = $("sssup").getBoundingClientRect();
|
|
is(ssBaseRect.bottom, ssSubRect.top, "Bad subscript shift for msubusp");
|
|
is(ssBaseRect.top, ssSupRect.bottom, "Bad superscript shift for msubusp");
|
|
}
|
|
|
|
SimpleTest.finish();
|
|
|
|
</script>
|
|
</pre>
|
|
</body>
|
|
</html>
|