Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=706406
5 -->
6 <head>
7 <title>Test for Bug 706406</title>
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
10 </head>
11 <body>
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=827713">Mozilla Bug 827713</a>
13 <p id="display"></p>
14 <p><math>
15 <msub subscriptshift="50px">
16 <mspace width="50px" height="25px" depth="25px" mathbackground="blue" id ="subbase"></mspace>
17 <mspace width="50px" height="25px" depth="25px" mathbackground="red" id="subsub"></mspace>
18 </msub>
19 </math></p>
21 <p><math>
22 <msup superscriptshift="50px">
23 <mspace width="50px" height="25px" depth="25px" mathbackground="blue" id="supbase"></mspace>
24 <mspace width="50px" height="25px" depth="25px" mathbackground="green" id="supsup"></mspace>
25 </msup>
26 </math></p>
28 <p><math>
29 <msubsup subscriptshift="50px" superscriptshift="50px">
30 <mspace width="50px" height="25px" depth="25px" mathbackground="blue" id="ssbase"></mspace>
31 <mspace width="50px" height="25px" depth="25px" mathbackground="red" id="sssub"></mspace>
32 <mspace width="50px" height="25px" depth="25px" mathbackground="green" id="sssup"></mspace>
33 </msubsup>
34 </math></p>
35 <pre id="test">
36 <script type="application/javascript">
38 /** Test for the scriptshift aspect of bug 827713 **/
39 SimpleTest.waitForExplicitFinish();
41 subBaseRect = $("subbase").getBoundingClientRect();
42 subSubRect = $("subsub").getBoundingClientRect();
43 is(subBaseRect.bottom, subSubRect.top, "Bad subscript shift for msub");
45 supBaseRect = $("supbase").getBoundingClientRect();
46 supSupRect = $("supsup").getBoundingClientRect();
47 is(supBaseRect.top, supSupRect.bottom, "Bad superscript shift for msup");
49 ssBaseRect = $("ssbase").getBoundingClientRect();
50 ssSubRect = $("sssub").getBoundingClientRect();
51 ssSupRect = $("sssup").getBoundingClientRect();
52 is(ssBaseRect.bottom, ssSubRect.top, "Bad subscript shift for msubusp");
53 is(ssBaseRect.top, ssSupRect.bottom, "Bad superscript shift for msubusp");
56 SimpleTest.finish();
58 </script>
59 </pre>
60 </body>
61 </html>