OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <meta charset="UTF-8"> | 2 <meta charset="UTF-8"> |
3 <style> | 3 <style> |
| 4 .parent { |
| 5 motion-rotation: 30deg; |
| 6 } |
4 .target { | 7 .target { |
5 width: 80px; | 8 width: 80px; |
6 height: 80px; | 9 height: 80px; |
7 display: inline-block; | 10 display: inline-block; |
8 background-color: black; | 11 background-color: black; |
9 margin-right: 5px; | 12 margin-right: 5px; |
| 13 motion-rotation: 10deg; |
10 } | 14 } |
11 .expected { | 15 .expected { |
12 background-color: green; | 16 background-color: green; |
13 margin-right: 15px; | 17 margin-right: 15px; |
14 } | 18 } |
15 </style> | 19 </style> |
16 <body> | 20 <body> |
17 <script src="resources/interpolation-test.js"></script> | 21 <script src="resources/interpolation-test.js"></script> |
18 <script> | 22 <script> |
19 assertInterpolation({ | 23 assertInterpolation({ |
20 property: 'motion-rotation', | 24 property: 'motion-rotation', |
| 25 from: '', |
| 26 to: '20deg', |
| 27 }, [ |
| 28 {at: -0.3, is: '7deg'}, |
| 29 {at: 0, is: '10deg'}, |
| 30 {at: 0.3, is: '13deg'}, |
| 31 {at: 0.6, is: '16deg'}, |
| 32 {at: 1, is: '20deg'}, |
| 33 {at: 1.5, is: '25deg'}, |
| 34 ]); |
| 35 |
| 36 assertNoInterpolation({ |
| 37 property: 'motion-rotation', |
| 38 from: 'initial', |
| 39 to: '20deg', |
| 40 }); |
| 41 |
| 42 assertInterpolation({ |
| 43 property: 'motion-rotation', |
| 44 from: 'inherit', |
| 45 to: '20deg', |
| 46 }, [ |
| 47 {at: -0.3, is: '33deg'}, |
| 48 {at: 0, is: '30deg'}, |
| 49 {at: 0.3, is: '27deg'}, |
| 50 {at: 0.6, is: '24deg'}, |
| 51 {at: 1, is: '20deg'}, |
| 52 {at: 1.5, is: '15deg'}, |
| 53 ]); |
| 54 |
| 55 assertNoInterpolation({ |
| 56 property: 'motion-rotation', |
| 57 from: 'unset', |
| 58 to: '20deg', |
| 59 }); |
| 60 |
| 61 assertInterpolation({ |
| 62 property: 'motion-rotation', |
21 from: '10deg', | 63 from: '10deg', |
22 to: '50deg' | 64 to: '50deg' |
23 }, [ | 65 }, [ |
24 {at: -0.3, is: '-2deg'}, | 66 {at: -0.3, is: '-2deg'}, |
25 {at: 0, is: '10deg'}, | 67 {at: 0, is: '10deg'}, |
26 {at: 0.3, is: '22deg'}, | 68 {at: 0.3, is: '22deg'}, |
27 {at: 0.6, is: '34deg'}, | 69 {at: 0.6, is: '34deg'}, |
28 {at: 1, is: '50deg'}, | 70 {at: 1, is: '50deg'}, |
29 {at: 1.5, is: '70deg'}, | 71 {at: 1.5, is: '70deg'}, |
30 ]); | 72 ]); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 from: 'auto 200deg', | 123 from: 'auto 200deg', |
82 to: '300deg' | 124 to: '300deg' |
83 }); | 125 }); |
84 assertNoInterpolation({ | 126 assertNoInterpolation({ |
85 property: 'motion-rotation', | 127 property: 'motion-rotation', |
86 from: '300deg', | 128 from: '300deg', |
87 to: 'reverse 20deg' | 129 to: 'reverse 20deg' |
88 }); | 130 }); |
89 </script> | 131 </script> |
90 </body> | 132 </body> |
OLD | NEW |