Bug 1472859 - Part 2: Add test for same colors and currentcolor. r=gl a=lizzard
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Tue, 03 Jul 2018 16:22:46 +0900
changeset 480355 e5972354da953a684cda4885accf6539eb09eae6
parent 480354 79290fd284cfc2226df07b793287d9c2037f2f10
child 480356 5db3df3d5a433545830b6199ba28d28c93ef5d34
push id1757
push userffxbld-merge
push dateFri, 24 Aug 2018 17:02:43 +0000
treeherdermozilla-release@736023aebdb1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl, lizzard
bugs1472859
milestone62.0
Bug 1472859 - Part 2: Add test for same colors and currentcolor. r=gl a=lizzard MozReview-Commit-ID: KRnajXPdwSq
devtools/client/inspector/animation/test/doc_multi_keyframes.html
devtools/client/inspector/animation/test/keyframes-graph_keyframe-marker_head.js
--- a/devtools/client/inspector/animation/test/doc_multi_keyframes.html
+++ b/devtools/client/inspector/animation/test/doc_multi_keyframes.html
@@ -195,11 +195,35 @@
           offset: 0.5,
         },
         {
           opacity: 1,
           offset: 1,
         },
       ]
     );
+
+    createAnimation(
+      "same-color",
+      [
+        {
+          backgroundColor: "lime",
+        },
+        {
+          backgroundColor: "lime",
+        },
+      ]
+    );
+
+    createAnimation(
+      "currentcolor",
+      [
+        {
+          backgroundColor: "currentColor",
+        },
+        {
+          backgroundColor: "lime",
+        },
+      ]
+    );
     </script>
   </body>
 </html>
--- a/devtools/client/inspector/animation/test/keyframes-graph_keyframe-marker_head.js
+++ b/devtools/client/inspector/animation/test/keyframes-graph_keyframe-marker_head.js
@@ -127,17 +127,53 @@ const KEYFRAMES_TEST_DATA = [
           },
           {
             title: "1",
             marginInlineStart: "100%",
           },
         ],
       },
     ],
-  }
+  },
+  {
+    targetClass: "same-color",
+    properties: [
+      {
+        name: "background-color",
+        expectedValues: [
+          {
+            title: "rgb(0, 255, 0)",
+            marginInlineStart: "0%",
+          },
+          {
+            title: "rgb(0, 255, 0)",
+            marginInlineStart: "100%",
+          },
+        ],
+      },
+    ],
+  },
+  {
+    targetClass: "currentcolor",
+    properties: [
+      {
+        name: "background-color",
+        expectedValues: [
+          {
+            title: "currentcolor",
+            marginInlineStart: "0%",
+          },
+          {
+            title: "rgb(0, 255, 0)",
+            marginInlineStart: "100%",
+          },
+        ],
+      },
+    ],
+  },
 ];
 
 /**
  * Do test for keyframes-graph_keyframe-marker-ltf/rtl.
  *
  * @param {Array} testData
  */
 // eslint-disable-next-line no-unused-vars
@@ -174,9 +210,8 @@ async function testKeyframesGraphKeyfram
         info(`Checking marginInlineStart style in ${ hintTarget }`);
         is(markerEl.style.marginInlineStart, expectedValue.marginInlineStart,
           `marginInlineStart in ${ hintTarget } should be ` +
           `${ expectedValue.marginInlineStart }`);
       }
     }
   }
 }
-