From 0250695f7d87a17d8ba8e4f9a70673594cd9d0f4 Mon Sep 17 00:00:00 2001 From: Daisuke Akatsuka Date: Fri, 15 Apr 2016 20:55:25 +0900 Subject: [PATCH] Bug 1244643 - Part 2: Append tests for easing. r=hiro MozReview-Commit-ID: 3RYWjsViwJZ --HG-- extra : rebase_source : fd62be7ed619ab846d04691ac2c0a64701e71ff4 --- .../test/chrome/test_animation_observers.html | 23 ++++ testing/web-platform/meta/MANIFEST.json | 4 + .../animation-effect-timing/easing.html | 126 ++++++++++++++++++ 3 files changed, 153 insertions(+) create mode 100644 testing/web-platform/tests/web-animations/animation-effect-timing/easing.html diff --git a/dom/animation/test/chrome/test_animation_observers.html b/dom/animation/test/chrome/test_animation_observers.html index 3531ba8bc25c..dc7fd29a19d5 100644 --- a/dom/animation/test/chrome/test_animation_observers.html +++ b/dom/animation/test/chrome/test_animation_observers.html @@ -1669,6 +1669,29 @@ addAsyncAnimTest("change_delay", "records after animation end"); }); +addAsyncAnimTest("change_easing", + { observe: div, subtree: true }, function*() { + var anim = div.animate({ opacity: [ 0, 1 ] }, + { duration: 100 * MS_PER_SEC, + easing: "steps(2, start)" }); + + yield await_frame(); + assert_records([{ added: [anim], changed: [], removed: [] }], + "records after animation is added"); + + anim.effect.timing.easing = "steps(2, end)"; + yield await_frame(); + assert_records([{ added: [], changed: [anim], removed: [] }], + "records after easing is changed"); + + anim.effect.timing.easing = "steps(2, end)"; + yield await_frame(); + assert_records([], "records after assigning same value"); + + anim.cancel(); + yield await_frame(); +}); + addAsyncAnimTest("negative_delay_in_constructor", { observe: div, subtree: true }, function*() { var anim = div.animate({ opacity: [ 0, 1 ] }, diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index 0284e778aa71..58043b774874 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -28745,6 +28745,10 @@ "path": "web-animations/animation-effect-timing/duration.html", "url": "/web-animations/animation-effect-timing/duration.html" }, + { + "path": "web-animations/animation-effect-timing/easing.html", + "url": "/web-animations/animation-effect-timing/easing.html" + }, { "path": "web-animations/animation-effect-timing/endDelay.html", "url": "/web-animations/animation-effect-timing/endDelay.html" diff --git a/testing/web-platform/tests/web-animations/animation-effect-timing/easing.html b/testing/web-platform/tests/web-animations/animation-effect-timing/easing.html new file mode 100644 index 000000000000..b157baaca229 --- /dev/null +++ b/testing/web-platform/tests/web-animations/animation-effect-timing/easing.html @@ -0,0 +1,126 @@ + + +easing tests + + + + + +
+ +