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

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

Powered by Google App Engine
This is Rietveld 408576698