mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision bc60e6f82132cfc9a5b688c566c7772024b3c15c
This commit is contained in:
parent
449881f566
commit
29156ca9e2
223 changed files with 7517 additions and 2093 deletions
|
@ -7,6 +7,7 @@
|
|||
<meta name="assert" content="Basic metrics for elements msub, msup and msubsup.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<style>
|
||||
math, mspace {
|
||||
font-size: 10px;
|
||||
|
@ -28,6 +29,8 @@
|
|||
|
||||
function runTests() {
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 1;
|
||||
assert_less_than_equal(getBox("msubBase").right, getBox("msubSub").left, e, "msub: subscript is after base");
|
||||
assert_less_than_equal(getBox("msupBase").right, getBox("msupSup").left, e, "msup: superscript is after base");
|
||||
|
@ -43,6 +46,8 @@
|
|||
}, "Respective horizontal positions");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 1;
|
||||
assert_approx_equals(getBox("msubBase").middle, getBox("baseline").bottom, e, "msub: base is placed on the baseline");
|
||||
assert_approx_equals(getBox("msupBase").middle, getBox("baseline").bottom, e, "msup: base is placed on the baseline");
|
||||
|
@ -50,6 +55,8 @@
|
|||
}, "Alignment of the base on the baseline");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 3;
|
||||
assert_approx_equals(getBox("msubSub").middle, getBox("msubBase").bottom, e, "msub: script is placed at the bottom of the base");
|
||||
assert_approx_equals(getBox("msupSup").middle, getBox("msupBase").top, e, "msup: script is placed at the top of the base");
|
||||
|
@ -58,6 +65,8 @@
|
|||
}, "Vertical position of scripts");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 3;
|
||||
assert_approx_equals(getBox("msub").width, getBox("msubSub").right - getBox("msubBase").left, e, "msub: width is determined by the left/right sides of base/script (+ some space after script)");
|
||||
assert_approx_equals(getBox("msup").width, getBox("msupSup").right - getBox("msupBase").left, e, "msup: width is determined by the left/right sides of base/script (+ some space after script)");
|
||||
|
@ -65,6 +74,8 @@
|
|||
}, "Width of scripted elements");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 1;
|
||||
assert_greater_than_equal(getBox("msub").height, getBox("msubBase").height, e, "msub: height is at least the one of the base");
|
||||
assert_greater_than_equal(getBox("msup").height, getBox("msupBase").height, e, "msup: height is at least the one of the base");
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta name="assert" content="Basic metrics for the mmultiscript element.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<style>
|
||||
math, mspace {
|
||||
font-size: 10px;
|
||||
|
@ -28,6 +29,8 @@
|
|||
|
||||
function runTests() {
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 1;
|
||||
assert_less_than_equal(getBox("msubBase").right, getBox("msubSub").left, e, "subscript is after base");
|
||||
assert_less_than_equal(getBox("msupBase").right, getBox("msupSup").left, e, "superscript is after base");
|
||||
|
@ -54,6 +57,8 @@
|
|||
}, "Respective horizontal positions");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 1;
|
||||
assert_approx_equals(getBox("msubBase").middle, getBox("baseline").bottom, e, "base is placed on the baseline");
|
||||
assert_approx_equals(getBox("msupBase").middle, getBox("baseline").bottom, e, "base is placed on the baseline");
|
||||
|
@ -64,6 +69,8 @@
|
|||
}, "Alignment of the base on the baseline");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 3;
|
||||
assert_approx_equals(getBox("msubSub").middle, getBox("msubBase").bottom, e, "script is placed at the bottom of the base");
|
||||
assert_approx_equals(getBox("msupSup").middle, getBox("msupBase").top, e, "script is placed at the top of the base");
|
||||
|
@ -77,6 +84,8 @@
|
|||
}, "Vertical position of scripts");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 3;
|
||||
assert_approx_equals(getBox("msub").width, getBox("msubSub").right - getBox("msubBase").left, e, "width is determined by the left/right sides of base/script (+ some space after script)");
|
||||
assert_approx_equals(getBox("msup").width, getBox("msupSup").right - getBox("msupBase").left, e, "width is determined by the left/right sides of base/script (+ some space after script)");
|
||||
|
@ -88,6 +97,8 @@
|
|||
}, "Width of scripted elements");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 1;
|
||||
assert_greater_than_equal(getBox("msub").height, getBox("msubBase").height, e, "height is at least the one of the base");
|
||||
assert_greater_than_equal(getBox("msup").height, getBox("msupBase").height, e, "height is at least the one of the base");
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta name="assert" content="Basic metrics for the mmultiscript element with many scripts.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<style>
|
||||
math, mspace {
|
||||
font-size: 10px;
|
||||
|
@ -28,12 +29,16 @@
|
|||
|
||||
function runTests() {
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 1;
|
||||
for (var i = 0; i < 5; i++)
|
||||
assert_approx_equals(getBox("multi" + i + "base").middle, getBox("baseline").bottom, e, "base " + i + "is placed on the baseline");
|
||||
}, "Alignment of the base on the baseline");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 5;
|
||||
assert_approx_equals(getBox("multi0").width, 30, e, "width of multi0");
|
||||
assert_approx_equals(getBox("multi0").height, 30, e, "height of multi0");
|
||||
|
@ -49,6 +54,8 @@
|
|||
}, "Dimensions of the scripted elements");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 3;
|
||||
for (var i = 2; i <= 4; i++) {
|
||||
var base = getBox("multi" + i + "base");
|
||||
|
@ -66,6 +73,8 @@
|
|||
}, "Vertical positions of scripts");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 1;
|
||||
for (var i = 2; i <= 4; i++) {
|
||||
var base = getBox("multi" + i + "base");
|
||||
|
@ -81,6 +90,8 @@
|
|||
}, "Horizontal alignment of scripts");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
for (var i = 2; i <= 4; i++) {
|
||||
var base = getBox("multi" + i + "base");
|
||||
var firstPostScript = getBox("multi" + i + "postsub1");
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta name="assert" content="Verify metrics of scripted elements for bases of different heights.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<style>
|
||||
math, mspace {
|
||||
font-size: 10px;
|
||||
|
@ -30,6 +31,8 @@
|
|||
|
||||
function runTests() {
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 1;
|
||||
sizeArray.forEach(function(size) {
|
||||
assert_approx_equals(getBox("msub" + size + "base").middle, getBox("baseline").bottom, e, "msub base " + size + "is placed on the baseline");
|
||||
|
@ -40,6 +43,8 @@
|
|||
}, "Alignment on the baseline for bases of different heights");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 5;
|
||||
sizeArray.forEach(function(size) {
|
||||
assert_approx_equals(getBox("msub" + size + "sub").middle, getBox("msub" + size + "base").bottom, e, "msub script " + size + "is placed at the top of of the base");
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta name="assert" content="Verify metrics of scripted elements with tall scripts.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<style>
|
||||
math, mspace {
|
||||
font-size: 10px;
|
||||
|
@ -30,6 +31,8 @@
|
|||
|
||||
function runTests() {
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 1;
|
||||
assert_approx_equals(getBox("msubbase").middle, getBox("baseline").bottom, e, "msub base is placed on the baseline");
|
||||
assert_approx_equals(getBox("msupbase").middle, getBox("baseline").bottom, e, "msup base is placed on the baseline");
|
||||
|
@ -38,6 +41,8 @@
|
|||
}, "Alignment on the baseline with different and large script heights");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
assert_greater_than(getBox("msubsub").top, getBox("msubbase").top, "msub: subscript is below the top of the base");
|
||||
assert_less_than(getBox("msupsup").bottom, getBox("msupbase").bottom, "msup: supscript is above the bottom of the base");
|
||||
assert_greater_than(getBox("msubsupsub").top, getBox("msubsupbase").top, "msubsup: subscript is below the top of the base");
|
||||
|
@ -49,6 +54,8 @@
|
|||
}, "Tall subscripts/superscripts are not placed too high/low");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
assert_greater_than(getBox("msubsupsub").top, getBox("msubsupsup").bottom, "msubsup: subscript is below the superscript");
|
||||
assert_greater_than(getBox("multipresub").top, getBox("multipresup").bottom, "mmultiscripts: presubscript is below the presuperscript");
|
||||
assert_greater_than(getBox("multipostsub").top, getBox("multipostsup").bottom, "mmultiscripts: postsubscript is below the postsuperscript");
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta name="assert" content="Elements msub, msup, subsup and msubsup correctly use the subscript and superscript parameters from the MATH table.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<style>
|
||||
math, mspace {
|
||||
font-size: 10px;
|
||||
|
@ -68,6 +69,8 @@
|
|||
|
||||
function runTests() {
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 3000 * emToPx;
|
||||
assert_approx_equals(getBox("ref001").left - getBox("sub001").right, v, epsilon, "msub: Space after subscript");
|
||||
assert_approx_equals(getBox("ref002").left - getBox("sup002").right, v, epsilon, "msup: Space after superscript");
|
||||
|
@ -78,6 +81,8 @@
|
|||
}, "SpaceAfterScript");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 7000 * emToPx;
|
||||
assert_approx_equals(getBox("ref101").bottom - getBox("sup102").bottom, v, epsilon, "msup: Superscript shift");
|
||||
assert_approx_equals(getBox("ref101").bottom - getBox("sup103").bottom, v, epsilon, "msubsup: Superscript shift");
|
||||
|
@ -87,6 +92,8 @@
|
|||
}, "SuperscriptShiftUp");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 5000 * emToPx;
|
||||
assert_approx_equals(getBox("ref201").bottom - getBox("sup202").bottom, v, epsilon, "msup: Superscript shift");
|
||||
assert_approx_equals(getBox("ref201").bottom - getBox("sup203").bottom, v, epsilon, "msubsup: Superscript shift");
|
||||
|
@ -96,6 +103,8 @@
|
|||
}, "SuperscriptShiftUpCramped");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 6000 * emToPx;
|
||||
assert_approx_equals(getBox("sub301").bottom - getBox("ref300").bottom, v, epsilon, "msup: Subscript shift");
|
||||
assert_approx_equals(getBox("sub302").bottom - getBox("ref300").bottom, v, epsilon, "msubsup: Subscript shift");
|
||||
|
@ -104,12 +113,16 @@
|
|||
}, "SubscriptShiftDown");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 11000 * emToPx;
|
||||
assert_approx_equals(getBox("sub4011").top - getBox("sup4012").bottom, v, epsilon, "msubsup: SubSuperscript gap");
|
||||
assert_approx_equals(getBox("sub4021").top - getBox("sup4022").bottom, v, epsilon, "mmultiscripts: SubSuperscript gap");
|
||||
}, "SubSuperscriptGapMin");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v1 = 11000 * emToPx;
|
||||
var v2 = 3000 * emToPx;
|
||||
assert_approx_equals(getBox("sub501").top - getBox("sup501").bottom, v1, epsilon, "msubsup: SubSuperscript gap");
|
||||
|
@ -119,21 +132,29 @@
|
|||
}, "SuperscriptBottomMaxWithSubscript");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 4000 * emToPx;
|
||||
assert_approx_equals(getBox("ref600").bottom - getBox("sub601").top, v, epsilon, "msub: Subscript top");
|
||||
}, "SubscriptTopMax");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 8000 * emToPx;
|
||||
assert_approx_equals(getBox("ref700").bottom - getBox("sub701").bottom, v, epsilon, "msub: Superscript bottom");
|
||||
}, "SuperscriptBottomMin");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 9000 * emToPx;
|
||||
assert_approx_equals(getBox("sub801").bottom - getBox("base801").bottom, v, epsilon, "msub: Superscript drop");
|
||||
}, "SubscriptBaselineDrop");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 10000 * emToPx;
|
||||
assert_approx_equals(getBox("sup901").bottom - getBox("base901").top, v, epsilon, "msup: Superscript drop");
|
||||
}, "SuperscriptBaselineDrop");
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta name="assert" content="Elements msub, msup, subsup and msubsup correctly use the italic correction from the MATH table.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<style>
|
||||
math, mspace {
|
||||
font-size: 10px;
|
||||
|
@ -42,6 +43,8 @@
|
|||
var epsilon = 1;
|
||||
function runTests() {
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 0;
|
||||
assert_approx_equals(getBox("base001").right - getBox("sub001").left, v, epsilon, "msub");
|
||||
assert_approx_equals(getBox("sup002").left, getBox("base002").right, epsilon, "msup");
|
||||
|
@ -50,6 +53,8 @@
|
|||
assert_approx_equals(getBox("sup005").left - getBox("sub005").left, 0, epsilon, "mmultiscripts prescripts");
|
||||
}, "Null Italic Correction");
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var emToPx = 10 / 1000; // font-size: 10px, font.em = 1000
|
||||
var v = 3000 * emToPx;
|
||||
assert_approx_equals(getBox("base011").right - getBox("sub011").left, v, epsilon, "msub");
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta name="assert" content="Elements munder, mover, munderover correctly .">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<style>
|
||||
math, mspace, mo {
|
||||
font-size: 10px;
|
||||
|
@ -29,6 +30,8 @@
|
|||
|
||||
function runTests() {
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 1;
|
||||
for (var i = 0; i <= 3; i++) {
|
||||
assert_approx_equals(getBox("under" + i + "base").middle, getBox("baseline").bottom, e, "munder " + i + ": base is placed on the baseline");
|
||||
|
@ -40,6 +43,8 @@
|
|||
}, "Alignment of the base on the baseline");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 1;
|
||||
for (var i = 0; i <= 3; i++) {
|
||||
assert_approx_equals(getBox("under" + i + "under").center, getBox("under" + i + "base").center, e, "munder " + i + ": base and script are horizontally centered");
|
||||
|
@ -52,6 +57,8 @@
|
|||
}, "Horizontal alignments of base and scripts");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
for (var i = 0; i <= 3; i++) {
|
||||
assert_greater_than_equal(getBox("under" + i + "under").top, getBox("under" + i + "base").bottom, "munder " + i + ": script is under base");
|
||||
assert_less_than_equal(getBox("over" + i + "over").bottom, getBox("over" + i + "base").top, "mover " + i + ": script is over base");
|
||||
|
@ -63,6 +70,8 @@
|
|||
}, "Relative vertical positions of base and scripts");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 1;
|
||||
for (var i = 0; i <= 3; i++) {
|
||||
assert_approx_equals(getBox("under" + i).width, Math.max(getBox("under" + i + "base").width, getBox("under" + i + "under").width), e, "munder " + i + ": width is determined by the maximum of width of base and script");
|
||||
|
@ -74,6 +83,8 @@
|
|||
}, "Width of scripted elements");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var e = 3.2;
|
||||
for (var i = 0; i <= 3; i++) {
|
||||
assert_approx_equals(getBox("under" + i).height, getBox("under" + i + "base").height + getBox("under" + i + "under").height + e, e, "munder " + i + ": height is determined by the sum of heights of base and script plus some spacing.");
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta name="assert" content="Elements munder, mover, munderover correctly use the limit parameters from the MATH table.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<style>
|
||||
math, mspace, mo {
|
||||
font-size: 10px;
|
||||
|
@ -44,6 +45,8 @@
|
|||
|
||||
function runTests() {
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 3000 * emToPx;
|
||||
assert_approx_equals(getBox("under00011").top - getBox("ref0001").bottom,
|
||||
v, epsilon, "munder: under shift");
|
||||
|
@ -52,6 +55,8 @@
|
|||
}, "LowerLimitBaselineDropMin");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 11000 * emToPx;
|
||||
assert_approx_equals(getBox("under00021").top - getBox("ref0002").bottom,
|
||||
v, epsilon, "munder: under gap");
|
||||
|
@ -60,6 +65,8 @@
|
|||
}, "LowerLimitGapMin");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 5000 * emToPx;
|
||||
assert_approx_equals(getBox("ref0003").top - getBox("over00031").bottom,
|
||||
v, epsilon, "mover: over shift");
|
||||
|
@ -68,6 +75,8 @@
|
|||
}, "UpperLimitBaselineRiseMin");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 7000 * emToPx;
|
||||
assert_approx_equals(getBox("ref0004").top - getBox("over00041").bottom,
|
||||
v, epsilon, "mover: over shift");
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta name="assert" content="Elements munder, mover, munderover correctly use the stretch stack parameters from the MATH table.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<style>
|
||||
math, mspace, mo {
|
||||
font-size: 10px;
|
||||
|
@ -44,6 +45,8 @@
|
|||
|
||||
function runTests() {
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 3000 * emToPx;
|
||||
assert_approx_equals(getBox("under00011").top - getBox("ref0001").bottom,
|
||||
v, epsilon, "munder: under shift");
|
||||
|
@ -52,6 +55,8 @@
|
|||
}, "StretchStackBottomShiftDown");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 11000 * emToPx;
|
||||
assert_approx_equals(getBox("under00021").top - getBox("ref0002").bottom,
|
||||
v, epsilon, "munder: under gap");
|
||||
|
@ -60,6 +65,8 @@
|
|||
}, "StretchStackGapBelowMin");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 5000 * emToPx;
|
||||
assert_approx_equals(getBox("ref0003").top - getBox("over00031").bottom,
|
||||
v, epsilon, "mover: over shift");
|
||||
|
@ -68,6 +75,8 @@
|
|||
}, "StretchStackTopShiftUp");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 7000 * emToPx;
|
||||
assert_approx_equals(getBox("ref0004").top - getBox("over00041").bottom,
|
||||
v, epsilon, "mover: over shift");
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta name="assert" content="Elements munder, mover, munderover correctly use underbar/overbar and AccentBaseHeight parameters from the MATH table.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<style>
|
||||
math, mspace, mo {
|
||||
font-size: 10px;
|
||||
|
@ -47,6 +48,8 @@
|
|||
|
||||
function runTests() {
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
for (var i = 1; i <= 4; i++) {
|
||||
for (var j = 1; j <= 6; j++) {
|
||||
var baseId = ("base00" + i) + j;
|
||||
|
@ -59,6 +62,8 @@
|
|||
}, "Baseline alignment");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
for (var i = 1; i <= 4; i++) {
|
||||
for (var j = 1; j <= 6; j++) {
|
||||
var baseId = ("base00" + i) + j;
|
||||
|
@ -72,6 +77,8 @@
|
|||
}, "Heights of bases");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 5000 * emToPx;
|
||||
assert_approx_equals(getBox("ref001").bottom - getBox("over0014").bottom,
|
||||
shortBaseHeight, epsilon,
|
||||
|
@ -96,6 +103,8 @@
|
|||
}, "AccentBaseHeight, UnderbarExtraDescender");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 7000 * emToPx;
|
||||
assert_approx_equals(getBox("ref002").bottom - getBox("over0024").bottom,
|
||||
shortBaseHeight, epsilon,
|
||||
|
@ -118,6 +127,8 @@
|
|||
}, "AccentBaseHeight, UnderbarVerticalGap");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 3000 * emToPx;
|
||||
assert_approx_equals(getBox("ref003").bottom - getBox("over0031").bottom,
|
||||
shortBaseHeight, epsilon,
|
||||
|
@ -154,6 +165,8 @@
|
|||
}, "AccentBaseHeight, OverbarExtraAscender");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
v = 11000 * emToPx;
|
||||
assert_approx_equals(getBox("ref004").bottom - getBox("over0041").bottom,
|
||||
shortBaseHeight + v, epsilon,
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<meta name="assert" content="Elements munder, mover, munderover correctly use underbar/overbar and AccentBaseHeight parameters from the MATH table.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/mathml/support/feature-detection.js"></script>
|
||||
<style>
|
||||
math, mspace, mo {
|
||||
font-size: 10px;
|
||||
|
@ -47,6 +48,8 @@
|
|||
|
||||
function runTests() {
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
for (var i = 1; i <= 4; i++) {
|
||||
for (var j = 1; j <= 6; j++) {
|
||||
var baseId = ("base00" + i) + j;
|
||||
|
@ -59,6 +62,8 @@
|
|||
}, "Baseline alignment");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
for (var i = 1; i <= 4; i++) {
|
||||
for (var j = 1; j <= 6; j++) {
|
||||
var baseId = ("base00" + i) + j;
|
||||
|
@ -72,6 +77,8 @@
|
|||
}, "Heights of bases");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 5000 * emToPx;
|
||||
assert_approx_equals(getBox("ref001").bottom - getBox("over0014").bottom,
|
||||
shortBaseHeight, epsilon,
|
||||
|
@ -96,6 +103,8 @@
|
|||
}, "AccentBaseHeight, UnderbarExtraDescender");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 7000 * emToPx;
|
||||
assert_approx_equals(getBox("ref002").bottom - getBox("over0024").bottom,
|
||||
shortBaseHeight, epsilon,
|
||||
|
@ -118,6 +127,8 @@
|
|||
}, "AccentBaseHeight, UnderbarVerticalGap");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 3000 * emToPx;
|
||||
assert_approx_equals(getBox("ref003").bottom - getBox("over0031").bottom,
|
||||
shortBaseHeight, epsilon,
|
||||
|
@ -154,6 +165,8 @@
|
|||
}, "AccentBaseHeight, OverbarExtraAscender");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
v = 11000 * emToPx;
|
||||
assert_approx_equals(getBox("ref004").bottom - getBox("over0041").bottom,
|
||||
shortBaseHeight + v, epsilon,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue