ar directions = ["normal", "reverse", "alternate", "alternate-reverse"];

for (var i = 0; i < directions.length; i++) {
  var dir = directions[i];
  var container = document.getElementById(containers[i]);

  document.timeline.play(
      new AnimationGroup([
          // Test basic use.
          new Animation(container.getElementsByClassName("a")[0],
              [{left: "100px"}, {left: "300px"}],
              {duration: 1 * 1000, iterations: 3.4, fill: 'forwards'}),
          // Test integer iterations