Bug 1387973 - Modify transition test cases for {text,box}-shadow without color. r?birtles draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Wed, 16 Aug 2017 15:03:46 +0900
changeset 647303 ee73b26e1f6e4cda87f5c4dc0a163e3da01750a3
parent 647302 f4b427e9e8b580120a3052c03427806b15ec8653
child 726448 856c0ea5a2bafb1dd2108c5a94b476ec6d57545d
push id74346
push userhikezoe@mozilla.com
push dateWed, 16 Aug 2017 06:05:49 +0000
reviewersbirtles
bugs1387973, 726550, 1390697
milestone57.0a1
Bug 1387973 - Modify transition test cases for {text,box}-shadow without color. r?birtles As for Gecko we can't interpolate between value with color and value without color yet (bug 726550) so that transition does not happen for the cases. As for Servo we can interpolate them but the results are wrong (bug 1390697). MozReview-Commit-ID: 9T0ELBUP0pL
layout/style/test/test_transitions_per_property.html
--- a/layout/style/test/test_transitions_per_property.html
+++ b/layout/style/test/test_transitions_per_property.html
@@ -58,21 +58,19 @@ function any_unit_to_num(str)
 var FUNC_NEGATIVE = "cubic-bezier(0.25, -2, 0.75, 1)";
 var FUNC_OVERONE = "cubic-bezier(0.25, 0, 0.75, 3)";
 
 // After resolving Bug 1387080, we can remove this variable.
 const isServo = SpecialPowers.DOMWindowUtils.isStyledByServo;
 
 // The following properties will be skipped while using Servo backend.
 var skippedProperties = {
-    "box-shadow": true,             // Bug 1387973
     "stroke-dasharray": true,       // Bug 1387986
     "stroke-dashoffset": true,      // Bug 1369614
     "stroke-width": true,           // Bug 1369614
-    "text-shadow": true,            // Bug 1387973
 };
 
 var supported_properties = {
     "border-bottom-left-radius": [ test_radius_transition ],
     "border-bottom-right-radius": [ test_radius_transition ],
     "border-top-left-radius": [ test_radius_transition ],
     "border-top-right-radius": [ test_radius_transition ],
     "-moz-box-flex": [ test_float_zeroToOne_transition,
@@ -1677,20 +1675,38 @@ function test_shadow_transition(prop) {
     div.style.setProperty(prop, "8px 8px 8px red", "");
     is(cs.getPropertyValue(prop), "rgb(255, 0, 0) 8px 8px 8px 0px",
        "shadow-valued property " + prop + ": non-interpolable cases");
     check_distance(prop, "8px 8px 8px red inset",
                          "rgb(255, 0, 0) 8px 8px 8px 2px inset",
                          "8px 8px 8px 8px red inset");
   }
 
+  // Transition beween values with color and without color.
+  div.style.setProperty("transition-property", "none", "");
+  div.style.setProperty("color", "rgb(3, 0, 0)", "");
+  div.style.setProperty(prop, "2px 2px 2px", "");
+  is(cs.getPropertyValue(prop), "rgb(3, 0, 0) 2px 2px 2px" + spreadStr,
+     "shadow-valued property " + prop + ": computed value before transition");
+  div.style.setProperty("transition-property", prop, "");
+  div.style.setProperty(prop, "8px 8px 8px red", "");
+  // Bug 726550 for gecko (can't transition), bug 1390697 for servo (doesn't
+  // work currentColor animation for {text,box}-shadow).
+  todo_is(cs.getPropertyValue(prop),
+          "rgb(66, 0, 0) 3.5px 3.5px 3.5px" + spreadStr,
+          "shadow-valued property " + prop +
+          ": interpolation values with/without color");
+
+  // Transition beween values without color.
   var defaultColor = cs.getPropertyValue("color") + " ";
+  div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "2px 2px 2px", "");
   is(cs.getPropertyValue(prop), defaultColor + "2px 2px 2px" + spreadStr,
-     "shadow-valued property " + prop + ": non-interpolable cases");
+     "shadow-valued property " + prop + ": computed value before transition");
+  div.style.setProperty("transition-property", prop, "");
   div.style.setProperty(prop, "6px 14px 10px", "");
   is(cs.getPropertyValue(prop), defaultColor + "3px 5px 4px" + spreadStr,
      "shadow-valued property " + prop + ": interpolation without color");
   check_distance(prop, "2px 2px 2px", "3px 5px 4px", "6px 14px 10px");
 
   div.style.setProperty("transition-timing-function", FUNC_NEGATIVE, "");
   div.style.setProperty("transition-property", "none", "");
   div.style.setProperty(prop, "0px 0px 0px black", "");