|
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> |
|
20 |
|
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> |
|
27 |
|
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"> |
|
37 |
|
38 /** Test for the scriptshift aspect of bug 827713 **/ |
|
39 SimpleTest.waitForExplicitFinish(); |
|
40 |
|
41 subBaseRect = $("subbase").getBoundingClientRect(); |
|
42 subSubRect = $("subsub").getBoundingClientRect(); |
|
43 is(subBaseRect.bottom, subSubRect.top, "Bad subscript shift for msub"); |
|
44 |
|
45 supBaseRect = $("supbase").getBoundingClientRect(); |
|
46 supSupRect = $("supsup").getBoundingClientRect(); |
|
47 is(supBaseRect.top, supSupRect.bottom, "Bad superscript shift for msup"); |
|
48 |
|
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"); |
|
54 |
|
55 |
|
56 SimpleTest.finish(); |
|
57 |
|
58 </script> |
|
59 </pre> |
|
60 </body> |
|
61 </html> |