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

Side by Side Diff: LayoutTests/animations/interpolation/height-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 height: 200px;
6 }
4 .target { 7 .target {
5 width: 100px; 8 width: 100px;
6 height: 100px; 9 height: 100px;
7 background-color: black; 10 background-color: black;
8 display: inline-block; 11 display: inline-block;
9 margin-right: 5px; 12 margin-right: 5px;
13 height: 10px;
10 } 14 }
11 .expected { 15 .expected {
12 background-color: green; 16 background-color: green;
13 } 17 }
14 </style> 18 </style>
15 <body> 19 <body>
16 <script src="resources/interpolation-test.js"></script> 20 <script src="resources/interpolation-test.js"></script>
17 <script> 21 <script>
18 assertInterpolation({ 22 assertInterpolation({
19 property: 'height', 23 property: 'height',
24 from: '',
25 to: '20px',
26 }, [
27 {at: -0.3, is: '7px'},
28 {at: 0, is: '10px'},
29 {at: 0.3, is: '13px'},
30 {at: 0.6, is: '16px'},
31 {at: 1, is: '20px'},
32 {at: 1.5, is: '25px'},
33 ]);
34
35 assertNoInterpolation({
36 property: 'height',
37 from: 'initial',
38 to: '20px',
39 });
40
41 assertInterpolation({
42 property: 'height',
43 from: 'inherit',
44 to: '20px',
45 }, [
46 {at: -0.3, is: '254px'},
47 {at: 0, is: '200px'},
48 {at: 0.3, is: '146px'},
49 {at: 0.6, is: '92px'},
50 {at: 1, is: '20px'},
51 {at: 1.5, is: '0px'},
52 ]);
53
54 assertNoInterpolation({
55 property: 'height',
56 from: 'unset',
57 to: '20px',
58 });
59
60 assertInterpolation({
61 property: 'height',
20 from: '0px', 62 from: '0px',
21 to: '100px' 63 to: '100px'
22 }, [ 64 }, [
23 {at: -0.3, is: '0px'}, // CSS height can't be negative. 65 {at: -0.3, is: '0px'}, // CSS height can't be negative.
24 {at: 0, is: '0px'}, 66 {at: 0, is: '0px'},
25 {at: 0.3, is: '30px'}, 67 {at: 0.3, is: '30px'},
26 {at: 0.6, is: '60px'}, 68 {at: 0.6, is: '60px'},
27 {at: 1, is: '100px'}, 69 {at: 1, is: '100px'},
28 {at: 1.5, is: '150px'} 70 {at: 1.5, is: '150px'}
29 ]); 71 ]);
30 </script> 72 </script>
31 </body> 73 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698