| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <body> | 3 <body> |
| 4 <template id="target-template"> | 4 <template id="target-template"> |
| 5 <svg width="90" height="90"> | 5 <svg width="0" height="0"> |
| 6 <text class="target" /> | 6 <rect class="target"/> |
| 7 </svg> | 7 </svg> |
| 8 </template> | 8 </template> |
| 9 <script src="../svg-attribute-interpolation/resources/interpolation-test.js"></s
cript> | 9 <script src="../svg-attribute-interpolation/resources/interpolation-test.js"></s
cript> |
| 10 <script> | 10 <script> |
| 11 'use strict'; | 11 'use strict'; |
| 12 |
| 12 assertAttributeInterpolation({ | 13 assertAttributeInterpolation({ |
| 13 property: 'textLength', | 14 property: 'y', |
| 14 underlying: '2', | 15 underlying: '2', |
| 15 from: '-1', | 16 from: '-1', |
| 16 fromComposite: 'add', | 17 fromComposite: 'add', |
| 17 to: '4', | 18 to: '4', |
| 18 toComposite: 'add' | 19 toComposite: 'add' |
| 19 }, [ | 20 }, [ |
| 20 {at: -0.4, is: 0}, | 21 {at: -0.4, is: -1}, |
| 21 {at: 0, is: 1}, | 22 {at: 0, is: 1}, |
| 22 {at: 0.2, is: 2}, | 23 {at: 0.2, is: 2}, |
| 23 {at: 0.6, is: 4}, | 24 {at: 0.6, is: 4}, |
| 24 {at: 1, is: 6}, | 25 {at: 1, is: 6}, |
| 25 {at: 1.4, is: 8} | 26 {at: 1.4, is: 8} |
| 26 ]); | 27 ]); |
| 28 |
| 27 assertAttributeInterpolation({ | 29 assertAttributeInterpolation({ |
| 28 property: 'textLength', | 30 property: 'y', |
| 29 underlying: '2', | 31 underlying: '2', |
| 30 from: '1', | 32 from: '1', |
| 31 fromComposite: 'replace', | 33 fromComposite: 'replace', |
| 32 to: '4', | 34 to: '4', |
| 33 toComposite: 'add' | 35 toComposite: 'add' |
| 34 }, [ | 36 }, [ |
| 35 {at: -0.4, is: 0}, | 37 {at: -0.4, is: -1}, |
| 36 {at: 0, is: 1}, | 38 {at: 0, is: 1}, |
| 37 {at: 0.2, is: 2}, | 39 {at: 0.2, is: 2}, |
| 38 {at: 0.6, is: 4}, | 40 {at: 0.6, is: 4}, |
| 39 {at: 1, is: 6}, | 41 {at: 1, is: 6}, |
| 40 {at: 1.4, is: 8} | 42 {at: 1.4, is: 8} |
| 41 ]); | 43 ]); |
| 44 |
| 42 assertAttributeInterpolation({ | 45 assertAttributeInterpolation({ |
| 43 property: 'textLength', | 46 property: 'y', |
| 44 underlying: '1', | 47 underlying: '1', |
| 45 from: neutralKeyframe, | 48 from: neutralKeyframe, |
| 46 to: '6', | 49 to: '6', |
| 47 toComposite: 'replace' | 50 toComposite: 'replace' |
| 48 }, [ | 51 }, [ |
| 49 {at: -0.4, is: 0}, | 52 {at: -0.4, is: -1}, |
| 50 {at: 0, is: 1}, | 53 {at: 0, is: 1}, |
| 51 {at: 0.2, is: 2}, | 54 {at: 0.2, is: 2}, |
| 52 {at: 0.6, is: 4}, | 55 {at: 0.6, is: 4}, |
| 53 {at: 1, is: 6}, | 56 {at: 1, is: 6}, |
| 54 {at: 1.4, is: 8} | 57 {at: 1.4, is: 8} |
| 55 ]); | 58 ]); |
| 56 </script> | 59 </script> |
| 57 </body> | 60 </body> |
| 58 </html> | 61 </html> |
| OLD | NEW |