Bug 1472859 - Part 2: Add test for same colors and currentcolor. r?gl draft
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Tue, 03 Jul 2018 16:22:46 +0900
changeset 813436 b884f30ddf0caae74a98a45bd5ddddb434365b4f
parent 813435 6e749853fe4d8ed6ddf30a789ee99cd39256d6cb
push id114905
push userbmo:dakatsuka@mozilla.com
push dateTue, 03 Jul 2018 07:23:30 +0000
reviewersgl
bugs1472859
milestone63.0a1
Bug 1472859 - Part 2: Add test for same colors and currentcolor. r?gl 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 }`);
       }
     }
   }
 }
-