Bug 1445602 [wpt PR 10025] - Adjust MathML tests to Workaround WebKit's bug with document.fonts.ready, a=testonly
authorFrédéric Wang <fred.wang@free.fr>
Mon, 09 Apr 2018 16:51:41 +0000
changeset 467052 9d110f970c48da96dd63ddb2076c0116b4423cfd
parent 467051 1b7272be53f8be2ac46211bbde940824c663fd07
child 467053 b22e33eaf96ce15bd214fb6425fc34907cf8f044
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1445602, 10025
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1445602 [wpt PR 10025] - Adjust MathML tests to Workaround WebKit's bug with document.fonts.ready, a=testonly Automatic update from web-platform-testsAdjust MathML tests to Workaround WebKit's bug with document.fonts.ready (#10025) wpt-commits: 716fa061d4296f6cd39cb5f8353e64e3222e7707 wpt-pr: 10025 wpt-commits: 716fa061d4296f6cd39cb5f8353e64e3222e7707 wpt-pr: 10025
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/mathml/presentation-markup/fractions/frac-parameters-1.html
testing/web-platform/tests/mathml/presentation-markup/fractions/frac-parameters-2.html
testing/web-platform/tests/mathml/presentation-markup/operators/mo-axis-height-1.html
testing/web-platform/tests/mathml/presentation-markup/radicals/root-parameters-1.html
testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-parameters-1.html
testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-1.html
testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-2.html
testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-3.html
testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-4.html
testing/web-platform/tests/mathml/presentation-markup/tables/table-axis-height.html
testing/web-platform/tests/mathml/relations/css-styling/displaystyle-1.html
testing/web-platform/tests/mathml/relations/css-styling/lengths-3.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -572327,29 +572327,29 @@
    "9a0f19770c7f633e06913d9d138e8f3a6d1a1104",
    "support"
   ],
   "mathml/presentation-markup/fractions/frac-1.html": [
    "dcb7a6e1dd3d75d2bc207abd659adfefc16b5103",
    "testharness"
   ],
   "mathml/presentation-markup/fractions/frac-parameters-1.html": [
-   "21ffc564f5bf999df38e265c104ddc3cc767ece3",
+   "043847a6c09fc388420383c1ce2c992369af299f",
    "testharness"
   ],
   "mathml/presentation-markup/fractions/frac-parameters-2.html": [
-   "17502e5c3311cb262d4d47657f71211292a1d4b0",
+   "5fa05dd23cc431661ca7460781191670d54f5340",
    "testharness"
   ],
   "mathml/presentation-markup/operators/mo-axis-height-1.html": [
-   "282c85bc036793c96972a348c8cced5b87d3f078",
+   "678286269101ccc22a3944c7f3fda1be95360be9",
    "testharness"
   ],
   "mathml/presentation-markup/radicals/root-parameters-1.html": [
-   "58293790346b6f6b5ad59de9637f136aad206d20",
+   "03787fde52972882808119b175331e671dbb477d",
    "testharness"
   ],
   "mathml/presentation-markup/scripts/subsup-1.html": [
    "ee18b8cc345d78ddb3506a96feb7d3aae8ba003c",
    "testharness"
   ],
   "mathml/presentation-markup/scripts/subsup-2.html": [
    "0f7fcac6c9c9a05a6cd267f1aab1f9ebd36e1194",
@@ -572363,53 +572363,53 @@
    "8d017b92bbd3b37261e4b753ec26580ed612f9d7",
    "testharness"
   ],
   "mathml/presentation-markup/scripts/subsup-5.html": [
    "6a72411d72f59e84165f0489d2cf7b4a7734ce57",
    "testharness"
   ],
   "mathml/presentation-markup/scripts/subsup-parameters-1.html": [
-   "59ca4d1cc0b773f1e57b9cc1fb45ccab6a97dd5b",
+   "a9198166947a3d181d21d2597d167d3962c67f6e",
    "testharness"
   ],
   "mathml/presentation-markup/scripts/underover-1.html": [
    "372c5f1e01a0fe5e3350579985e4f586838c0ed2",
    "testharness"
   ],
   "mathml/presentation-markup/scripts/underover-parameters-1.html": [
-   "0bd971f6288d6a198a0d3edcd5777943e4898296",
+   "8da018d0029c885f8d6caf4d8ae6517430e385c5",
    "testharness"
   ],
   "mathml/presentation-markup/scripts/underover-parameters-2.html": [
-   "19c54c65a72706e1d7f2a00fc998f4ffa3a8990c",
+   "56c694b6be115dc3241f9efe3e95ff8efc854896",
    "testharness"
   ],
   "mathml/presentation-markup/scripts/underover-parameters-3.html": [
-   "97bc8e457eada46d22e8c73f69c6854d4d2ebf44",
+   "a597bbccde38b2273fa552be0b7bbca8372beaf1",
    "testharness"
   ],
   "mathml/presentation-markup/scripts/underover-parameters-4.html": [
-   "609c7ff70d3c5509ca08197e38a3a1208faa093b",
+   "2a0978f31bae3934a18c34865a2193cc2d906bfb",
    "testharness"
   ],
   "mathml/presentation-markup/spaces/space-1.html": [
    "d5676f1ceae599c391b5aefb37c603aafa32bc9d",
    "testharness"
   ],
   "mathml/presentation-markup/spaces/space-2-ref.html": [
    "d5e0abd6a16f72db8aef60d0ad15d592346e2b4c",
    "support"
   ],
   "mathml/presentation-markup/spaces/space-2.html": [
    "a1b0a01ca8f31912bcb54499f053566dd64f6830",
    "reftest"
   ],
   "mathml/presentation-markup/tables/table-axis-height.html": [
-   "0019b8c73ac46a41c078f722b854f5d4b179f9a2",
+   "e19346c7b5514aeb048a18ae6cb80e9f3fb76c3a",
    "testharness"
   ],
   "mathml/relations/css-styling/color-1-ref.html": [
    "62d74707c709be00b4da9f57620b6ccd8c08582c",
    "support"
   ],
   "mathml/relations/css-styling/color-1.html": [
    "e918b3bcb0c015a240bcb1358d9d105253a6c056",
@@ -572419,17 +572419,17 @@
    "da64b09436a1ee806e02bb8abc7d3548194f4ff0",
    "support"
   ],
   "mathml/relations/css-styling/display-1.html": [
    "9ef0b9b366481ab87520c14ca5b75c76db3b2e25",
    "reftest"
   ],
   "mathml/relations/css-styling/displaystyle-1.html": [
-   "ec33c536a756cf8870acaf029257f126284c7130",
+   "16a7750938d2cf3b33e502365fcd9a25e51ed2a9",
    "testharness"
   ],
   "mathml/relations/css-styling/lengths-1-ref.html": [
    "78d4d2d61dbe7ae039d76d3afc2dc7ef0f0a98c3",
    "support"
   ],
   "mathml/relations/css-styling/lengths-1.html": [
    "ebe917100a1031ca79b04a1b9308e76473623fb9",
@@ -572439,17 +572439,17 @@
    "78d4d2d61dbe7ae039d76d3afc2dc7ef0f0a98c3",
    "support"
   ],
   "mathml/relations/css-styling/lengths-2.html": [
    "cc08bab193b205b7444df7ed0405323fd7700482",
    "reftest"
   ],
   "mathml/relations/css-styling/lengths-3.html": [
-   "206d9a369266e8639f290545c86df7cd6ab9ebea",
+   "2723869ffc2e841ed40676283fd0b818240dd111",
    "testharness"
   ],
   "mathml/relations/css-styling/mathvariant-bold-fraktur-ref.html": [
    "fa251bee74521ce8b994e41eee3b1bc5b688bcab",
    "support"
   ],
   "mathml/relations/css-styling/mathvariant-bold-fraktur.html": [
    "330fd8e22586c5063f4d6cb19679c99e38ab43fc",
--- a/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-parameters-1.html
+++ b/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-parameters-1.html
@@ -57,17 +57,18 @@
   var epsilon = 1;
 
   function getBox(aId) {
     return document.getElementById(aId).getBoundingClientRect();
   }
 
   setup({ explicit_done: true });
   window.addEventListener("load", function() {
-    document.fonts.ready.then(runTests);
+    // Delay the check to workaround WebKit's bug https://webkit.org/b/174030.
+    requestAnimationFrame(() => { document.fonts.ready.then(runTests); });
   });
 
   function runTests() {
     test(function() {
       var v1 = 7000 * emToPx;
       var v2 = 1000 * emToPx;
       assert_approx_equals(getBox("ref0001").top - getBox("num0001").bottom,
                            v1 + v2 / 2, epsilon, "mfrac: axis height");
--- a/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-parameters-2.html
+++ b/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-parameters-2.html
@@ -45,17 +45,18 @@
   var epsilon = 1;
 
   function getBox(aId) {
     return document.getElementById(aId).getBoundingClientRect();
   }
 
   setup({ explicit_done: true });
   window.addEventListener("load", function() {
-    document.fonts.ready.then(runTests);
+    // Delay the check to workaround WebKit's bug https://webkit.org/b/174030.
+    requestAnimationFrame(() => { document.fonts.ready.then(runTests); });
   });
 
   function runTests() {
     test(function() {
       var v = 7000 * emToPx;
       assert_approx_equals(getBox("ref0001").top - getBox("num0001").bottom,
                            v, epsilon, "mfrac: axis height");
     }, "AxisHeight");
--- a/testing/web-platform/tests/mathml/presentation-markup/operators/mo-axis-height-1.html
+++ b/testing/web-platform/tests/mathml/presentation-markup/operators/mo-axis-height-1.html
@@ -21,17 +21,18 @@
   var epsilon = 5;
 
   function getBox(aId) {
     return document.getElementById(aId).getBoundingClientRect();
   }
 
   setup({ explicit_done: true });
   window.addEventListener("load", function() {
-    document.fonts.ready.then(runTests);
+    // Delay the check to workaround WebKit's bug https://webkit.org/b/174030.
+    requestAnimationFrame(() => { document.fonts.ready.then(runTests); });
   });
 
   function runTests() {
     test(function() {
       var v1 = 5000 * emToPx;
       var moMiddle = (getBox("mo1").bottom + getBox("mo1").top) / 2;
       assert_approx_equals(getBox("mo1").height,
                            14000 * emToPx, epsilon, "mo: size");
--- a/testing/web-platform/tests/mathml/presentation-markup/radicals/root-parameters-1.html
+++ b/testing/web-platform/tests/mathml/presentation-markup/radicals/root-parameters-1.html
@@ -45,17 +45,18 @@
   var epsilon = 1;
 
   function getBox(aId) {
     return document.getElementById(aId).getBoundingClientRect();
   }
 
   setup({ explicit_done: true });
   window.addEventListener("load", function() {
-    document.fonts.ready.then(runTests);
+    // Delay the check to workaround WebKit's bug https://webkit.org/b/174030.
+    requestAnimationFrame(() => { document.fonts.ready.then(runTests); });
   });
 
   function runTests() {
     test(function() {
       var v1 = 25;
       var v2 = 1000 * emToPx;
       var radicalHeight = getBox("base001").height + v2;
       assert_approx_equals(getBox("ref001").top - getBox("index001").bottom,
--- a/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-parameters-1.html
+++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-parameters-1.html
@@ -57,17 +57,18 @@
   var epsilon = 1;
 
   function getBox(aId) {
     return document.getElementById(aId).getBoundingClientRect();
   }
 
   setup({ explicit_done: true });
   window.addEventListener("load", function() {
-    document.fonts.ready.then(runTests);
+    // Delay the check to workaround WebKit's bug https://webkit.org/b/174030.
+    requestAnimationFrame(() => { document.fonts.ready.then(runTests); });
   });
 
   function runTests() {
     test(function() {
       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");
       assert_approx_equals(getBox("ref003").left - getBox("sup003").right, v, epsilon, "msubsup: Space after superscript");
--- a/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-1.html
+++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-1.html
@@ -33,17 +33,18 @@
   var epsilon = 1;
 
   function getBox(aId) {
     return document.getElementById(aId).getBoundingClientRect();
   }
 
   setup({ explicit_done: true });
   window.addEventListener("load", function() {
-    document.fonts.ready.then(runTests);
+    // Delay the check to workaround WebKit's bug https://webkit.org/b/174030.
+    requestAnimationFrame(() => { document.fonts.ready.then(runTests); });
   });
 
   function runTests() {
     test(function() {
       var v = 3000 * emToPx;
       assert_approx_equals(getBox("under00011").top - getBox("ref0001").bottom,
                            v, epsilon, "munder: under shift");
       assert_approx_equals(getBox("under00012").top - getBox("ref0001").bottom,
--- a/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-2.html
+++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-2.html
@@ -33,17 +33,18 @@
   var epsilon = 1;
 
   function getBox(aId) {
     return document.getElementById(aId).getBoundingClientRect();
   }
 
   setup({ explicit_done: true });
   window.addEventListener("load", function() {
-    document.fonts.ready.then(runTests);
+    // Delay the check to workaround WebKit's bug https://webkit.org/b/174030.
+    requestAnimationFrame(() => { document.fonts.ready.then(runTests); });
   });
 
   function runTests() {
     test(function() {
       var v = 3000 * emToPx;
       assert_approx_equals(getBox("under00011").top - getBox("ref0001").bottom,
                            v, epsilon, "munder: under shift");
       assert_approx_equals(getBox("under00012").top - getBox("ref0001").bottom,
--- a/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-3.html
+++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-3.html
@@ -36,17 +36,18 @@
   var tallBaseHeight = 5000 * emToPx; // tallBaseHeight > axisBaseHeight
 
   function getBox(aId) {
     return document.getElementById(aId).getBoundingClientRect();
   }
 
   setup({ explicit_done: true });
   window.addEventListener("load", function() {
-    document.fonts.ready.then(runTests);
+    // Delay the check to workaround WebKit's bug https://webkit.org/b/174030.
+    requestAnimationFrame(() => {   document.fonts.ready.then(runTests); });
   });
 
   function runTests() {
     test(function() {
       for (var i = 1; i <= 4; i++) {
         for (var j = 1; j <= 6; j++) {
            var baseId = ("base00" + i) + j;
            assert_approx_equals(getBox("ref00" + i).bottom,
--- a/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-4.html
+++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-4.html
@@ -36,17 +36,18 @@
   var tallBaseHeight = 5000 * emToPx; // tallBaseHeight > axisBaseHeight
 
   function getBox(aId) {
     return document.getElementById(aId).getBoundingClientRect();
   }
 
   setup({ explicit_done: true });
   window.addEventListener("load", function() {
-    document.fonts.ready.then(runTests);
+    // Delay the check to workaround WebKit's bug https://webkit.org/b/174030.
+    requestAnimationFrame(() => {   document.fonts.ready.then(runTests); });
   });
 
   function runTests() {
     test(function() {
       for (var i = 1; i <= 4; i++) {
         for (var j = 1; j <= 6; j++) {
            var baseId = ("base00" + i) + j;
            assert_approx_equals(getBox("ref00" + i).bottom,
--- a/testing/web-platform/tests/mathml/presentation-markup/tables/table-axis-height.html
+++ b/testing/web-platform/tests/mathml/presentation-markup/tables/table-axis-height.html
@@ -21,17 +21,18 @@
   var epsilon = 1;
 
   function getBox(aId) {
     return document.getElementById(aId).getBoundingClientRect();
   }
 
   setup({ explicit_done: true });
   window.addEventListener("load", function() {
-    document.fonts.ready.then(runTests);
+    // Delay the check to workaround WebKit's bug https://webkit.org/b/174030.
+    requestAnimationFrame(() => { document.fonts.ready.then(runTests); });
   });
 
   function runTests() {
     test(function() {
       var v1 = 5000 * emToPx;
       var tableMiddle = (getBox("table").bottom + getBox("table").top) / 2;
       assert_approx_equals(getBox("baseline").bottom - tableMiddle,
                            v1, epsilon, "mtable: axis height");
--- a/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-1.html
+++ b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-1.html
@@ -27,17 +27,18 @@
     var elementSize = element.getBoundingClientRect().height;
     if (displaystyle)
       assert_approx_equals(elementSize, 5000 * emToPx, epsilon, description);
     else
       assert_approx_equals(elementSize, 1000 * emToPx, epsilon, description);
   }
 
   window.addEventListener("load", function() {
-    document.fonts.ready.then(runTests);
+    // Delay the check to workaround WebKit's bug https://webkit.org/b/174030.
+    requestAnimationFrame(() => { document.fonts.ready.then(runTests); });
   });
 
   function runTests() {
     test(function() {
       verify_displaystyle("math_default", false, "default");
       verify_displaystyle("math_inline", false, "explicit display inline");
       verify_displaystyle("math_block", true, "explicit display block");
       verify_displaystyle("math_false", false, "explicit displaystyle false");
--- a/testing/web-platform/tests/mathml/relations/css-styling/lengths-3.html
+++ b/testing/web-platform/tests/mathml/relations/css-styling/lengths-3.html
@@ -21,17 +21,18 @@
   var epsilon = .5;
 
   function getBox(aId) {
     return document.getElementById(aId).getBoundingClientRect();
   }
 
   setup({ explicit_done: true });
   window.addEventListener("load", function() {
-    document.fonts.ready.then(runTests);
+    // Delay the check to workaround WebKit's bug https://webkit.org/b/174030.
+    requestAnimationFrame(() => { document.fonts.ready.then(runTests); });
   });
 
   function runTests() {
     test(function() {
       assert_equals(getBox("unitCm").width, 96, "cm");
       assert_equals(getBox("unitEm").width, 120, "em");
       assert_equals(getBox("unitEx").width, 500, "ex");
       assert_equals(getBox("unitIn").width, 288, "in");