2 <script src=
"../../../resources/testharness.js"></script>
3 <script src=
"../../../resources/testharnessreport.js"></script>
10 var element
= document
.getElementById('e');
13 var replaceReplaceKeyframes
= [
14 {width
: '0px', composite
: 'replace'},
15 {width
: '100px', composite
: 'replace'}
18 assert_not_equals(element
.animate(replaceReplaceKeyframes
), undefined);
19 }, 'Calling element.animate() with a replace -> replace animation should create an animation.');
22 var addAddKeyframes
= [
23 {width
: '0px', composite
: 'add'},
24 {width
: '100px', composite
: 'add'}
27 assert_throws('NOT_SUPPORTED_ERR', function() { element
.animate(addAddKeyframes
); });
28 }, 'Calling element.animate() with an add -> add animation should throw a NotSupportedError.');
31 var replaceAddKeyframes
= [
32 {width
: '0px', composite
: 'replace'},
33 {width
: '100px', composite
: 'add'}
36 assert_throws('NOT_SUPPORTED_ERR', function() { element
.animate(replaceAddKeyframes
); });
37 }, 'Calling element.animate() with a replace -> add animation should throw a NotSupportedError.');
40 var addReplaceKeyframes
= [
41 {width
: '0px', composite
: 'add'},
42 {width
: '100px', composite
: 'replace'}
45 assert_throws('NOT_SUPPORTED_ERR', function() { element
.animate(addReplaceKeyframes
); });
46 }, 'Calling element.animate() with an add -> replace animation should throw a NotSupportedError.');