layout/mathml/tests/test_bug827713.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/mathml/tests/test_bug827713.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,61 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=706406
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug 706406</title>
    1.11 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.12 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.13 +</head>
    1.14 +<body>
    1.15 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=827713">Mozilla Bug 827713</a>
    1.16 +<p id="display"></p>
    1.17 +  <p><math>
    1.18 +    <msub subscriptshift="50px">
    1.19 +      <mspace width="50px" height="25px" depth="25px" mathbackground="blue" id ="subbase"></mspace>
    1.20 +      <mspace width="50px" height="25px" depth="25px" mathbackground="red" id="subsub"></mspace>
    1.21 +    </msub>
    1.22 +  </math></p>
    1.23 +
    1.24 +  <p><math>
    1.25 +    <msup superscriptshift="50px">
    1.26 +      <mspace width="50px" height="25px" depth="25px" mathbackground="blue" id="supbase"></mspace>
    1.27 +      <mspace width="50px" height="25px" depth="25px" mathbackground="green" id="supsup"></mspace>
    1.28 +    </msup>
    1.29 +  </math></p>
    1.30 +
    1.31 +  <p><math>
    1.32 +    <msubsup subscriptshift="50px" superscriptshift="50px">
    1.33 +      <mspace width="50px" height="25px" depth="25px" mathbackground="blue" id="ssbase"></mspace>
    1.34 +      <mspace width="50px" height="25px" depth="25px" mathbackground="red" id="sssub"></mspace>
    1.35 +      <mspace width="50px" height="25px" depth="25px" mathbackground="green" id="sssup"></mspace>
    1.36 +    </msubsup>
    1.37 +  </math></p>
    1.38 +<pre id="test">
    1.39 +<script type="application/javascript">
    1.40 +
    1.41 +    /** Test for the scriptshift aspect of bug 827713 **/
    1.42 +    SimpleTest.waitForExplicitFinish();
    1.43 +
    1.44 +    subBaseRect = $("subbase").getBoundingClientRect();
    1.45 +    subSubRect = $("subsub").getBoundingClientRect();
    1.46 +    is(subBaseRect.bottom, subSubRect.top, "Bad subscript shift for msub");
    1.47 +
    1.48 +    supBaseRect = $("supbase").getBoundingClientRect();
    1.49 +    supSupRect = $("supsup").getBoundingClientRect();
    1.50 +    is(supBaseRect.top, supSupRect.bottom, "Bad superscript shift for msup");
    1.51 +
    1.52 +    ssBaseRect = $("ssbase").getBoundingClientRect();
    1.53 +    ssSubRect = $("sssub").getBoundingClientRect();
    1.54 +    ssSupRect = $("sssup").getBoundingClientRect();
    1.55 +    is(ssBaseRect.bottom, ssSubRect.top, "Bad subscript shift for msubusp");
    1.56 +    is(ssBaseRect.top, ssSupRect.bottom, "Bad superscript shift for msubusp");
    1.57 +
    1.58 +
    1.59 +    SimpleTest.finish();
    1.60 +
    1.61 +</script>
    1.62 +</pre>
    1.63 +</body>
    1.64 +</html>

mercurial