Bug 1472859 - Part 2: Add test for same colors and currentcolor. r?gl
MozReview-Commit-ID: KRnajXPdwSq
--- 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 }`);
}
}
}
}
-