Chromium Code Reviews| Index: LayoutTests/web-animations-api/element-animate-list-of-keyframes.html |
| diff --git a/LayoutTests/web-animations-api/element-animate-list-of-keyframes.html b/LayoutTests/web-animations-api/element-animate-list-of-keyframes.html |
| index 35c06e8e94dbd660dfbd4eb1b061f4f6e3d0eb3b..bb03f237092f94ef1b2ae2a8c4f31ea7d60f4a35 100644 |
| --- a/LayoutTests/web-animations-api/element-animate-list-of-keyframes.html |
| +++ b/LayoutTests/web-animations-api/element-animate-list-of-keyframes.html |
| @@ -50,6 +50,26 @@ test(function() { |
| assert_equals(e2Style.backgroundColor, 'rgb(64, 64, 64)'); |
| }, 'Calling animate() should start an animation. CamelCase property names should be parsed.'); |
| +test(function() { |
| + var player = e1.animate([ |
| + {opacity: '0.5', offset: 0.5}, |
| + {opacity: '1', offset: 1}, |
| + {opacity: '0', offset: 0} |
| + ], durationValue); |
| + player.pause(); |
| + player.currentTime = durationValue / 4; |
| + assert_equals(e1Style.opacity, '0.25'); |
| +}, 'Keyframes with offsets should become sorted by offset.'); |
| + |
| +test(function() { |
| + var keyframes = [ |
| + {opacity: '0.5'}, |
|
dstockwell
2014/04/29 03:58:43
Do we have a test where offset is explicitly set t
Eric Willigers
2014/04/29 07:34:44
Done.
|
| + {opacity: '1', offset: 1}, |
| + {opacity: '0', offset: 0} |
| + ]; |
| + assert_throws('InvalidModificationError', function() { e1.animate(keyframes, durationValue); }); |
| +}, 'Should throw when keyframes are not loosely sorted and any have no offset.'); |
| + |
| var keyframesWithInvalid = [ |
| {width: '0px', backgroundColor: 'octarine', offset: 0}, |
| {width: '1000px', foo: 'bar', offset: 1}]; |