mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
tests for bug 521335
This commit is contained in:
parent
1b6c4332af
commit
ac25c80d86
@ -63,14 +63,29 @@ var _fromByTestLists =
|
||||
new AnimTestcaseFromBy("1.2", "-0.6", { midComp: "0.9", toComp: "0.6"},
|
||||
"opacities with abs val >1 get clamped too early"),
|
||||
],
|
||||
paint: [
|
||||
// The "none" keyword & URI values aren't addiditve, so the animations in
|
||||
// these testcases are expected to have no effect.
|
||||
// XXXdholbert Of course, we don't support animation between URI values yet
|
||||
// (bug 520487), so the testcases that use URIs currently have no effect
|
||||
// for that reason, too.
|
||||
new AnimTestcaseFromBy("none", "none", { noEffect: 1 }),
|
||||
new AnimTestcaseFromBy("url(#gradA)", "url(#gradB)", { noEffect: 1 }),
|
||||
new AnimTestcaseFromBy("url(#gradA)", "url(#gradB) red", { noEffect: 1 }),
|
||||
new AnimTestcaseFromBy("url(#gradA)", "none", { noEffect: 1 }),
|
||||
new AnimTestcaseFromBy("red", "url(#gradA)", { noEffect: 1 }),
|
||||
]
|
||||
};
|
||||
|
||||
// List of attribute/testcase-list bundles to be tested
|
||||
var gFromByBundles =
|
||||
[
|
||||
new TestcaseBundle(gPropList.fill, _fromByTestLists.color),
|
||||
new TestcaseBundle(gPropList.fill, [].concat(_fromByTestLists.color,
|
||||
_fromByTestLists.paint)),
|
||||
new TestcaseBundle(gPropList.font_size, _fromByTestLists.lengthPx),
|
||||
new TestcaseBundle(gPropList.font_size_adjust, [
|
||||
// These testcases implicitly have no effect, because font-size-adjust is
|
||||
// non-additive (and is declared as such in db_smilCSSPropertyList.js)
|
||||
new AnimTestcaseFromBy("0.5", "0.1"),
|
||||
new AnimTestcaseFromBy("none", "0.1"),
|
||||
new AnimTestcaseFromBy("0.1", "none")
|
||||
|
@ -77,6 +77,7 @@ var _fromToTestLists = {
|
||||
midComp: "rgb(230, 230, 230)" }),
|
||||
],
|
||||
paintServer: [
|
||||
new AnimTestcaseFromTo("none", "none"),
|
||||
new AnimTestcaseFromTo("none", "blue", { toComp : "rgb(0, 0, 255)" }),
|
||||
new AnimTestcaseFromTo("rgb(50, 50, 50)", "none"),
|
||||
new AnimTestcaseFromTo("url(#gradA)", "url(#gradB) currentColor",
|
||||
|
@ -198,6 +198,22 @@ var gPacedBundles =
|
||||
}),
|
||||
])
|
||||
),
|
||||
new TestcaseBundle(gPropList.font_size_adjust, [
|
||||
new AnimTestcasePaced("0.2; 0.6; 0.8",
|
||||
{ comp0: "0.2",
|
||||
comp1_6: "0.3",
|
||||
comp1_3: "0.4",
|
||||
comp2_3: "0.6",
|
||||
comp1: "0.8"
|
||||
}),
|
||||
new AnimTestcasePaced("none; none; 0.5",
|
||||
{ comp0: "none",
|
||||
comp1_6: "none",
|
||||
comp1_3: "none",
|
||||
comp2_3: "0.5",
|
||||
comp1: "0.5"
|
||||
}),
|
||||
]),
|
||||
new TestcaseBundle(gPropList.font_family, [
|
||||
// Sanity check: 'font-family' isn't interpolatable. It should end up
|
||||
// ignoring the calcMode="paced" and falling into discrete-mode.
|
||||
|
@ -497,6 +497,10 @@ extend(AnimTestcaseFromTo, AnimTestcaseFrom);
|
||||
* - midComp: Computed value that we expect to visit halfway through the
|
||||
* animation (|aFrom| + |aBy|/2)
|
||||
* - toComp: Computed value of the animation endpoint (|aFrom| + |aBy|)
|
||||
* - noEffect: Special flag -- if set, indicates that this testcase is
|
||||
* expected to have no effect on the computed value. (i.e. the
|
||||
* attribute may be animatable and additive, but the particular
|
||||
* "from" & "by" values that are used don't support addition.)
|
||||
* @param aSkipReason If this test-case is known to currently fail, this
|
||||
* parameter should be a string explaining why.
|
||||
* Otherwise, this value should be null (or omitted).
|
||||
@ -507,7 +511,8 @@ function AnimTestcaseFromBy(aFrom, aBy, aComputedValMap, aSkipReason)
|
||||
this.by = aBy;
|
||||
this.computedValMap = aComputedValMap;
|
||||
this.skipReason = aSkipReason;
|
||||
if (this.computedValMap && !this.computedValMap.toComp) {
|
||||
if (this.computedValMap &&
|
||||
!this.computedValMap.noEffect && !this.computedValMap.toComp) {
|
||||
ok(false, "AnimTestcaseFromBy needs expected computed final value");
|
||||
}
|
||||
}
|
||||
@ -527,7 +532,7 @@ AnimTestcaseFromBy.prototype =
|
||||
},
|
||||
buildSeekList : function(aAnimAttr, aBaseVal, aTimeData, aIsFreeze)
|
||||
{
|
||||
if (!aAnimAttr.isAdditive) {
|
||||
if (!aAnimAttr.isAdditive || this.computedValMap.noEffect) {
|
||||
return this.buildSeekListStatic(aAnimAttr, aBaseVal, aTimeData,
|
||||
"defined as non-additive in SVG spec");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user