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

Side by Side Diff: LayoutTests/animations/interpolation/background-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
« no previous file with comments | « no previous file | LayoutTests/animations/interpolation/background-color-interpolation-unset.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <meta charset="UTF-8"> 2 <meta charset="UTF-8">
3 <style> 3 <style>
4 .parent {
5 background-color: #eee;
6 }
4 .target { 7 .target {
5 width: 60px; 8 width: 60px;
6 height: 60px; 9 height: 60px;
7 display: inline-block; 10 display: inline-block;
8 border: 2px solid black; 11 border: 2px solid black;
9 margin-right: 2px; 12 margin-right: 2px;
13 background-color: black;
10 } 14 }
11 .expected { 15 .expected {
12 background-color: green;
13 margin-right: 15px; 16 margin-right: 15px;
14 } 17 }
15 </style> 18 </style>
16 <body> 19 <body>
17 <script src="resources/interpolation-test.js"></script> 20 <script src="resources/interpolation-test.js"></script>
18 <script> 21 <script>
19 assertInterpolation({ 22 assertInterpolation({
20 property: 'background-color', 23 property: 'background-color',
24 from: '',
25 to: 'green',
26 }, [
27 {at: -0.3, is: 'rgb(0, 0, 0)'},
28 {at: 0, is: 'rgb(0, 0, 0)'},
29 {at: 0.3, is: 'rgb(0, 38, 0)'},
30 {at: 0.6, is: 'rgb(0, 77, 0)'},
31 {at: 1, is: 'rgb(0, 128, 0)'},
32 {at: 1.5, is: 'rgb(0, 192, 0)'},
33 ]);
34 assertInterpolation({
35 property: 'background-color',
36 from: 'initial',
37 to: 'green',
38 }, [
39 {at: -0.3, is: 'rgba(0, 0, 0, 0)'},
40 {at: 0, is: 'rgba(0, 0, 0, 0)'},
41 {at: 0.3, is: 'rgba(0, 128, 0, 0.3)'},
42 {at: 0.6, is: 'rgba(0, 128, 0, 0.6)'},
43 {at: 1, is: 'rgb(0, 128, 0)'},
44 {at: 1.5, is: 'rgb(0, 192, 0)'},
45 ]);
46 assertInterpolation({
47 property: 'background-color',
48 from: 'inherit',
49 to: 'green',
50 }, [
51 {at: -0.3, is: 'rgb(255, 255, 255)'},
52 {at: 0, is: 'rgb(238, 238, 238)'},
53 {at: 0.3, is: 'rgb(167, 205, 167)'},
54 {at: 0.6, is: 'rgb(95, 172, 95)'},
55 {at: 1, is: 'rgb(0, 128, 0)'},
56 {at: 1.5, is: 'rgb(0, 73, 0)'},
57 ]);
58 assertInterpolation({
59 property: 'background-color',
60 from: 'unset',
61 to: 'green',
62 }, [
63 {at: -0.3, is: 'rgba(0, 0, 0, 0)'},
64 {at: 0, is: 'rgba(0, 0, 0, 0)'},
65 {at: 0.3, is: 'rgba(0, 128, 0, 0.3)'},
66 {at: 0.6, is: 'rgba(0, 128, 0, 0.6)'},
67 {at: 1, is: 'rgb(0, 128, 0)'},
68 {at: 1.5, is: 'rgb(0, 192, 0)'},
69 ]);
70
71 assertInterpolation({
72 property: 'background-color',
21 from: 'white', 73 from: 'white',
22 to: 'orange' 74 to: 'orange',
23 }, [ 75 }, [
24 {at: -0.3, is: 'white'}, 76 {at: -0.3, is: 'white'},
25 {at: 0, is: 'white'}, 77 {at: 0, is: 'white'},
26 {at: 0.3, is: 'rgb(255, 228, 179)'}, 78 {at: 0.3, is: 'rgb(255, 228, 179)'},
27 {at: 0.6, is: 'rgb(255, 201, 102)'}, 79 {at: 0.6, is: 'rgb(255, 201, 102)'},
28 {at: 1, is: 'orange'}, 80 {at: 1, is: 'orange'},
29 {at: 1.5, is: 'rgb(255, 120, 0)'}, 81 {at: 1.5, is: 'rgb(255, 120, 0)'},
30 ]); 82 ]);
31 assertInterpolation({
32 property: 'background-color',
33 from: 'initial',
34 to: 'transparent'
35 }, [
36 {at: -0.3, is: 'transparent'},
37 {at: 0, is: 'transparent'},
38 {at: 0.3, is: 'transparent'},
39 {at: 0.6, is: 'transparent'},
40 {at: 1, is: 'transparent'},
41 {at: 1.5, is: 'transparent'},
42 ]);
43 </script> 83 </script>
44 </body> 84 </body>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/animations/interpolation/background-color-interpolation-unset.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698