author | Brian Birtles <birtles@gmail.com> |
Wed, 18 Oct 2017 15:03:08 +0900 | |
changeset 683764 | 8c27b68144c9e1e65ce9cace87eddabe3d7f540d |
parent 683763 | 7b0b16ddc8c3ca29012441d332085a1703a3c8fc |
child 683765 | b50524555e5b095287d52c0b8e87e14f4813554d |
push id | 85456 |
push user | bmo:bbirtles@mozilla.com |
push date | Fri, 20 Oct 2017 06:31:55 +0000 |
reviewers | hiro |
bugs | 1398038 |
milestone | 58.0a1 |
--- a/testing/web-platform/meta/web-animations/interfaces/Animatable/animate.html.ini +++ b/testing/web-platform/meta/web-animations/interfaces/Animatable/animate.html.ini @@ -21,14 +21,20 @@ [Element.animate() accepts a property-indexed keyframe with an array of easings] expected: FAIL [Element.animate() accepts a property-indexed keyframe with an array of easings that is too short] expected: FAIL [Element.animate() accepts a property-indexed keyframe with an array of easings that is too long] expected: FAIL [Element.animate() accepts a property-indexed keyframe with an empty array of easings] expected: FAIL + [Element.animate() accepts a property-indexed keyframe with a composite array] + expected: FAIL + [Element.animate() accepts a property-indexed keyframe with a composite array that is too short] + expected: FAIL + [Element.animate() accepts a property-indexed keyframe with a composite array that is too long] + expected: FAIL [Element.animate() does not accept property-indexed keyframes not loosely sorted by offset] expected: FAIL [Element.animate() does not accept property-indexed keyframes not loosely sorted by offset even though not all offsets are specified] expected: FAIL [Element.animate() does not accept property-indexed keyframes with offsets out of range] expected: FAIL
--- a/testing/web-platform/meta/web-animations/interfaces/KeyframeEffect/constructor.html.ini +++ b/testing/web-platform/meta/web-animations/interfaces/KeyframeEffect/constructor.html.ini @@ -29,14 +29,26 @@ [a KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an array of easings that is too long] expected: FAIL [a KeyframeEffectReadOnly constructed with a property-indexed keyframe with an array of easings that is too long roundtrips] expected: FAIL [a KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with an empty array of easings] expected: FAIL [a KeyframeEffectReadOnly constructed with a property-indexed keyframe with an empty array of easings roundtrips] expected: FAIL + [a KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with a composite array] + expected: FAIL + [a KeyframeEffectReadOnly constructed with a property-indexed keyframe with a composite array roundtrips] + expected: FAIL + [a KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with a composite array that is too short] + expected: FAIL + [a KeyframeEffectReadOnly constructed with a property-indexed keyframe with a composite array that is too short roundtrips] + expected: FAIL + [a KeyframeEffectReadOnly can be constructed with a property-indexed keyframe with a composite array that is too long] + expected: FAIL + [a KeyframeEffectReadOnly constructed with a property-indexed keyframe with a composite array that is too long roundtrips] + expected: FAIL [KeyframeEffectReadOnly constructor throws with property-indexed keyframes not loosely sorted by offset] expected: FAIL [KeyframeEffectReadOnly constructor throws with property-indexed keyframes not loosely sorted by offset even though not all offsets are specified] expected: FAIL [KeyframeEffectReadOnly constructor throws with property-indexed keyframes with offsets out of range] expected: FAIL
--- a/testing/web-platform/meta/web-animations/interfaces/KeyframeEffect/setKeyframes.html.ini +++ b/testing/web-platform/meta/web-animations/interfaces/KeyframeEffect/setKeyframes.html.ini @@ -21,14 +21,20 @@ [Keyframes can be replaced with a property-indexed keyframe with an array of easings] expected: FAIL [Keyframes can be replaced with a property-indexed keyframe with an array of easings that is too short] expected: FAIL [Keyframes can be replaced with a property-indexed keyframe with an array of easings that is too long] expected: FAIL [Keyframes can be replaced with a property-indexed keyframe with an empty array of easings] expected: FAIL + [Keyframes can be replaced with a property-indexed keyframe with a composite array] + expected: FAIL + [Keyframes can be replaced with a property-indexed keyframe with a composite array that is too short] + expected: FAIL + [Keyframes can be replaced with a property-indexed keyframe with a composite array that is too long] + expected: FAIL [KeyframeEffect constructor throws with property-indexed keyframes not loosely sorted by offset] expected: FAIL [KeyframeEffect constructor throws with property-indexed keyframes not loosely sorted by offset even though not all offsets are specified] expected: FAIL [KeyframeEffect constructor throws with property-indexed keyframes with offsets out of range] expected: FAIL
--- a/testing/web-platform/tests/web-animations/resources/keyframe-tests.js +++ b/testing/web-platform/tests/web-animations/resources/keyframe-tests.js @@ -313,16 +313,71 @@ const gKeyframesTests = [ + ' long', input: { left: ['10px', '20px', '30px'], easing: ['steps(1)', 'steps(2)', 'steps(3)', 'steps(4)'] }, output: [keyframe(computedOffset(0), { left: '10px' }, 'steps(1)'), keyframe(computedOffset(0.5), { left: '20px' }, 'steps(2)'), keyframe(computedOffset(1), { left: '30px' }, 'steps(3)')], }, + // ----------- Property-indexed keyframes: composite handling ----------- + + { + desc: 'a property-indexed keyframe with a single composite operation', + input: { left: ['10px', '20px', '30px'], composite: 'add' }, + output: [keyframe(computedOffset(0), { left: '10px' }, 'linear', 'add'), + keyframe(computedOffset(0.5), { left: '20px' }, 'linear', 'add'), + keyframe(computedOffset(1), { left: '30px' }, 'linear', 'add')], + }, + { + desc: 'a property-indexed keyframe with a composite array', + input: { left: ['10px', '20px', '30px'], + composite: ['add', 'replace', 'accumulate'] }, + output: [keyframe(computedOffset(0), { left: '10px' }, + 'linear', 'add'), + keyframe(computedOffset(0.5), { left: '20px' }, + 'linear', 'replace'), + keyframe(computedOffset(1), { left: '30px' }, + 'linear', 'accumulate')], + }, + { + desc: 'a property-indexed keyframe with a composite array that is too' + + ' short', + input: { left: ['10px', '20px', '30px', '40px', '50px'], + composite: ['add', 'replace'] }, + output: [keyframe(computedOffset(0), { left: '10px' }, + 'linear', 'add'), + keyframe(computedOffset(0.25), { left: '20px' }, + 'linear', 'replace'), + keyframe(computedOffset(0.5), { left: '30px' }, + 'linear', 'add'), + keyframe(computedOffset(0.75), { left: '40px' }, + 'linear', 'replace'), + keyframe(computedOffset(1), { left: '50px' }, + 'linear', 'add')], + }, + { + desc: 'a property-indexed keyframe with a composite array that is too' + + ' long', + input: { left: ['10px', '20px'], + composite: ['add', 'replace', 'accumulate'] }, + output: [keyframe(computedOffset(0), { left: '10px' }, + 'linear', 'add'), + keyframe(computedOffset(1), { left: '20px' }, + 'linear', 'replace')], + }, + { + desc: 'a property-indexed keyframe with a single-element composite array', + input: { left: ['10px', '20px', '30px'], + composite: ['add'] }, + output: [keyframe(computedOffset(0), { left: '10px' }, 'linear', 'add'), + keyframe(computedOffset(0.5), { left: '20px' }, 'linear', 'add'), + keyframe(computedOffset(1), { left: '30px' }, 'linear', 'add')], + }, + // ----------- Keyframe sequence: property handling ----------- { desc: 'a one property one keyframe sequence', input: [{ offset: 1, left: '10px' }], output: [keyframe(offset(1), { left: '10px' })], }, { @@ -603,16 +658,27 @@ const gInvalidKeyframesTests = [ input: { easing: ['invalid'] }, }, { desc: 'a keyframe sequence with an invalid easing value', input: [ { opacity: 0, easing: 'jumpy' }, { opacity: 1 } ], }, { + desc: 'property-indexed keyframes with an invalid composite value', + input: { opacity: [ 0, 0.5, 1 ], + composite: 'alternate' }, + }, + { + desc: 'property-indexed keyframes with an invalid composite value as one' + + ' of the array values', + input: { opacity: [ 0, 0.5, 1 ], + composite: [ 'add', 'alternate' ] }, + }, + { desc: 'keyframes with an invalid composite value', input: [ { opacity: 0, composite: 'alternate' }, { opacity: 1 } ], }, ]; // ------------------------------ // KeyframeEffectOptions