Index: LayoutTests/web-animations-api/w3c/get-animation-players.html |
diff --git a/LayoutTests/web-animations-api/w3c/get-animation-players.html b/LayoutTests/web-animations-api/w3c/get-animation-players.html |
index 4f267bde6e85a146b96ffebe1cb16f23cad2bb8a..8e340e801059ddb16ab10738cbc5698f4a651e8c 100644 |
--- a/LayoutTests/web-animations-api/w3c/get-animation-players.html |
+++ b/LayoutTests/web-animations-api/w3c/get-animation-players.html |
@@ -11,98 +11,98 @@ var container = document.getElementById('container'); |
var element = document.getElementById('element'); |
test(function() { |
- assert_equals(document.timeline.getAnimationPlayers().length, 0); |
- assert_equals(container.getAnimationPlayers().length, 0); |
- assert_equals(element.getAnimationPlayers().length, 0); |
+ assert_equals(document.timeline.getAnimations().length, 0); |
+ assert_equals(container.getAnimations().length, 0); |
+ assert_equals(element.getAnimations().length, 0); |
- var player = element.animate([], 1000); |
- assert_equals(document.timeline.getAnimationPlayers().length, 1); |
- assert_equals(document.timeline.getAnimationPlayers()[0], player); |
+ var animation = element.animate([], 1000); |
+ assert_equals(document.timeline.getAnimations().length, 1); |
+ assert_equals(document.timeline.getAnimations()[0], animation); |
- var player2 = container.animate([], 1000); |
- assert_equals(document.timeline.getAnimationPlayers().length, 2); |
- assert_equals(document.timeline.getAnimationPlayers()[0], player); |
- assert_equals(document.timeline.getAnimationPlayers()[1], player2); |
+ var animation2 = container.animate([], 1000); |
+ assert_equals(document.timeline.getAnimations().length, 2); |
+ assert_equals(document.timeline.getAnimations()[0], animation); |
+ assert_equals(document.timeline.getAnimations()[1], animation2); |
- player.finish(); |
- assert_equals(document.timeline.getAnimationPlayers().length, 1); |
- assert_equals(document.timeline.getAnimationPlayers()[0], player2); |
+ animation.finish(); |
+ assert_equals(document.timeline.getAnimations().length, 1); |
+ assert_equals(document.timeline.getAnimations()[0], animation2); |
- player2.finish(); |
- assert_equals(document.timeline.getAnimationPlayers().length, 0); |
-}, 'Timeline getAnimationPlayers()'); |
+ animation2.finish(); |
+ assert_equals(document.timeline.getAnimations().length, 0); |
+}, 'Timeline getAnimations()'); |
test(function() { |
- assert_equals(document.timeline.getAnimationPlayers().length, 0); |
- assert_equals(container.getAnimationPlayers().length, 0); |
- assert_equals(element.getAnimationPlayers().length, 0); |
- |
- var player = element.animate([], 1000); |
- assert_equals(document.timeline.getAnimationPlayers().length, 1); |
- assert_equals(document.timeline.getAnimationPlayers()[0], player); |
- assert_equals(container.getAnimationPlayers().length, 0); |
- assert_equals(element.getAnimationPlayers().length, 1); |
- assert_equals(element.getAnimationPlayers()[0], player); |
- |
- var player2 = container.animate([], 1000); |
- assert_equals(document.timeline.getAnimationPlayers().length, 2); |
- assert_equals(document.timeline.getAnimationPlayers()[0], player); |
- assert_equals(document.timeline.getAnimationPlayers()[1], player2); |
- assert_equals(container.getAnimationPlayers().length, 1); |
- assert_equals(container.getAnimationPlayers()[0], player2); |
- assert_equals(element.getAnimationPlayers().length, 1); |
- assert_equals(element.getAnimationPlayers()[0], player); |
- |
- player.finish(); |
- assert_equals(document.timeline.getAnimationPlayers().length, 1); |
- assert_equals(document.timeline.getAnimationPlayers()[0], player2); |
- assert_equals(container.getAnimationPlayers().length, 1); |
- assert_equals(container.getAnimationPlayers()[0], player2); |
- assert_equals(element.getAnimationPlayers().length, 0); |
- |
- player2.finish(); |
- assert_equals(document.timeline.getAnimationPlayers().length, 0); |
- assert_equals(container.getAnimationPlayers().length, 0); |
- assert_equals(element.getAnimationPlayers().length, 0); |
- |
-}, 'Animatable getAnimationPlayers()'); |
+ assert_equals(document.timeline.getAnimations().length, 0); |
+ assert_equals(container.getAnimations().length, 0); |
+ assert_equals(element.getAnimations().length, 0); |
+ |
+ var animation = element.animate([], 1000); |
+ assert_equals(document.timeline.getAnimations().length, 1); |
+ assert_equals(document.timeline.getAnimations()[0], animation); |
+ assert_equals(container.getAnimations().length, 0); |
+ assert_equals(element.getAnimations().length, 1); |
+ assert_equals(element.getAnimations()[0], animation); |
+ |
+ var animation2 = container.animate([], 1000); |
+ assert_equals(document.timeline.getAnimations().length, 2); |
+ assert_equals(document.timeline.getAnimations()[0], animation); |
+ assert_equals(document.timeline.getAnimations()[1], animation2); |
+ assert_equals(container.getAnimations().length, 1); |
+ assert_equals(container.getAnimations()[0], animation2); |
+ assert_equals(element.getAnimations().length, 1); |
+ assert_equals(element.getAnimations()[0], animation); |
+ |
+ animation.finish(); |
+ assert_equals(document.timeline.getAnimations().length, 1); |
+ assert_equals(document.timeline.getAnimations()[0], animation2); |
+ assert_equals(container.getAnimations().length, 1); |
+ assert_equals(container.getAnimations()[0], animation2); |
+ assert_equals(element.getAnimations().length, 0); |
+ |
+ animation2.finish(); |
+ assert_equals(document.timeline.getAnimations().length, 0); |
+ assert_equals(container.getAnimations().length, 0); |
+ assert_equals(element.getAnimations().length, 0); |
+ |
+}, 'Animatable getAnimations()'); |
test(function() { |
- assert_equals(document.timeline.getAnimationPlayers().length, 0); |
- assert_equals(container.getAnimationPlayers().length, 0); |
- assert_equals(element.getAnimationPlayers().length, 0); |
+ assert_equals(document.timeline.getAnimations().length, 0); |
+ assert_equals(container.getAnimations().length, 0); |
+ assert_equals(element.getAnimations().length, 0); |
- var player = element.animate([], {duration: 1000, delay: 500}); |
- assert_equals(document.timeline.getAnimationPlayers().length, 1); |
- assert_equals(document.timeline.getAnimationPlayers()[0], player); |
- assert_equals(container.getAnimationPlayers().length, 0); |
- assert_equals(element.getAnimationPlayers().length, 1); |
- assert_equals(element.getAnimationPlayers()[0], player); |
+ var animation = element.animate([], {duration: 1000, delay: 500}); |
+ assert_equals(document.timeline.getAnimations().length, 1); |
+ assert_equals(document.timeline.getAnimations()[0], animation); |
+ assert_equals(container.getAnimations().length, 0); |
+ assert_equals(element.getAnimations().length, 1); |
+ assert_equals(element.getAnimations()[0], animation); |
- player.finish(); |
- assert_equals(document.timeline.getAnimationPlayers().length, 0); |
- assert_equals(container.getAnimationPlayers().length, 0); |
- assert_equals(element.getAnimationPlayers().length, 0); |
+ animation.finish(); |
+ assert_equals(document.timeline.getAnimations().length, 0); |
+ assert_equals(container.getAnimations().length, 0); |
+ assert_equals(element.getAnimations().length, 0); |
-}, 'getAnimationPlayers() with delays'); |
+}, 'getAnimations() with delays'); |
test(function() { |
- assert_equals(document.timeline.getAnimationPlayers().length, 0); |
- assert_equals(container.getAnimationPlayers().length, 0); |
- assert_equals(element.getAnimationPlayers().length, 0); |
- |
- var player = element.animate([], {duration: 1000, delay: 500, fill: 'both'}); |
- assert_equals(document.timeline.getAnimationPlayers().length, 1); |
- assert_equals(document.timeline.getAnimationPlayers()[0], player); |
- assert_equals(container.getAnimationPlayers().length, 0); |
- assert_equals(element.getAnimationPlayers().length, 1); |
- assert_equals(element.getAnimationPlayers()[0], player); |
- |
- player.finish(); |
- assert_equals(document.timeline.getAnimationPlayers().length, 1); |
- // assert_equals(container.getAnimationPlayers().length, 1); |
- // assert_equals(element.getAnimationPlayers().length, 1); |
- |
-}, 'getAnimationPlayers() - in effect animations'); |
+ assert_equals(document.timeline.getAnimations().length, 0); |
+ assert_equals(container.getAnimations().length, 0); |
+ assert_equals(element.getAnimations().length, 0); |
+ |
+ var animation = element.animate([], {duration: 1000, delay: 500, fill: 'both'}); |
+ assert_equals(document.timeline.getAnimations().length, 1); |
+ assert_equals(document.timeline.getAnimations()[0], animation); |
+ assert_equals(container.getAnimations().length, 0); |
+ assert_equals(element.getAnimations().length, 1); |
+ assert_equals(element.getAnimations()[0], animation); |
+ |
+ animation.finish(); |
+ assert_equals(document.timeline.getAnimations().length, 1); |
+ // assert_equals(container.getAnimations().length, 1); |
+ // assert_equals(element.getAnimations().length, 1); |
+ |
+}, 'getAnimations() - in effect animations'); |
</script> |