| Index: third_party/WebKit/LayoutTests/web-animations-api/w3c/get-animations.html
|
| diff --git a/third_party/WebKit/LayoutTests/web-animations-api/w3c/get-animation-players.html b/third_party/WebKit/LayoutTests/web-animations-api/w3c/get-animations.html
|
| similarity index 50%
|
| rename from third_party/WebKit/LayoutTests/web-animations-api/w3c/get-animation-players.html
|
| rename to third_party/WebKit/LayoutTests/web-animations-api/w3c/get-animations.html
|
| index 8e340e801059ddb16ab10738cbc5698f4a651e8c..761e7a55c1c45bc7c15cf623d95efdb4f90b185f 100644
|
| --- a/third_party/WebKit/LayoutTests/web-animations-api/w3c/get-animation-players.html
|
| +++ b/third_party/WebKit/LayoutTests/web-animations-api/w3c/get-animations.html
|
| @@ -1,4 +1,7 @@
|
| <!DOCTYPE html>
|
| +<meta charset=utf-8>
|
| +<title>Get Animations</title>
|
| +<link rel="help" href="https://w3c.github.io/web-animations/#dom-document-getanimations">
|
| <script src="../../resources/testharness.js"></script>
|
| <script src="../../resources/testharnessreport.js"></script>
|
| <div id='container'>
|
| @@ -11,98 +14,77 @@ var container = document.getElementById('container');
|
| var element = document.getElementById('element');
|
|
|
| test(function() {
|
| - assert_equals(document.timeline.getAnimations().length, 0);
|
| + assert_equals(document.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);
|
| -
|
| - 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);
|
| -
|
| - animation.finish();
|
| - assert_equals(document.timeline.getAnimations().length, 1);
|
| - assert_equals(document.timeline.getAnimations()[0], animation2);
|
| -
|
| - animation2.finish();
|
| - assert_equals(document.timeline.getAnimations().length, 0);
|
| -}, 'Timeline getAnimations()');
|
| -
|
| -test(function() {
|
| - 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(document.getAnimations().length, 1);
|
| + assert_equals(document.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(document.getAnimations().length, 2);
|
| + assert_equals(document.getAnimations()[0], animation);
|
| + assert_equals(document.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(document.getAnimations().length, 1);
|
| + assert_equals(document.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(document.getAnimations().length, 0);
|
| assert_equals(container.getAnimations().length, 0);
|
| assert_equals(element.getAnimations().length, 0);
|
|
|
| -}, 'Animatable getAnimations()');
|
| +}, 'getAnimations() normal behaviour (without delays)');
|
|
|
| test(function() {
|
| - assert_equals(document.timeline.getAnimations().length, 0);
|
| + assert_equals(document.getAnimations().length, 0);
|
| assert_equals(container.getAnimations().length, 0);
|
| assert_equals(element.getAnimations().length, 0);
|
|
|
| var animation = element.animate([], {duration: 1000, delay: 500});
|
| - assert_equals(document.timeline.getAnimations().length, 1);
|
| - assert_equals(document.timeline.getAnimations()[0], animation);
|
| + assert_equals(document.getAnimations().length, 1);
|
| + assert_equals(document.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, 0);
|
| + assert_equals(document.getAnimations().length, 0);
|
| assert_equals(container.getAnimations().length, 0);
|
| assert_equals(element.getAnimations().length, 0);
|
|
|
| -}, 'getAnimations() with delays');
|
| +}, 'getAnimations() with animation delays');
|
|
|
| test(function() {
|
| - assert_equals(document.timeline.getAnimations().length, 0);
|
| + assert_equals(document.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(document.getAnimations().length, 1);
|
| + assert_equals(document.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);
|
| + assert_equals(document.getAnimations().length, 1);
|
| + assert_equals(container.getAnimations().length, 0);
|
| + assert_equals(element.getAnimations().length, 1);
|
| +
|
| +}, 'getAnimations() with in effect animations');
|
|
|
| -}, 'getAnimations() - in effect animations');
|
|
|
| </script>
|
|
|