| Index: third_party/WebKit/LayoutTests/web-animations-api/infinite-end-time.html
|
| diff --git a/third_party/WebKit/LayoutTests/web-animations-api/infinite-end-time.html b/third_party/WebKit/LayoutTests/web-animations-api/infinite-end-time.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5c5e2cefcf71af670461f8ebc3606cb30d36b809
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/web-animations-api/infinite-end-time.html
|
| @@ -0,0 +1,54 @@
|
| +<!DOCTYPE html>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<body>
|
| +<script>
|
| +function infiniteAnimation() {
|
| + var anim = document.body.animate([],
|
| + {duration: 1000, iterations: Infinity});
|
| + anim.cancel();
|
| + return anim;
|
| +}
|
| +
|
| +test(function() {
|
| + var anim = infiniteAnimation();
|
| + try {
|
| + anim.finish();
|
| + assert_unreached();
|
| + } catch (e) {
|
| + assert_equals(e.code, DOMException.INVALID_STATE_ERR);
|
| + }
|
| +}, "finishing an infinite animation");
|
| +
|
| +test(function() {
|
| + var anim = infiniteAnimation();
|
| + anim.playbackRate = -1;
|
| + try {
|
| + anim.pause();
|
| + assert_unreached();
|
| + } catch (e) {
|
| + assert_equals(e.code, DOMException.INVALID_STATE_ERR);
|
| + }
|
| +}, "pausing a reversed infinite animation");
|
| +
|
| +test(function() {
|
| + var anim = infiniteAnimation();
|
| + anim.playbackRate = -1;
|
| + try {
|
| + anim.play();
|
| + assert_unreached();
|
| + } catch (e) {
|
| + assert_equals(e.code, DOMException.INVALID_STATE_ERR);
|
| + }
|
| +}, "playing a reversed infinite animation");
|
| +
|
| +test(function() {
|
| + var anim = infiniteAnimation();
|
| + try {
|
| + anim.reverse();
|
| + assert_unreached();
|
| + } catch (e) {
|
| + assert_equals(e.code, DOMException.INVALID_STATE_ERR);
|
| + }
|
| +}, "reversing an infinite animation");
|
| +</script>
|
|
|