2 <script src=
"../../resources/testharness.js"></script>
3 <script src=
"../../resources/testharnessreport.js"></script>
4 <script src=
"resources/keyframes-test.js"></script>
7 assertAnimationStyles([
8 {opacity
: '0.25', left
: '25px', offset
: 0},
9 {opacity
: '0.75', left
: '75px'},
11 0.5: {opacity
: '0.5', left
: '50px'},
13 assertAnimationStyles([
14 {opacity
: '0.25', left
: '25px'},
15 {opacity
: '0.75', left
: '75px', offset
: 1},
17 0.5: {opacity
: '0.5', left
: '50px'},
20 'element.animate() with 2 keyframes and 1 offset specified',
22 help
: 'http://dev.w3.org/fxtf/web-animations/#keyframe-animation-effects',
24 'element.animate() should start an animation when two keyframes',
25 'are provided with matching properties and one offset is specified.',
27 author
: 'Alan Cutter',
31 assertAnimationStyles([
32 {opacity
: '0.25', left
: '25px', offset
: 0},
33 {opacity
: '0.75', left
: '75px', offset
: 1},
35 0.5: {opacity
: '0.5', left
: '50px'},
38 assert_throws('InvalidModificationError', function() {
39 assertAnimationStyles([
40 {opacity
: '0.75', left
: '75px', offset
: 1},
41 {opacity
: '0.25', left
: '25px', offset
: 0},
43 0.5: {opacity
: '0.5', left
: '50px'},
47 'element.animate() with 2 keyframes and 2 offsets specified',
49 help
: 'http://dev.w3.org/fxtf/web-animations/#keyframe-animation-effects',
51 'element.animate() should start an animation when two keyframes',
52 'are provided with matching properties and both offsets specified.',
54 author
: 'Alan Cutter',