stretchy-largeop-with-default-font-3.html (3908B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Stretchy/Largeop with default fonts</title> 5 <meta charset="utf-8"/> 6 <link rel="help" href="https://www.w3.org/TR/mathml-core/#layout-of-operators"> 7 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1092053"> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script type="text/javascript"> 11 function contentOf(aElement) { 12 return document.getElementById(aElement).textContent; 13 } 14 promise_test(() => { 15 return new Promise(resolve => { 16 window.addEventListener("load", resolve); 17 }).then(() => { 18 const numTests = 10; // zero indexed 19 const epsilon = 2; 20 for (let i = 0; i < numTests; i++) { 21 const operatorName = contentOf(`mo${i}`); 22 const box = document.getElementById(`mo${i}`).getBoundingClientRect(); 23 const ref = document.getElementById(`moRef${i}`).getBoundingClientRect(); 24 assert_approx_equals(box.width, ref.width, epsilon, `width of largeop '${operatorName}'`); 25 assert_approx_equals(box.height, ref.height, epsilon, `height of largeop '${operatorName}'`); 26 } 27 }); 28 }, "Test that non-stretchy largeops do not stretch."); 29 </script> 30 </head> 31 <body> 32 <p> 33 <math displaystyle="true"> 34 <mrow> 35 <mspace height="3em" /> 36 <mo id="mo0">⨀</mo> 37 </mrow> 38 </math> 39 </p> 40 <p> 41 <math displaystyle="true"> 42 <mrow> 43 <mspace height="3em" /> 44 <mo id="mo1">⨁</mo> 45 </mrow> 46 </math> 47 </p> 48 <p> 49 <math displaystyle="true"> 50 <mrow> 51 <mspace height="3em" /> 52 <mo id="mo2">⨃</mo> 53 </mrow> 54 </math> 55 </p> 56 <p> 57 <math displaystyle="true"> 58 <mrow> 59 <mspace height="3em" /> 60 <mo id="mo3">⨅</mo> 61 </mrow> 62 </math> 63 </p> 64 <p> 65 <math displaystyle="true"> 66 <mrow> 67 <mspace height="3em" /> 68 <mo id="mo4">⨇</mo> 69 </mrow> 70 </math> 71 </p> 72 <p> 73 <math displaystyle="true"> 74 <mrow> 75 <mspace height="3em" /> 76 <mo id="mo5">⨈</mo> 77 </mrow> 78 </math> 79 </p> 80 <p> 81 <math displaystyle="true"> 82 <mrow> 83 <mspace height="3em" /> 84 <mo id="mo6">⨉</mo> 85 </mrow> 86 </math> 87 </p> 88 <p> 89 <math displaystyle="true"> 90 <mrow> 91 <mspace height="3em" /> 92 <mo id="mo7">⨊</mo> 93 </mrow> 94 </math> 95 </p> 96 <p> 97 <math displaystyle="true"> 98 <mrow> 99 <mspace height="3em" /> 100 <mo id="mo8">⫼</mo> 101 </mrow> 102 </math> 103 </p> 104 <p> 105 <math displaystyle="true"> 106 <mrow> 107 <mspace height="3em" /> 108 <mo id="mo9">⫿</mo> 109 </mrow> 110 </math> 111 </p> 112 <p> 113 <math displaystyle="true"> 114 <mo id="moRef0">⨀</mo> 115 </math> 116 <math displaystyle="true"> 117 <mo id="moRef1">⨁</mo> 118 </math> 119 <math displaystyle="true"> 120 <mo id="moRef2">⨃</mo> 121 </math> 122 <math displaystyle="true"> 123 <mo id="moRef3">⨅</mo> 124 </math> 125 <math displaystyle="true"> 126 <mo id="moRef4">⨇</mo> 127 </math> 128 <math displaystyle="true"> 129 <mo id="moRef5">⨈</mo> 130 </math> 131 <math displaystyle="true"> 132 <mo id="moRef6">⨉</mo> 133 </math> 134 <math displaystyle="true"> 135 <mo id="moRef7">⨊</mo> 136 </math> 137 <math displaystyle="true"> 138 <mo id="moRef8">⫼</mo> 139 </math> 140 <math displaystyle="true"> 141 <mo id="moRef9">⫿</mo> 142 </math> 143 </p> 144 </body> 145 </html>