Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / animations / svg-attribute-interpolation / svg-markerWidth-interpolation.html
blobb759c8b54bc7f06c0f926396dcb73032e383bb32
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 :root {
6 font: 10px Ahem;
8 </style>
9 </head>
10 <body>
11 <template id="target-template">
12 <svg width="200px" height="300px" viewBox="0 0 1500 1000">
13 <marker class="target" />
14 </svg>
15 </template>
16 <script src="resources/interpolation-test.js"></script>
17 <script>
18 'use strict';
19 assertAttributeInterpolation({
20 property: 'markerWidth',
21 from: '1',
22 to: '6'
23 }, [
24 {at: -0.4, is: 0},
25 {at: 0, is: 1},
26 {at: 0.2, is: 2},
27 {at: 0.6, is: 4},
28 {at: 1, is: 6},
29 {at: 1.4, is: 8}
30 ]);
31 assertAttributeInterpolation({
32 property: 'markerWidth',
33 from: '10pt',
34 to: '5pc'
35 }, [
36 {at: -0.4, is: '0pt'},
37 {at: 0, is: '10pt'},
38 {at: 0.2, is: '20pt'},
39 {at: 0.6, is: '40pt'},
40 {at: 1, is: '60pt'},
41 {at: 1.4, is: '80pt'}
42 ]);
43 assertAttributeInterpolation({
44 property: 'markerWidth',
45 from: '15%',
46 to: '23em'
47 }, [
48 {at: -1000, is: 0},
49 {at: -0.4, is: 223},
50 {at: 0, is: 225},
51 {at: 0.2, is: 226},
52 {at: 0.6, is: 228},
53 {at: 1, is: 230},
54 {at: 1.4, is: 232}
55 ]);
56 assertAttributeInterpolation({
57 property: 'markerWidth',
58 from: '10rem',
59 to: '60rem'
60 }, [
61 {at: -0.4, is: '0rem'},
62 {at: 0, is: '10rem'},
63 {at: 0.2, is: '20rem'},
64 {at: 0.6, is: '40rem'},
65 {at: 1, is: '60rem'},
66 {at: 1.4, is: '80rem'}
67 ]);
68 assertAttributeInterpolation({
69 property: 'markerWidth',
70 from: '10ch',
71 to: '20rem'
72 }, [
73 {at: -0.4, is: '60'},
74 {at: 0, is: '10ch'},
75 {at: 0.2, is: '120'},
76 {at: 0.6, is: '160'},
77 {at: 1, is: '20rem'},
78 {at: 1.4, is: '240'}
79 ]);
80 </script>
81 </body>
82 </html>