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

Side by Side Diff: LayoutTests/animations/interpolation/box-shadow-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 box-shadow: 30px 10px 30px 10px black,
6 }
4 .target { 7 .target {
5 display: inline-block; 8 display: inline-block;
6 width: 60px; 9 width: 60px;
7 height: 60px; 10 height: 60px;
8 font-size: 3px; 11 font-size: 3px;
9 border: 2px solid; 12 border: 2px solid;
10 margin-right: 20px; 13 margin-right: 20px;
11 margin-bottom: 30px; 14 margin-bottom: 30px;
12 color: green; 15 color: green;
16 box-shadow: 10px 30px 10px 30px black,
13 } 17 }
14 .expected { 18 .expected {
15 margin-right: 40px; 19 margin-right: 40px;
16 } 20 }
17 </style> 21 </style>
18 <body> 22 <body>
19 <script src="resources/interpolation-test.js"></script> 23 <script src="resources/interpolation-test.js"></script>
20 <script> 24 <script>
25 assertInterpolation({
26 property: 'box-shadow',
27 from: '',
28 to: '20px 20px 20px 20px black',
29 }, [
30 {at: -0.3, is: '7px 33px 7px 33px black'},
31 {at: 0, is: '10px 30px 10px 30px black'},
32 {at: 0.3, is: '13px 27px 13px 27px black'},
33 {at: 0.6, is: '16px 24px 16px 24px black'},
34 {at: 1, is: '20px 20px 20px 20px black'},
35 {at: 1.5, is: '25px 15px 25px 15px black'},
36 ]);
37
38 assertInterpolation({
39 property: 'box-shadow',
40 from: 'initial',
41 to: '20px 20px 20px 20px black',
42 }, [
43 {at: -0.3, is: '-6px -6px 0px -6px transparent'},
44 {at: 0, is: 'none'},
45 {at: 0.3, is: '6px 6px 6px 6px rgba(0, 0, 0, 0.3)'},
46 {at: 0.6, is: '12px 12px 12px 12px rgba(0, 0, 0, 0.6)'},
47 {at: 1, is: '20px 20px 20px 20px black'},
48 {at: 1.5, is: '30px 30px 30px 30px black'},
49 ]);
50
51 assertInterpolation({
52 property: 'box-shadow',
53 from: 'inherit',
54 to: '20px 20px 20px 20px black',
55 }, [
56 {at: -0.3, is: '33px 7px 33px 7px black'},
57 {at: 0, is: '30px 10px 30px 10px black'},
58 {at: 0.3, is: '27px 13px 27px 13px black'},
59 {at: 0.6, is: '24px 16px 24px 16px black'},
60 {at: 1, is: '20px 20px 20px 20px black'},
61 {at: 1.5, is: '15px 25px 15px 25px black'},
62 ]);
63
64 assertInterpolation({
65 property: 'box-shadow',
66 from: 'unset',
67 to: '20px 20px 20px 20px black',
68 }, [
69 {at: -0.3, is: '-6px -6px 0px -6px transparent'},
70 {at: 0, is: 'none'},
71 {at: 0.3, is: '6px 6px 6px 6px rgba(0, 0, 0, 0.3)'},
72 {at: 0.6, is: '12px 12px 12px 12px rgba(0, 0, 0, 0.6)'},
73 {at: 1, is: '20px 20px 20px 20px black'},
74 {at: 1.5, is: '30px 30px 30px 30px black'},
75 ]);
76
77
21 // Test basic functionality, and clipping blur at 0 78 // Test basic functionality, and clipping blur at 0
22 assertInterpolation({ 79 assertInterpolation({
23 property: 'box-shadow', 80 property: 'box-shadow',
24 from: '15px 10px 5px 6px black', 81 from: '15px 10px 5px 6px black',
25 to: '-15px -10px 25px -4px orange' 82 to: '-15px -10px 25px -4px orange'
26 }, [ 83 }, [
27 {at: -0.3, is: '24px 16px 0px 9px black'}, 84 {at: -0.3, is: '24px 16px 0px 9px black'},
28 {at: 0, is: '15px 10px 5px 6px black'}, 85 {at: 0, is: '15px 10px 5px 6px black'},
29 {at: 0.3, is: '6px 4px 11px 3px rgb(77, 50, 0)'}, 86 {at: 0.3, is: '6px 4px 11px 3px rgb(77, 50, 0)'},
30 {at: 0.6, is: '-3px -2px 17px 0px rgb(153, 99, 0)'}, 87 {at: 0.6, is: '-3px -2px 17px 0px rgb(153, 99, 0)'},
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 ]); 143 ]);
87 144
88 // Test unmatched inset 145 // Test unmatched inset
89 assertNoInterpolation({ 146 assertNoInterpolation({
90 property: 'box-shadow', 147 property: 'box-shadow',
91 from: '10px 20px yellow, 5px 10px green', 148 from: '10px 20px yellow, 5px 10px green',
92 to: 'inset 5px 10px green, 15px 20px blue' 149 to: 'inset 5px 10px green, 15px 20px blue'
93 }); 150 });
94 </script> 151 </script>
95 </body> 152 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698