Bug 1660432 [wpt PR 25175] - Test percentage resolution for lspace/voffset for mpadded, a=testonly
authorRob Buis <rbuis@igalia.com>
Wed, 26 Aug 2020 08:53:56 +0000
changeset 546486 877d9b7f273e2e3472b2a963159c39cd08690950
parent 546485 4464897c08dc10446749bc33805a44c37e5f3868
child 546487 817609ebfcb01fa06e0f3c3c0ae3e82e9d9438e1
push id37735
push userabutkovits@mozilla.com
push dateThu, 27 Aug 2020 21:29:40 +0000
treeherdermozilla-central@109f3a4de567 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1660432, 25175
milestone82.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 1660432 [wpt PR 25175] - Test percentage resolution for lspace/voffset for mpadded, a=testonly Automatic update from web-platform-tests Test percentage resolution for lspace/voffset for mpadded (#25175) -- wpt-commits: 4b8d683b7153b567ea65fb03868bc174276a00cf wpt-pr: 25175
testing/web-platform/tests/mathml/presentation-markup/mpadded/mpadded-003.html
--- a/testing/web-platform/tests/mathml/presentation-markup/mpadded/mpadded-003.html
+++ b/testing/web-platform/tests/mathml/presentation-markup/mpadded/mpadded-003.html
@@ -48,28 +48,44 @@
           assert_approx_equals(shifts.lspace, 5, epsilon, "positive lspace");
           assert_approx_equals(shifts.voffset, 0, epsilon);
 
           shifts = GetShifts(mpaddeds[1]);
           assert_approx_equals(shifts.lspace, 0, epsilon, "negative lspace is clmaped to zero");
           assert_approx_equals(shifts.voffset, 0, epsilon);
 
           shifts = GetShifts(mpaddeds[2]);
+          assert_approx_equals(shifts.lspace, 0, epsilon, "positive lspace percentage");
+          assert_approx_equals(shifts.voffset, 0, epsilon);
+
+          shifts = GetShifts(mpaddeds[3]);
+          assert_approx_equals(shifts.lspace, 0, epsilon, "negative lspace percentage");
+          assert_approx_equals(shifts.voffset, 0, epsilon);
+
+          shifts = GetShifts(mpaddeds[4]);
           assert_approx_equals(shifts.lspace, 0, epsilon);
           assert_approx_equals(shifts.voffset, 10, epsilon, "positive voffset");
 
-          shifts = GetShifts(mpaddeds[3]);
+          shifts = GetShifts(mpaddeds[5]);
           assert_approx_equals(shifts.lspace, 0, epsilon);
           assert_approx_equals(shifts.voffset, -10, epsilon, "negative voffset");
 
-          shifts = GetShifts(mpaddeds[4]);
+          shifts = GetShifts(mpaddeds[6]);
+          assert_approx_equals(shifts.lspace, 0, epsilon);
+          assert_approx_equals(shifts.voffset, 0, epsilon, "positive voffset percentage");
+
+          shifts = GetShifts(mpaddeds[7]);
+          assert_approx_equals(shifts.lspace, 0, epsilon);
+          assert_approx_equals(shifts.voffset, 0, epsilon, "negative voffset percentage");
+
+          shifts = GetShifts(mpaddeds[8]);
           assert_approx_equals(shifts.lspace, 5, epsilon);
           assert_approx_equals(shifts.voffset, 10, epsilon);
 
-          shifts = GetShifts(mpaddeds[5]);
+          shifts = GetShifts(mpaddeds[9]);
           assert_approx_equals(shifts.lspace, 5, epsilon);
           assert_approx_equals(shifts.voffset, -10, epsilon);
       }, "content is shifted by the specified lspace/voffset");
 
       mpaddeds = document.getElementById("static_tests_rtl").getElementsByTagName("mpadded");
       test(function() {
           let shifts = GetShifts(mpaddeds[0]);
           assert_approx_equals(shifts.lspace, -5, epsilon, "positive lspace");
@@ -143,18 +159,22 @@ div.shrink-wrap {
 </head>
 <body>
   <div id="log"></div>
   <div id="static_tests">
     <span id="baseline" style="display: inline-block; width: 30px; height: 5px; background: blue"></span>
     <math>
       <mpadded lspace="5px"  style="background: black"><mspace width="10px" depth="15px" height="20px" style="background: green; opacity: .5"/></mpadded>
       <mpadded lspace="-5px" style="background: black"><mspace width="10px" depth="15px" height="20px" style="background: green; opacity: .5"/></mpadded>
+      <mpadded lspace="5%"  style="background: black"><mspace width="10px" depth="15px" height="20px" style="background: green; opacity: .5"/></mpadded>
+      <mpadded lspace="-5%"  style="background: black"><mspace width="10px" depth="15px" height="20px" style="background: green; opacity: .5"/></mpadded>
       <mpadded voffset="10px" style="background: black"><mspace width="10px" depth="15px" height="20px" style="background: green; opacity: .5"/></mpadded>
       <mpadded voffset="-10px" style="background: black"><mspace width="10px" depth="15px" height="20px" style="background: green; opacity: .5"/></mpadded>
+      <mpadded voffset="10%" style="background: black"><mspace width="10px" depth="15px" height="20px" style="background: green; opacity: .5"/></mpadded>
+      <mpadded voffset="-10%" style="background: black"><mspace width="10px" depth="15px" height="20px" style="background: green; opacity: .5"/></mpadded>
       <mpadded lspace="5px" voffset="10px" style="background: black"><mspace width="10px" depth="15px" height="20px" style="background: green; opacity: .5"/></mpadded>
       <mpadded lspace="5px" voffset="-10px" style="background: black"><mspace width="10px" depth="15px" height="20px" style="background: green; opacity: .5"/></mpadded>
     </math>
   </div>
   <div id="static_tests_rtl">
     <math dir="rtl">
       <mpadded lspace="5px"  style="background: black"><mspace width="10px" depth="15px" height="20px" style="background: green; opacity: .5"/></mpadded>
       <mpadded lspace="-5px" style="background: black"><mspace width="10px" depth="15px" height="20px" style="background: green; opacity: .5"/></mpadded>