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

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

Powered by Google App Engine
This is Rietveld 408576698