stretchy-largeop-2.html 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <!DOCTYPE html>
  2. <!-- Test that non-stretchy largeops are bigger in display mode -->
  3. <html class="reftest-wait">
  4. <head>
  5. <title>Largeop stretching</title>
  6. <meta charset="utf-8"/>
  7. <script type="text/javascript">
  8. function verifyGreaterThan(aElement, aReference) {
  9. /* Verify that the height of the element is greater than that of the
  10. reference, and otherwise paint the element in red. */
  11. var element = document.getElementById(aElement);
  12. var ref = document.getElementById(aReference);
  13. if (element.getBoundingClientRect().height -
  14. ref.getBoundingClientRect().height <= 1) {
  15. element.setAttribute("mathcolor", "red");
  16. }
  17. }
  18. function doTest() {
  19. /* Ensure that largeops are bigger in displaystyle */
  20. var numTests = 10; // zero indexed
  21. var opPrefix = "mo";
  22. var refPrefix = "moRef";
  23. for (var i = 0; i < numTests; i++)
  24. {
  25. verifyGreaterThan(opPrefix + i, refPrefix + i);
  26. }
  27. document.documentElement.removeAttribute("class");
  28. }
  29. </script>
  30. </head>
  31. <body onload="doTest();">
  32. <p>
  33. <math displaystyle="true">
  34. <mo id="mo0">&bigodot;</mo>
  35. </math>
  36. </p>
  37. <p>
  38. <math displaystyle="true">
  39. <mo id="mo1">&bigoplus;</mo>
  40. </math>
  41. </p>
  42. <p>
  43. <math displaystyle="true">
  44. <mo id="mo2">&#x2a03;</mo>
  45. </math>
  46. </p>
  47. <p>
  48. <math displaystyle="true">
  49. <mo id="mo3">&#x2a05;</mo>
  50. </math>
  51. </p>
  52. <p>
  53. <math displaystyle="true">
  54. <mo id="mo4">&#x2a07;</mo>
  55. </math>
  56. </p>
  57. <p>
  58. <math displaystyle="true">
  59. <mo id="mo5">&#x2a08;</mo>
  60. </math>
  61. </p>
  62. <p>
  63. <math displaystyle="true">
  64. <mo id="mo6">&#x2a09;</mo>
  65. </math>
  66. </p>
  67. <p>
  68. <math displaystyle="true">
  69. <mo id="mo7">&#x2a0a;</mo>
  70. </math>
  71. </p>
  72. <p>
  73. <math displaystyle="true">
  74. <mo id="mo8">&#x2afc;</mo>
  75. </math>
  76. </p>
  77. <p>
  78. <math displaystyle="true">
  79. <mo id="mo9">&#x2aff;</mo>
  80. </math>
  81. </p>
  82. <p>
  83. <math>
  84. <mo id="moRef0">&bigodot;</mo>
  85. </math>
  86. </p>
  87. <p>
  88. <math>
  89. <mo id="moRef1">&bigoplus;</mo>
  90. </math>
  91. </p>
  92. <p>
  93. <math>
  94. <mo id="moRef2">&#x2a03;</mo>
  95. </math>
  96. </p>
  97. <p>
  98. <math>
  99. <mo id="moRef3">&#x2a05;</mo>
  100. </math>
  101. </p>
  102. <p>
  103. <math>
  104. <mo id="moRef4">&#x2a07;</mo>
  105. </math>
  106. </p>
  107. <p>
  108. <math>
  109. <mo id="moRef5">&#x2a08;</mo>
  110. </math>
  111. </p>
  112. <p>
  113. <math>
  114. <mo id="moRef6">&#x2a09;</mo>
  115. </math>
  116. </p>
  117. <p>
  118. <math>
  119. <mo id="moRef7">&#x2a0a;</mo>
  120. </math>
  121. </p>
  122. <p>
  123. <math>
  124. <mo id="moRef8">&#x2afc;</mo>
  125. </math>
  126. </p>
  127. <p>
  128. <math>
  129. <mo id="moRef9">&#x2aff;</mo>
  130. </math>
  131. </p>
  132. </body>
  133. </html>