| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2015 Google Inc. All rights reserved. | 2 * Copyright (C) 2015 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 [property]: from, | 143 [property]: from, |
| 144 }); | 144 }); |
| 145 } | 145 } |
| 146 if (!isNeutralKeyframe(to)) { | 146 if (!isNeutralKeyframe(to)) { |
| 147 keyframes.push({ | 147 keyframes.push({ |
| 148 offset: 1, | 148 offset: 1, |
| 149 composite: toComposite, | 149 composite: toComposite, |
| 150 [property]: to, | 150 [property]: to, |
| 151 }); | 151 }); |
| 152 } | 152 } |
| 153 target.animate(keyframes, { | 153 var animation = target.animate(keyframes, { |
| 154 fill: 'forwards', | 154 fill: 'forwards', |
| 155 duration: 1, | 155 duration: 1, |
| 156 easing: createEasing(at), | 156 easing: createEasing(at), |
| 157 delay: -0.5, | |
| 158 iterations: 0.5, | |
| 159 }); | 157 }); |
| 158 animation.pause(); |
| 159 animation.currentTime = 0.5; |
| 160 }, | 160 }, |
| 161 rebaseline: false, | 161 rebaseline: false, |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 function expectFlip(from, to, flipAt) { | 164 function expectFlip(from, to, flipAt) { |
| 165 return [-0.3, 0, 0.3, 0.5, 0.6, 1, 1.5].map(function(at) { | 165 return [-0.3, 0, 0.3, 0.5, 0.6, 1, 1.5].map(function(at) { |
| 166 return { | 166 return { |
| 167 at: at, | 167 at: at, |
| 168 is: at < flipAt ? from : to | 168 is: at < flipAt ? from : to |
| 169 }; | 169 }; |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 asyncHandle.done() | 442 asyncHandle.done() |
| 443 }); | 443 }); |
| 444 }); | 444 }); |
| 445 | 445 |
| 446 window.assertInterpolation = assertInterpolation; | 446 window.assertInterpolation = assertInterpolation; |
| 447 window.assertNoInterpolation = assertNoInterpolation; | 447 window.assertNoInterpolation = assertNoInterpolation; |
| 448 window.assertComposition = assertComposition; | 448 window.assertComposition = assertComposition; |
| 449 window.afterTest = afterTest; | 449 window.afterTest = afterTest; |
| 450 window.neutralKeyframe = neutralKeyframe; | 450 window.neutralKeyframe = neutralKeyframe; |
| 451 })(); | 451 })(); |
| OLD | NEW |