Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / animations / svg-attribute-interpolation / svg-y-interpolation.html
blob87e5184d267d9ab66c4819f5c61e8b861a46fe18
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 body {
6 font-size: 10px;
8 </style>
9 </head>
10 <body>
11 <template id="target-template">
12 <svg width="200px" height="300px" viewBox="0 0 1500 1000">
13 <text class="target" x="20, 40, 60" />
14 </svg>
15 </template>
16 <script src="resources/interpolation-test.js"></script>
17 <script>
18 'use strict';
19 assertAttributeInterpolation({
20 property: 'y',
21 from: '0, -1, 2',
22 to: '5, -6, 7'
23 }, [
24 {at: -0.4, is: '-2, 1, 0'},
25 {at: 0, is: '0, -1, 2'},
26 {at: 0.2, is: '1, -2, 3'},
27 {at: 0.6, is: '3, -4, 5'},
28 {at: 1, is: '5, -6, 7'},
29 {at: 1.4, is: '7, -8, 9'}
30 ]);
31 assertAttributeInterpolation({
32 property: 'y',
33 from: '0em, 1ex, 2rems',
34 to: '5em, 6ex, 7rems'
35 }, [
36 {at: -0.4, is: '-2em, -1ex, 0rems'},
37 {at: 0, is: '0em, 1ex, 2rems'},
38 {at: 0.2, is: '1em, 2ex, 3rems'},
39 {at: 0.6, is: '3em, 4ex, 5rems'},
40 {at: 1, is: '5em, 6ex, 7rems'},
41 {at: 1.4, is: '7em, 8ex, 9rems'}
42 ]);
43 assertAttributeInterpolation({
44 property: 'y',
45 from: '55%, 5em, 0',
46 to: '5em, 55%, 0'
47 }, [
48 {at: -0.4, is: '750, -150, 0'},
49 {at: 0, is: '550, 50, 0'},
50 {at: 0.2, is: '450, 150, 0'},
51 {at: 0.6, is: '250, 350, 0'},
52 {at: 1, is: '50, 550, 0'},
53 {at: 1.4, is: '-150, 750, 0'}
54 ]);
55 </script>
56 </body>
57 </html>