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

Side by Side Diff: LayoutTests/animations/interpolation/border-radius-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 border-radius: 30px;
6 }
4 .target { 7 .target {
5 width: 80px; 8 width: 80px;
6 height: 80px; 9 height: 80px;
7 display: inline-block; 10 display: inline-block;
8 background-color: black; 11 background-color: black;
9 margin-right: 5px; 12 margin-right: 5px;
13 border-radius: 10px;
10 } 14 }
11 .expected { 15 .expected {
12 background-color: green; 16 background-color: green;
13 margin-right: 15px; 17 margin-right: 15px;
14 } 18 }
15 </style> 19 </style>
16 <body> 20 <body>
17 <script src="resources/interpolation-test.js"></script> 21 <script src="resources/interpolation-test.js"></script>
18 <script> 22 <script>
19 assertInterpolation({ 23 assertInterpolation({
20 property: 'border-radius', 24 property: 'border-radius',
25 from: '',
26 to: '20px',
27 }, [
28 {at: -0.3, is: '7px'},
29 {at: 0, is: '10px'},
30 {at: 0.3, is: '13px'},
31 {at: 0.6, is: '16px'},
32 {at: 1, is: '20px'},
33 {at: 1.5, is: '25px'},
34 ]);
35 assertInterpolation({
36 property: 'border-radius',
37 from: 'initial',
38 to: '20px',
39 }, [
40 {at: -0.3, is: '0px'},
41 {at: 0, is: '0px'},
42 {at: 0.3, is: '6px'},
43 {at: 0.6, is: '12px'},
44 {at: 1, is: '20px'},
45 {at: 1.5, is: '30px'},
46 ]);
47 assertInterpolation({
48 property: 'border-radius',
49 from: 'inherit',
50 to: '20px',
51 }, [
52 {at: -0.3, is: '33px'},
53 {at: 0, is: '30px'},
54 {at: 0.3, is: '27px'},
55 {at: 0.6, is: '24px'},
56 {at: 1, is: '20px'},
57 {at: 1.5, is: '15px'},
58 ]);
59 assertInterpolation({
60 property: 'border-radius',
61 from: 'unset',
62 to: '20px',
63 }, [
64 {at: -0.3, is: '0px'},
65 {at: 0, is: '0px'},
66 {at: 0.3, is: '6px'},
67 {at: 0.6, is: '12px'},
68 {at: 1, is: '20px'},
69 {at: 1.5, is: '30px'},
70 ]);
71 assertInterpolation({
72 property: 'border-radius',
21 from: '10px', 73 from: '10px',
22 to: '50px' 74 to: '50px'
23 }, [ 75 }, [
24 {at: -0.3, is: '0px'}, // CSS border-radius can't be negative. 76 {at: -0.3, is: '0px'}, // CSS border-radius can't be negative.
25 {at: 0, is: '10px'}, 77 {at: 0, is: '10px'},
26 {at: 0.3, is: '22px'}, 78 {at: 0.3, is: '22px'},
27 {at: 0.6, is: '34px'}, 79 {at: 0.6, is: '34px'},
28 {at: 1, is: '50px'}, 80 {at: 1, is: '50px'},
29 {at: 1.5, is: '70px'}, 81 {at: 1.5, is: '70px'},
30 ]); 82 ]);
31 assertInterpolation({ 83 assertInterpolation({
32 property: 'border-radius', 84 property: 'border-radius',
33 from: '10px', 85 from: '10px',
34 to: '100%' 86 to: '100%'
35 }, [ 87 }, [
36 // These expectations are expected to fail on the current animation engine 88 // These expectations are expected to fail on the current animation engine
37 // with different (but equivalent) calc expressions. 89 // with different (but equivalent) calc expressions.
38 {at: -0.3, is: 'calc(13px + -30%)'}, 90 {at: -0.3, is: 'calc(13px + -30%)'},
39 {at: 0, is: '10px'}, 91 {at: 0, is: '10px'},
40 {at: 0.3, is: 'calc(7px + 30%)'}, 92 {at: 0.3, is: 'calc(7px + 30%)'},
41 {at: 0.6, is: 'calc(4px + 60%)'}, 93 {at: 0.6, is: 'calc(4px + 60%)'},
42 {at: 1, is: '100%'}, 94 {at: 1, is: '100%'},
43 {at: 1.5, is: 'calc(-5px + 150%)'}, 95 {at: 1.5, is: 'calc(-5px + 150%)'},
44 ]); 96 ]);
45 </script> 97 </script>
46 </body> 98 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698