empty-underover.html (1798B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Test Script and Limit Schemata</title> 6 <link rel="help" href="https://w3c.github.io/mathml-core/#script-and-limit-schemata"> 7 <meta name="assert" content="Script and Limit Schemata should not render anything when empty."> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="/mathml/support/feature-detection.js"></script> 11 <script src="/mathml/support/fonts.js"></script> 12 <script> 13 var epsilon = 1; 14 15 function getBox(aId) { 16 return document.getElementById(aId).getBoundingClientRect(); 17 } 18 19 setup({ explicit_done: true }); 20 window.addEventListener("load", () => { loadAllFonts().then(runTests); }); 21 22 function runTests() { 23 test(function() { 24 ["over", "under", "underover", "sub", "sup", "subsup", "multiscripts"].forEach(function(name) { 25 assert_true(MathMLFeatureDetection.has_mspace()); 26 assert_approx_equals(getBox(name).width, 0, epsilon, "width of empty " + name); 27 assert_approx_equals(getBox(name).height, 0, epsilon, "height of empty " + name); 28 }); 29 }, "Size of empty script elements"); 30 31 done(); 32 } 33 </script> 34 </head> 35 <body> 36 <div id="log"></div> 37 <p> 38 <math> 39 <munderover id="underover"> 40 </munderover> 41 </math> 42 <math> 43 <munder id="under"> 44 </munder> 45 </math> 46 <math> 47 <mover id="over"> 48 </mover> 49 </math> 50 <math> 51 <msub id="sub"> 52 </msub> 53 </math> 54 <math> 55 <msup id="sup"> 56 </msup> 57 </math> 58 <math> 59 <msubsup id="subsup"> 60 </msubsup> 61 </math> 62 <math> 63 <mmultiscripts id="multiscripts"> 64 </mmultiscripts> 65 </math> 66 </p> 67 </body> 68 </html>