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

Side by Side Diff: LayoutTests/animations/interpolation/svg-fill-opacity-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 .container {
5 display: inline-block;
6 }
7 .parent {
8 fill-opacity: 0.8;
9 }
4 .target { 10 .target {
5 width: 100px;
6 height: 100px;
7 fill: black; 11 fill: black;
12 fill-opacity: 0.6;
8 } 13 }
9 .expected { 14 .expected {
10 fill: green; 15 border-right: solid;
11 } 16 }
12 </style> 17 </style>
13 <body> 18 <body>
14 <template id="target-template"> 19 <template id="target-template">
15 <svg><rect x="0" y="0" width="100" height="100"> 20 <svg width="10" height="100">
21 <rect x="0" y="0" width="10" height="100"></rect>
22 </svg>
16 </template> 23 </template>
17 <script src="resources/interpolation-test.js"></script> 24 <script src="resources/interpolation-test.js"></script>
18 <script> 25 <script>
19 assertInterpolation({ 26 assertInterpolation({
20 property: 'fill-opacity', 27 property: 'fill-opacity',
28 from: '',
29 to: '0.4',
30 }, [
31 {at: -0.3, is: '0.66'},
32 {at: 0, is: '0.6'},
33 {at: 0.3, is: '0.54'},
34 {at: 0.6, is: '0.48'},
35 {at: 1, is: '0.4'},
36 {at: 1.5, is: '0.3'},
37 ]);
38
39 assertInterpolation({
40 property: 'fill-opacity',
41 from: 'initial',
42 to: '0.4',
43 }, [
44 {at: -0.3, is: '1'},
45 {at: 0, is: '1'},
46 {at: 0.3, is: '0.82'},
47 {at: 0.6, is: '0.64'},
48 {at: 1, is: '0.4'},
49 {at: 1.5, is: '0.1'},
50 ]);
51
52 assertInterpolation({
53 property: 'fill-opacity',
54 from: 'inherit',
55 to: '0.4',
56 }, [
57 {at: -0.3, is: '0.92'},
58 {at: 0, is: '0.8'},
59 {at: 0.3, is: '0.68'},
60 {at: 0.6, is: '0.56'},
61 {at: 1, is: '0.4'},
62 {at: 1.5, is: '0.2'},
63 ]);
64
65 assertInterpolation({
66 property: 'fill-opacity',
67 from: 'unset',
68 to: '0.4',
69 }, [
70 {at: -0.3, is: '0.92'},
71 {at: 0, is: '0.8'},
72 {at: 0.3, is: '0.68'},
73 {at: 0.6, is: '0.56'},
74 {at: 1, is: '0.4'},
75 {at: 1.5, is: '0.2'},
76 ]);
77
78 assertInterpolation({
79 property: 'fill-opacity',
21 from: '0', 80 from: '0',
22 to: '1' 81 to: '1'
23 }, [ 82 }, [
24 {at: -0.3, is: '0'}, 83 {at: -0.3, is: '0'},
25 {at: 0, is: '0'}, 84 {at: 0, is: '0'},
26 {at: 0.3, is: '0.3'}, 85 {at: 0.3, is: '0.3'},
27 {at: 0.6, is: '0.6'}, 86 {at: 0.6, is: '0.6'},
28 {at: 1, is: '1'}, 87 {at: 1, is: '1'},
29 {at: 1.5, is: '1'} 88 {at: 1.5, is: '1'}
30 ]); 89 ]);
31 </script> 90 </script>
32 </body> 91 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698