2 <script src=
"../resources/testharness.js"></script>
3 <script src=
"../resources/testharnessreport.js"></script>
8 var element
= document
.getElementById('e');
10 var keyframes
= [{opacity
: '1'}, {opacity
: '0'}];
11 var timingObject
= {duration
: 2, iterations
: 5};
14 var keyframeEffect
= new KeyframeEffect(element
, keyframes
, timingObject
);
15 assert_not_equals(keyframeEffect
, undefined);
16 assert_equals(keyframeEffect
.constructor, KeyframeEffect
);
17 }, 'Calling new KeyframeEffect() with a timing object input should create an keyframeEffect.');
20 var keyframeEffect
= new KeyframeEffect(element
, keyframes
, 2);
21 assert_not_equals(keyframeEffect
, undefined);
22 assert_equals(keyframeEffect
.constructor, KeyframeEffect
);
23 }, 'Calling new KeyframeEffect() with a duration input should create an keyframeEffect.');
26 var keyframeEffect
= new KeyframeEffect(element
, keyframes
);
27 assert_not_equals(keyframeEffect
, undefined);
28 assert_equals(keyframeEffect
.constructor, KeyframeEffect
);
29 }, 'Calling new KeyframeEffect() with no timing input should create an keyframeEffect.');
32 var keyframeEffect
= new KeyframeEffect(null, keyframes
);
33 assert_not_equals(keyframeEffect
, undefined);
34 assert_equals(keyframeEffect
.constructor, KeyframeEffect
);
35 }, 'Calling new KeyframeEffect() with no target should create an keyframeEffect.');