Bug 1371115 - Part 14: add tests for moz prefixed properties. r?hiro
Since we implement following properties animatable, append to test.
* -moz-border-bottom-colors
* -moz-border-left-colors
* -moz-border-right-colors
* -moz-border-top-colors
MozReview-Commit-ID: E3zWaDcRdtE
--- a/dom/animation/test/mozilla/test_moz-prefixed-properties.html
+++ b/dom/animation/test/mozilla/test_moz-prefixed-properties.html
@@ -9,30 +9,38 @@
</head>
<body>
<div id="log"></div>
<script>
"use strict";
const testcases = [
{
+ property: "-moz-border-bottom-colors",
+ },
+ {
+ property: "-moz-border-left-colors",
+ },
+ {
+ property: "-moz-border-right-colors",
+ },
+ {
+ property: "-moz-border-top-colors",
+ },
+ {
property: "-moz-box-align"
},
{
property: "-moz-box-direction"
},
{
property: "-moz-box-ordinal-group"
},
{
property: "-moz-box-orient",
- expectedValueMap: {
- "block-axis": "vertical",
- "inline-axis": "horizontal",
- }
},
{
property: "-moz-box-pack"
},
{
property: "-moz-float-edge"
},
{
@@ -79,19 +87,17 @@ testcases.forEach(testcase => {
container.appendChild(target);
container.style[property.domProp] = value;
const animation =
target.animate({ [property.domProp]: [value, "inherit"] },
{ duration: 1000, delay: -500 } );
- const expectedValue =
- testcase.expectedValueMap && testcase.expectedValueMap[value]
- ? testcase.expectedValueMap[value] : value;
+ const expectedValue = getComputedStyle(container)[property.domProp];
assert_equals(getComputedStyle(target)[property.domProp], expectedValue,
`Computed style shoud be "${ expectedValue }"`);
}, `Test inherit value for "${ testcase.property }" `
+ `(Parent element style is "${ value }")`);
});
});
</script>
</pre>