Bug 1472859 - Part 2: Add test for same colors and currentcolor. r=gl
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Tue, 03 Jul 2018 16:22:46 +0900
changeset 424973 262572362be873bbdd2d90c364eed331c4c57513
parent 424972 f94c634c79d05b14058c5635e434ceb23e68ec42
child 424974 6a228e47a3bda33d0e8c3a3d45a633960c6fd9bf
push id104946
push userrgurzau@mozilla.com
push dateWed, 04 Jul 2018 10:03:16 +0000
treeherdermozilla-inbound@796893f4d2f5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1472859
milestone63.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 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 }`);
       }
     }
   }
 }
-