dom/animation/test/css-animations/file_animation-id.html
author Mantaroh Yoshinaga <mantaroh@gmail.com>
Wed, 20 Apr 2016 08:26:43 +0900
changeset 331843 6429259544970b9c6121159e14cbe092c839da71
parent 331841 1b9787fb3e8b6ab7d9ce0a290c5675848563eb25
child 355138 de68ac5bf9e4f75b4116d41ec4992edf4391163c
permissions -rw-r--r--
Bug 1260084 - Part3.Remove unnecessary css animation mochitest. r=birtles MozReview-Commit-ID: JgplbS9F57L

<!doctype html>
<meta charset=utf-8>
<script src="../testcommon.js"></script>
<style>
@keyframes abc { }
</style>
<body>
<script>
'use strict';

test(function(t) {
  var div = addDiv(t);
  div.style.animation = 'abc 100s';
  var animation = div.getAnimations()[0];
  assert_equals(animation.id, '', 'id for CSS Animation is initially empty');
  animation.id = 'anim'

  assert_equals(animation.id, 'anim', 'animation.id reflects the value set');
}, 'Animation.id for CSS Animations');

test(function(t) {
  var div = addDiv(t);
  var animation = div.animate({}, 100 * MS_PER_SEC);
  assert_equals(animation.id, '', 'id for CSS Animation is initially empty');
  animation.id = 'anim'

  assert_equals(animation.id, 'anim', 'animation.id reflects the value set');
}, 'Animation.id for CSS Animations');
done();
</script>
</body>
</html>