Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <body> | |
| 4 <template id="target-template"> | |
| 5 <svg width="90" height="90"> | |
| 6 <text class="target">123</text> | |
|
fs
2015/12/16 22:43:29
Since this is testing the 'list' cases, maybe it'd
| |
| 7 </svg> | |
| 8 </template> | |
| 9 <script src="../svg-attribute-interpolation/resources/interpolation-test.js"></s cript> | |
| 10 <script> | |
| 11 'use strict'; | |
| 12 assertAttributeInterpolation({ | |
| 13 property: 'dx', | |
| 14 underlying: '2', | |
| 15 from: '-1', | |
| 16 fromComposite: 'add', | |
| 17 to: '4', | |
| 18 toComposite: 'add' | |
| 19 }, [ | |
| 20 {at: -0.4, is: '-1'}, | |
| 21 {at: 0, is: '1'}, | |
| 22 {at: 0.2, is: '2'}, | |
| 23 {at: 0.6, is: '4'}, | |
| 24 {at: 1, is: '6'}, | |
| 25 {at: 1.4, is: '8'} | |
| 26 ]); | |
| 27 assertAttributeInterpolation({ | |
| 28 property: 'dy', | |
| 29 underlying: '2 2', | |
| 30 from: '-1 -4', | |
| 31 fromComposite: 'add', | |
| 32 to: '4 -14', | |
| 33 toComposite: 'add' | |
| 34 }, [ | |
| 35 {at: -0.4, is: '-1 2'}, | |
| 36 {at: 0, is: '1 -2'}, | |
| 37 {at: 0.2, is: '2 -4'}, | |
| 38 {at: 0.6, is: '4 -8'}, | |
| 39 {at: 1, is: '6 -12'}, | |
| 40 {at: 1.4, is: '8 -16'} | |
| 41 ]); | |
| 42 | |
| 43 assertAttributeInterpolation({ | |
| 44 property: 'dx', | |
| 45 underlying: '2', | |
| 46 from: '1', | |
| 47 fromComposite: 'replace', | |
| 48 to: '4', | |
| 49 toComposite: 'add' | |
| 50 }, [ | |
| 51 {at: -0.4, is: '-1'}, | |
| 52 {at: 0, is: '1'}, | |
| 53 {at: 0.2, is: '2'}, | |
| 54 {at: 0.6, is: '4'}, | |
| 55 {at: 1, is: '6'}, | |
| 56 {at: 1.4, is: '8'} | |
| 57 ]); | |
| 58 assertAttributeInterpolation({ | |
| 59 property: 'dy', | |
| 60 underlying: '2 2', | |
| 61 from: '1 -2', | |
| 62 fromComposite: 'replace', | |
| 63 to: '4 -14', | |
| 64 toComposite: 'add' | |
| 65 }, [ | |
| 66 {at: -0.4, is: '-1 2'}, | |
| 67 {at: 0, is: '1 -2'}, | |
| 68 {at: 0.2, is: '2 -4'}, | |
| 69 {at: 0.6, is: '4 -8'}, | |
| 70 {at: 1, is: '6 -12'}, | |
| 71 {at: 1.4, is: '8 -16'} | |
| 72 ]); | |
| 73 | |
| 74 assertAttributeInterpolation({ | |
| 75 property: 'dx', | |
| 76 underlying: '1', | |
| 77 from: neutralKeyframe, | |
| 78 to: '6', | |
| 79 toComposite: 'replace' | |
| 80 }, [ | |
| 81 {at: -0.4, is: '-1'}, | |
| 82 {at: 0, is: '1'}, | |
| 83 {at: 0.2, is: '2'}, | |
| 84 {at: 0.6, is: '4'}, | |
| 85 {at: 1, is: '6'}, | |
| 86 {at: 1.4, is: '8'} | |
| 87 ]); | |
| 88 assertAttributeInterpolation({ | |
| 89 property: 'dy', | |
| 90 underlying: '1 -2', | |
| 91 from: neutralKeyframe, | |
| 92 to: '6 -12', | |
| 93 toComposite: 'replace' | |
| 94 }, [ | |
| 95 {at: -0.4, is: '-1 2'}, | |
| 96 {at: 0, is: '1 -2'}, | |
| 97 {at: 0.2, is: '2 -4'}, | |
| 98 {at: 0.6, is: '4 -8'}, | |
| 99 {at: 1, is: '6 -12'}, | |
| 100 {at: 1.4, is: '8 -16'} | |
| 101 ]); | |
| 102 </script> | |
| 103 </body> | |
| 104 </html> | |
| OLD | NEW |