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

Side by Side Diff: LayoutTests/animations/interpolation/color-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 color: blue;
6 }
4 .target { 7 .target {
5 display: inline-block; 8 display: inline-block;
6 font-size: 60pt; 9 font-size: 60pt;
10 color: yellow;
7 } 11 }
8 .expected { 12 .expected {
9 margin-right: 15px; 13 margin-right: 15px;
10 } 14 }
11 </style> 15 </style>
12 <body> 16 <body>
13 <template id="target-template">T</template> 17 <template id="target-template">T</template>
14 <script src="resources/interpolation-test.js"></script> 18 <script src="resources/interpolation-test.js"></script>
15 <script> 19 <script>
16 assertInterpolation({ 20 assertInterpolation({
17 property: 'color', 21 property: 'color',
22 from: '',
23 to: 'green',
24 }, [
25 {at: -0.3, is: 'rgb(255, 255, 0)'},
26 {at: 0, is: 'rgb(255, 255, 0)'},
27 {at: 0.3, is: 'rgb(179, 217, 0)'},
28 {at: 0.6, is: 'rgb(102, 179, 0)'},
29 {at: 1, is: 'rgb(0, 128, 0)'},
30 {at: 1.5, is: 'rgb(0, 65, 0)'},
31 ]);
32
33 assertInterpolation({
34 property: 'color',
35 from: 'initial',
36 to: 'green',
37 }, [
38 {at: -0.3, is: 'rgb(0, 0, 0)'},
39 {at: 0, is: 'rgb(0, 0, 0)'},
40 {at: 0.3, is: 'rgb(0, 38, 0)'},
41 {at: 0.6, is: 'rgb(0, 77, 0)'},
42 {at: 1, is: 'rgb(0, 128, 0)'},
43 {at: 1.5, is: 'rgb(0, 192, 0)'},
44 ]);
45
46 assertInterpolation({
47 property: 'color',
48 from: 'inherit',
49 to: 'green',
50 }, [
51 {at: -0.3, is: 'rgb(0, 0, 255)'},
52 {at: 0, is: 'rgb(0, 0, 255)'},
53 {at: 0.3, is: 'rgb(0, 38, 179)'},
54 {at: 0.6, is: 'rgb(0, 77, 102)'},
55 {at: 1, is: 'rgb(0, 128, 0)'},
56 {at: 1.5, is: 'rgb(0, 192, 0)'},
57 ]);
58
59 assertInterpolation({
60 property: 'color',
61 from: 'unset',
62 to: 'green',
63 }, [
64 {at: -0.3, is: 'rgb(0, 0, 255)'},
65 {at: 0, is: 'rgb(0, 0, 255)'},
66 {at: 0.3, is: 'rgb(0, 38, 179)'},
67 {at: 0.6, is: 'rgb(0, 77, 102)'},
68 {at: 1, is: 'rgb(0, 128, 0)'},
69 {at: 1.5, is: 'rgb(0, 192, 0)'},
70 ]);
71
72 assertInterpolation({
73 property: 'color',
18 from: 'black', 74 from: 'black',
19 to: 'orange' 75 to: 'orange'
20 }, [ 76 }, [
21 {at: -0.3, is: 'black'}, 77 {at: -0.3, is: 'black'},
22 {at: 0, is: 'black'}, 78 {at: 0, is: 'black'},
23 {at: 0.3, is: 'rgb(77, 50, 0)'}, 79 {at: 0.3, is: 'rgb(77, 50, 0)'},
24 {at: 0.6, is: 'rgb(153, 99, 0)'}, 80 {at: 0.6, is: 'rgb(153, 99, 0)'},
25 {at: 1, is: 'orange'}, 81 {at: 1, is: 'orange'},
26 {at: 1.5, is: 'rgb(255, 248, 0)'}, 82 {at: 1.5, is: 'rgb(255, 248, 0)'},
27 ]); 83 ]);
28 </script> 84 </script>
29 </body> 85 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698