Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Side by Side Diff: LayoutTests/animations/interpolation/transform-origin-interpolation.html

Issue 1265873002: Add test coverage for interpolations using CSS wide keywords and neutral keyframes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <meta charset="UTF-8"> 2 <meta charset="UTF-8">
3 <style> 3 <style>
4 .parent {
5 transform-origin: 30px 10px;
6 }
4 .target { 7 .target {
5 display: inline-block; 8 display: inline-block;
6 margin-top: 50px; 9 margin-top: 50px;
7 margin-bottom: 25px; 10 margin-bottom: 25px;
8 width: 50px; 11 width: 50px;
9 height: 50px; 12 height: 50px;
10 background: red; 13 background: red;
11 transform: scale(1.5); 14 transform: scale(1.5);
15 transform-origin: 10px 30px;
12 } 16 }
13 .expected { 17 .expected {
14 background: green; 18 background: green;
15 position: relative; 19 position: relative;
16 left: -50px; 20 left: -50px;
17 } 21 }
18 </style> 22 </style>
19 <body> 23 <body>
20 <script src="resources/interpolation-test.js"></script> 24 <script src="resources/interpolation-test.js"></script>
21 <script> 25 <script>
22 assertInterpolation({ 26 assertInterpolation({
23 property: 'transform-origin', 27 property: 'transform-origin',
28 from: '',
29 to: '20px 20px',
30 }, [
31 {at: -0.3, is: '7px 33px'},
32 {at: 0, is: '10px 30px'},
33 {at: 0.3, is: '13px 27px'},
34 {at: 0.6, is: '16px 24px'},
35 {at: 1, is: '20px 20px'},
36 {at: 1.5, is: '25px 15px'},
37 ]);
38
39 assertInterpolation({
40 property: 'transform-origin',
41 from: 'initial',
42 to: '20px 20px',
43 }, [
44 {at: -0.3, is: '26.5px 26.5px'},
45 {at: 0, is: '25px 25px'},
46 {at: 0.3, is: '23.5px 23.5px'},
47 {at: 0.6, is: '22px 22px'},
48 {at: 1, is: '20px 20px'},
49 {at: 1.5, is: '17.5px 17.5px'},
50 ]);
51
52 assertInterpolation({
53 property: 'transform-origin',
54 from: 'inherit',
55 to: '20px 20px',
56 }, [
57 {at: -0.3, is: '33px 7px'},
58 {at: 0, is: '30px 10px'},
59 {at: 0.3, is: '27px 13px'},
60 {at: 0.6, is: '24px 16px'},
61 {at: 1, is: '20px 20px'},
62 {at: 1.5, is: '15px 25px'},
63 ]);
64
65 assertInterpolation({
66 property: 'transform-origin',
67 from: 'unset',
68 to: '20px 20px',
69 }, [
70 {at: -0.3, is: '26.5px 26.5px'},
71 {at: 0, is: '25px 25px'},
72 {at: 0.3, is: '23.5px 23.5px'},
73 {at: 0.6, is: '22px 22px'},
74 {at: 1, is: '20px 20px'},
75 {at: 1.5, is: '17.5px 17.5px'},
76 ]);
77
78 assertInterpolation({
79 property: 'transform-origin',
24 from: 'top left', 80 from: 'top left',
25 to: 'bottom right', 81 to: 'bottom right',
26 }, [ 82 }, [
27 {at: -0.3, is: '-15px -15px'}, 83 {at: -0.3, is: '-15px -15px'},
28 {at: 0, is: '0px 0px'}, 84 {at: 0, is: '0px 0px'},
29 {at: 0.3, is: '15px 15px'}, 85 {at: 0.3, is: '15px 15px'},
30 {at: 0.6, is: '30px 30px'}, 86 {at: 0.6, is: '30px 30px'},
31 {at: 1, is: '50px 50px'}, 87 {at: 1, is: '50px 50px'},
32 {at: 1.5, is: '75px 75px'}, 88 {at: 1.5, is: '75px 75px'},
33 ]); 89 ]);
(...skipping 18 matching lines...) Expand all
52 }, [ 108 }, [
53 {at: -0.3, is: '-30% 20% 6.5px'}, 109 {at: -0.3, is: '-30% 20% 6.5px'},
54 {at: 0, is: '0% 50% 5px'}, 110 {at: 0, is: '0% 50% 5px'},
55 {at: 0.3, is: '30% 80% 3.5px'}, 111 {at: 0.3, is: '30% 80% 3.5px'},
56 {at: 0.6, is: '60% 110% 2px'}, 112 {at: 0.6, is: '60% 110% 2px'},
57 {at: 1, is: '100% 150% 0px'}, 113 {at: 1, is: '100% 150% 0px'},
58 {at: 1.5, is: '150% 200% -2.5px'}, 114 {at: 1.5, is: '150% 200% -2.5px'},
59 ]); 115 ]);
60 </script> 116 </script>
61 </body> 117 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698