OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../responsive/resources/responsive-test.js"></script> | 2 <script src="resources/responsive-test.js"></script> |
3 <script> | 3 <script> |
4 assertSVGResponsive({ | 4 assertSVGResponsive({ |
5 targetTag: 'polygon', | 5 targetTag: 'polygon', |
6 property: 'points', | 6 property: 'points', |
7 getter(target) { | 7 getter(target) { |
8 return Array.from(target.animatedPoints).map(p => `${p.x} ${p.y}`).join(', '
); | 8 return Array.from(target.animatedPoints).map(p => `${p.x} ${p.y}`).join(', '
); |
9 }, | 9 }, |
10 from: neutralKeyframe, | 10 from: neutralKeyframe, |
11 to: '10 20, 30 40', | 11 to: '10 20, 30 40', |
12 configurations: [{ | 12 configurations: [{ |
13 state: {underlying: '10 10, 20 20'}, | 13 state: {underlying: '10 10, 20 20'}, |
14 expect: [ | 14 expect: [ |
15 {at: 0.25, is: '10 12.5, 22.5 25'}, | 15 {at: 0.25, is: '10 12.5, 22.5 25'}, |
16 {at: 0.75, is: '10 17.5, 27.5 35'}, | 16 {at: 0.75, is: '10 17.5, 27.5 35'}, |
17 ], | 17 ], |
18 }, { | 18 }, { |
19 state: {underlying: '10 10'}, | 19 state: {underlying: '10 10'}, |
20 expect: [ | 20 expect: [ |
21 {at: 0.25, is: '10 10'}, | 21 {at: 0.25, is: '10 10'}, |
22 {at: 0.75, is: '10 20, 30 40'}, | 22 {at: 0.75, is: '10 20, 30 40'}, |
23 ], | 23 ], |
24 }], | 24 }], |
25 }); | 25 }); |
26 </script> | 26 </script> |
OLD | NEW |