OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <body> | |
4 <template id="target-template"> | |
5 <svg width="200px" height="300px" viewBox="0 0 1500 1000"> | |
6 <rect class="target" x="10" y="10" width="10" height="10" /> | |
7 </svg> | |
8 </template> | |
9 <script src="resources/interpolation-test.js"></script> | |
10 <script> | |
11 'use strict'; | |
12 assertAttributeInterpolation({ | |
13 property: 'width', | |
fs
2016/07/08 11:14:03
I believe the common "structure" of this test dire
suzyh_UTC10 (ex-contributor)
2016/07/11 05:56:34
Yes, please move these tests into svg-width-interp
| |
14 from: '1vw', | |
15 to: '6vw' | |
16 }, [ | |
17 {at: -0.4, is: '0vw'}, | |
18 {at: 0, is: '1vw'}, | |
19 {at: 0.2, is: '2vw'}, | |
20 {at: 0.6, is: '4vw'}, | |
21 {at: 1, is: '6vw'}, | |
22 {at: 1.4, is: '8vw'} | |
23 ]); | |
24 assertAttributeInterpolation({ | |
25 property: 'width', | |
26 from: '1vh', | |
27 to: '6vh' | |
28 }, [ | |
29 {at: -0.4, is: '0vh'}, | |
30 {at: 0, is: '1vh'}, | |
31 {at: 0.2, is: '2vh'}, | |
32 {at: 0.6, is: '4vh'}, | |
33 {at: 1, is: '6vh'}, | |
34 {at: 1.4, is: '8vh'} | |
35 ]); | |
36 assertAttributeInterpolation({ | |
37 property: 'width', | |
38 from: '1vmin', | |
39 to: '6vmin' | |
40 }, [ | |
41 {at: -0.4, is: '0vmin'}, | |
42 {at: 0, is: '1vmin'}, | |
43 {at: 0.2, is: '2vmin'}, | |
44 {at: 0.6, is: '4vmin'}, | |
45 {at: 1, is: '6vmin'}, | |
46 {at: 1.4, is: '8vmin'} | |
47 ]); | |
48 assertAttributeInterpolation({ | |
49 property: 'width', | |
50 from: '1vmax', | |
51 to: '6vmax' | |
52 }, [ | |
53 {at: -0.4, is: '0vmax'}, | |
54 {at: 0, is: '1vmax'}, | |
55 {at: 0.2, is: '2vmax'}, | |
56 {at: 0.6, is: '4vmax'}, | |
57 {at: 1, is: '6vmax'}, | |
58 {at: 1.4, is: '8vmax'} | |
59 ]); | |
60 </script> | |
61 </body> | |
62 </html> | |
OLD | NEW |