author | Brian Birtles <birtles@gmail.com> |
Wed, 08 Feb 2017 09:25:26 +0900 | |
changeset 341309 | 03f791909447fc2f21eb6527b60f643f4ffad51d |
parent 341308 | e3d24805064d2a40e5278dc591790a670a21ee67 |
child 341310 | a873e39adee42e652f02b68330c703569b1c3ceb |
push id | 86684 |
push user | cbook@mozilla.com |
push date | Wed, 08 Feb 2017 10:31:03 +0000 |
treeherder | mozilla-inbound@c5b88e4e70f4 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | hiro |
bugs | 1332206 |
milestone | 54.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -120073,28 +120073,34 @@ ] ], "web-animations/animation-model/keyframe-effects/effect-value-context.html": [ [ "/web-animations/animation-model/keyframe-effects/effect-value-context.html", {} ] ], + "web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes.html": [ + [ + "/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes.html", + {} + ] + ], + "web-animations/animation-model/keyframe-effects/effect-value-visibility.html": [ + [ + "/web-animations/animation-model/keyframe-effects/effect-value-visibility.html", + {} + ] + ], "web-animations/animation-model/keyframe-effects/spacing-keyframes.html": [ [ "/web-animations/animation-model/keyframe-effects/spacing-keyframes.html", {} ] ], - "web-animations/animation-model/keyframe-effects/the-effect-value-of-a-keyframe-effect.html": [ - [ - "/web-animations/animation-model/keyframe-effects/the-effect-value-of-a-keyframe-effect.html", - {} - ] - ], "web-animations/interfaces/Animatable/animate.html": [ [ "/web-animations/interfaces/Animatable/animate.html", {} ] ], "web-animations/interfaces/Animation/cancel.html": [ [ @@ -203720,24 +203726,28 @@ "web-animations/animation-model/combining-effects/effect-composition.html": [ "8ac06085132d822e908d48de4c1109b66323f19f", "testharness" ], "web-animations/animation-model/keyframe-effects/effect-value-context.html": [ "10d9ee521240475a1729c2facfcea8b50342614e", "testharness" ], + "web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes.html": [ + "a79db70a385ad767263f285c9401b66611087e42", + "testharness" + ], + "web-animations/animation-model/keyframe-effects/effect-value-visibility.html": [ + "4f13a1b0dd656f5d51e3a5ea6795f13bdfa20905", + "testharness" + ], "web-animations/animation-model/keyframe-effects/spacing-keyframes.html": [ "318bc877791852b0829a3e10cb19e2a20a15adab", "testharness" ], - "web-animations/animation-model/keyframe-effects/the-effect-value-of-a-keyframe-effect.html": [ - "b87824689825406a384d2e8afeac54c790ed16e0", - "testharness" - ], "web-animations/interfaces/Animatable/animate.html": [ "d2d57b1fe0bd5b6da4c44c569ff7dcf802298919", "testharness" ], "web-animations/interfaces/Animation/cancel.html": [ "a28589129c6a2665295695f786b7beb2dd887fb3", "testharness" ],
rename from testing/web-platform/tests/web-animations/animation-model/keyframe-effects/the-effect-value-of-a-keyframe-effect.html rename to testing/web-platform/tests/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes.html --- a/testing/web-platform/tests/web-animations/animation-model/keyframe-effects/the-effect-value-of-a-keyframe-effect.html +++ b/testing/web-platform/tests/web-animations/animation-model/keyframe-effects/effect-value-overlapping-keyframes.html @@ -1,11 +1,11 @@ <!DOCTYPE html> <meta charset=utf-8> -<title>Keyframe handling tests</title> +<title>Effect value computation tests when keyframes overlap</title> <link rel="help" href="https://w3c.github.io/web-animations/#the-effect-value-of-a-keyframe-animation-effect"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="../../testcommon.js"></script> <body> <div id="log"></div> <div id="target"></div> <script> @@ -64,51 +64,10 @@ test(function(t) { + ' overlap point should be used as interval startpoint'); anim.currentTime = 750; assert_equals(getComputedStyle(div).opacity, '0.85', 'After the overlap point, the last keyframe from the' + ' overlap point should be used as interval startpoint'); }, 'Overlapping keyframes between 0 and 1 use the appropriate value on each' + ' side of the overlap point'); -test(function(t) { - var div = createDiv(t); - var anim = div.animate({ visibility: ['hidden','visible'] }, - { duration: 100 * MS_PER_SEC, fill: 'both' }); - - anim.currentTime = 0; - assert_equals(getComputedStyle(div).visibility, 'hidden', - 'Visibility when progress = 0.'); - - anim.currentTime = 10 * MS_PER_SEC + 1; - assert_equals(getComputedStyle(div).visibility, 'visible', - 'Visibility when progress > 0 due to linear easing.'); - - anim.finish(); - assert_equals(getComputedStyle(div).visibility, 'visible', - 'Visibility when progress = 1.'); - -}, "Test visibility clamping behavior."); - -test(function(t) { - var div = createDiv(t); - var anim = div.animate({ visibility: ['hidden', 'visible'] }, - { duration: 100 * MS_PER_SEC, fill: 'both', - easing: 'cubic-bezier(0.25, -0.6, 0, 0.5)' }); - - anim.currentTime = 0; - assert_equals(getComputedStyle(div).visibility, 'hidden', - 'Visibility when progress = 0.'); - - // Timing function is below zero. So we expected visibility is hidden. - anim.currentTime = 10 * MS_PER_SEC + 1; - assert_equals(getComputedStyle(div).visibility, 'hidden', - 'Visibility when progress < 0 due to cubic-bezier easing.'); - - anim.currentTime = 60 * MS_PER_SEC; - assert_equals(getComputedStyle(div).visibility, 'visible', - 'Visibility when progress > 0 due to cubic-bezier easing.'); - -}, "Test visibility clamping behavior with an easing that has a negative component"); - -done(); </script> </body>
copy from testing/web-platform/tests/web-animations/animation-model/keyframe-effects/the-effect-value-of-a-keyframe-effect.html copy to testing/web-platform/tests/web-animations/animation-model/keyframe-effects/effect-value-visibility.html --- a/testing/web-platform/tests/web-animations/animation-model/keyframe-effects/the-effect-value-of-a-keyframe-effect.html +++ b/testing/web-platform/tests/web-animations/animation-model/keyframe-effects/effect-value-visibility.html @@ -1,81 +1,23 @@ <!DOCTYPE html> <meta charset=utf-8> -<title>Keyframe handling tests</title> +<title>Effect value computation tests for 'visibility' property</title> <link rel="help" href="https://w3c.github.io/web-animations/#the-effect-value-of-a-keyframe-animation-effect"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="../../testcommon.js"></script> <body> <div id="log"></div> <div id="target"></div> <script> 'use strict'; test(function(t) { var div = createDiv(t); - var anim = div.animate([ { offset: 0, opacity: 0 }, - { offset: 0, opacity: 0.1 }, - { offset: 0, opacity: 0.2 }, - { offset: 1, opacity: 0.8 }, - { offset: 1, opacity: 0.9 }, - { offset: 1, opacity: 1 } ], - { duration: 1000, - easing: 'cubic-bezier(0.5, -0.5, 0.5, 1.5)' }); - assert_equals(getComputedStyle(div).opacity, '0.2', - 'When progress is zero the last keyframe with offset 0 should' - + ' be used'); - // http://cubic-bezier.com/#.5,-0.5,.5,1.5 - // At t=0.15, the progress should be negative - anim.currentTime = 150; - assert_equals(getComputedStyle(div).opacity, '0', - 'When progress is negative, the first keyframe with a 0 offset' - + ' should be used'); - // At t=0.71, the progress should be just less than 1 - anim.currentTime = 710; - assert_approx_equals(parseFloat(getComputedStyle(div).opacity), 0.8, 0.01, - 'When progress is just less than 1, the first keyframe with an' - + ' offset of 1 should be used as the interval endpoint'); - // At t=0.85, the progress should be > 1 - anim.currentTime = 850; - assert_equals(getComputedStyle(div).opacity, '1', - 'When progress is greater than 1.0, the last keyframe with a 1' - + ' offset should be used'); - anim.finish(); - assert_equals(getComputedStyle(div).opacity, '1', - 'When progress is equal to 1.0, the last keyframe with a 1' - + ' offset should be used'); -}, 'Overlapping keyframes at 0 and 1 use the appropriate value when the' - + ' progress is outside the range [0, 1]'); - -test(function(t) { - var div = createDiv(t); - var anim = div.animate([ { offset: 0, opacity: 0 }, - { offset: 0.5, opacity: 0.3 }, - { offset: 0.5, opacity: 0.5 }, - { offset: 0.5, opacity: 0.7 }, - { offset: 1, opacity: 1 } ], 1000); - anim.currentTime = 250; - assert_equals(getComputedStyle(div).opacity, '0.15', - 'Before the overlap point, the first keyframe from the' - + ' overlap point should be used as interval endpoint'); - anim.currentTime = 500; - assert_equals(getComputedStyle(div).opacity, '0.7', - 'At the overlap point, the last keyframe from the' - + ' overlap point should be used as interval startpoint'); - anim.currentTime = 750; - assert_equals(getComputedStyle(div).opacity, '0.85', - 'After the overlap point, the last keyframe from the' - + ' overlap point should be used as interval startpoint'); -}, 'Overlapping keyframes between 0 and 1 use the appropriate value on each' - + ' side of the overlap point'); - -test(function(t) { - var div = createDiv(t); var anim = div.animate({ visibility: ['hidden','visible'] }, { duration: 100 * MS_PER_SEC, fill: 'both' }); anim.currentTime = 0; assert_equals(getComputedStyle(div).visibility, 'hidden', 'Visibility when progress = 0.'); anim.currentTime = 10 * MS_PER_SEC + 1; @@ -104,11 +46,10 @@ test(function(t) { 'Visibility when progress < 0 due to cubic-bezier easing.'); anim.currentTime = 60 * MS_PER_SEC; assert_equals(getComputedStyle(div).visibility, 'visible', 'Visibility when progress > 0 due to cubic-bezier easing.'); }, "Test visibility clamping behavior with an easing that has a negative component"); -done(); </script> </body>