         () => { animation.pause(); },
                    'Expect InvalidStateError exception on calling pause() ' +
                    'from idle with a negative playbackRate and ' +
                'infinite-duration animation');
}, 'pause() from idle with a negative playbackRate and endless effect');

promise_test(t => {
  const div = createDiv(t);
  const animation = div.animate({}, 1000 * MS_PER_SEC);
  return animation.ready
    .then(animation => {
      animation.finish();
      animation.pause();