Bug 1323330 - Part 1: Run test_animation_properties.html with the Web Animation API pref. r?boris
Handling missing keyframe is behind the pref value regardless whether the
script runs on chrome privilege or not. So the pref has to be set explicitly.
MozReview-Commit-ID: 8f83wgGDF4a
--- a/dom/animation/test/chrome/test_animation_properties.html
+++ b/dom/animation/test/chrome/test_animation_properties.html
@@ -799,19 +799,26 @@ var gTests = [
value(1, '10px', 'replace') ] },
{ property: 'right',
values: [ value(0, undefined, 'add', 'linear'),
value(0.5, '5px', 'replace', 'linear'),
value(1, undefined, 'add') ] } ]
},
];
-gTests.forEach(function(subtest) {
- test(function(t) {
- var div = addDiv(t);
- var animation = div.animate(subtest.frames, 100 * MS_PER_SEC);
- assert_properties_equal(animation.effect.getProperties(),
- subtest.expected);
- }, subtest.desc);
-});
+SpecialPowers.pushPrefEnv(
+ { set: [["dom.animations-api.core.enabled", true]] },
+ function() {
+ gTests.forEach(function(subtest) {
+ test(function(t) {
+ var div = addDiv(t);
+ var animation = div.animate(subtest.frames, 100 * MS_PER_SEC);
+ assert_properties_equal(animation.effect.getProperties(),
+ subtest.expected);
+ }, subtest.desc);
+ });
+
+ done();
+ }
+);
</script>
</body>