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

Side by Side Diff: LayoutTests/animations/interpolation/perspective-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 perspective: 30px;
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;
11 perspective: 10px;
8 } 12 }
9 .transformed { 13 .transformed {
10 width: 50px; 14 width: 50px;
11 height: 50px; 15 height: 50px;
12 background: black; 16 background: black;
13 transform: rotateY(45deg); 17 transform: rotateY(45deg);
14 } 18 }
15 .expected .transformed { 19 .expected .transformed {
16 background: green; 20 background: green;
17 } 21 }
18 .expected { 22 .expected {
19 position: relative; 23 position: relative;
20 left: -50px; 24 left: -50px;
21 opacity: 0.75; 25 opacity: 0.75;
22 } 26 }
23 </style> 27 </style>
24 <body> 28 <body>
25 <template id="target-template"> 29 <template id="target-template">
26 <div><div class="transformed"></div></div> 30 <div><div class="transformed"></div></div>
27 </template> 31 </template>
28 <script src="resources/interpolation-test.js"></script> 32 <script src="resources/interpolation-test.js"></script>
29 <script> 33 <script>
30 assertInterpolation({ 34 assertInterpolation({
31 property: 'perspective', 35 property: 'perspective',
36 from: '',
37 to: '20px',
38 }, [
39 {at: -20, is: 'none'},
40 {at: -1, is: 'none'},
41 {at: -0.3, is: '7px'},
42 {at: 0, is: '10px'},
43 {at: 0.3, is: '13px'},
44 {at: 0.6, is: '16px'},
45 {at: 1, is: '20px'},
46 {at: 1.5, is: '25px'},
47 ]);
48
49 assertNoInterpolation({
50 property: 'perspective',
51 from: 'initial',
52 to: '20px',
53 });
54
55 assertInterpolation({
56 property: 'perspective',
57 from: 'inherit',
58 to: '20px',
59 }, [
60 {at: -20, is: '230px'},
61 {at: -1, is: '40px'},
62 {at: -0.3, is: '33px'},
63 {at: 0, is: '30px'},
64 {at: 0.3, is: '27px'},
65 {at: 0.6, is: '24px'},
66 {at: 1, is: '20px'},
67 {at: 1.5, is: '15px'},
68 ]);
69
70 assertNoInterpolation({
71 property: 'perspective',
72 from: 'unset',
73 to: '20px',
74 });
75
76 assertInterpolation({
77 property: 'perspective',
32 from: '50px', 78 from: '50px',
33 to: '100px' 79 to: '100px',
34 }, [ 80 }, [
35 {at: -20, is: 'none'}, // perspective does not accept 0 or negative values 81 {at: -20, is: 'none'}, // perspective does not accept 0 or negative values
36 {at: -1, is: 'none'}, // perspective does not accept 0 or negative values 82 {at: -1, is: 'none'}, // perspective does not accept 0 or negative values
37 {at: -0.3, is: '35px'}, 83 {at: -0.3, is: '35px'},
38 {at: 0, is: '50px'}, 84 {at: 0, is: '50px'},
39 {at: 0.3, is: '65px'}, 85 {at: 0.3, is: '65px'},
40 {at: 0.6, is: '80px'}, 86 {at: 0.6, is: '80px'},
41 {at: 1, is: '100px'}, 87 {at: 1, is: '100px'},
42 {at: 1.5, is: '125px'} 88 {at: 1.5, is: '125px'},
43 ]); 89 ]);
44 90
45 assertNoInterpolation({ 91 assertNoInterpolation({
46 property: 'perspective', 92 property: 'perspective',
47 from: '50px', 93 from: '50px',
48 to: 'none' 94 to: 'none',
49 }); 95 });
50 </script> 96 </script>
51 </body> 97 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698