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

Side by Side Diff: LayoutTests/animations/interpolation/svg-stroke-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 stroke: blue;
9 }
4 .target { 10 .target {
5 width: 100px;
6 height: 100px;
7 fill: black; 11 fill: black;
8 stroke-width: 20px; 12 stroke-width: 8px;
13 stroke: orange;
9 color: blue; 14 color: blue;
10 } 15 }
11 .expected { 16 .expected {
12 fill: green; 17 fill: lime;
13 } 18 }
14 </style> 19 </style>
15 <body> 20 <body>
16 <template id="target-template"> 21 <template id="target-template">
17 <svg> 22 <svg width="10" height="100">
18 <defs> 23 <defs>
19 <linearGradient id="gradient"> 24 <linearGradient id="gradient" x1="0" x2="0" y1="0" y2="1">
20 <stop offset="0" stop-color="green"/> 25 <stop offset="0" stop-color="black"/>
21 <stop offset="1" stop-color="gold"/> 26 <stop offset="1" stop-color="blue"/>
22 </linearGradient> 27 </linearGradient>
23 </defs> 28 </defs>
24 <rect x="0" y="0" width="100" height="100"> 29 <rect x="0" y="0" width="10" height="100"></rect>
30 </svg>
25 </template> 31 </template>
26 <script src="resources/interpolation-test.js"></script> 32 <script src="resources/interpolation-test.js"></script>
27 <script> 33 <script>
28 assertInterpolation({ 34 assertInterpolation({
29 property: 'stroke', 35 property: 'stroke',
36 from: '',
37 to: 'green',
38 }, [
39 {at: -0.4, is: 'rgb(255, 180, 0)'},
40 {at: 0, is: 'rgb(255, 165, 0)'},
41 {at: 0.2, is: 'rgb(204, 158, 0)'},
42 {at: 0.6, is: 'rgb(102, 143, 0)'},
43 {at: 1, is: 'rgb(0, 128, 0)'},
44 {at: 1.5, is: 'rgb(0, 110, 0)'},
45 ]);
46
47 assertNoInterpolation({
48 property: 'stroke',
49 from: 'initial',
50 to: 'green',
51 });
52
53 assertInterpolation({
54 property: 'stroke',
55 from: 'inherit',
56 to: 'green',
57 }, [
58 {at: -0.4, is: 'rgb(0, 0, 255)'},
59 {at: 0, is: 'rgb(0, 0, 255)'},
60 {at: 0.2, is: 'rgb(0, 26, 204)'},
61 {at: 0.6, is: 'rgb(0, 77, 102)'},
62 {at: 1, is: 'rgb(0, 128, 0)'},
63 {at: 1.5, is: 'rgb(0, 192, 0)'},
64 ]);
65
66 assertInterpolation({
67 property: 'stroke',
68 from: 'unset',
69 to: 'green',
70 }, [
71 {at: -0.4, is: 'rgb(0, 0, 255)'},
72 {at: 0, is: 'rgb(0, 0, 255)'},
73 {at: 0.2, is: 'rgb(0, 26, 204)'},
74 {at: 0.6, is: 'rgb(0, 77, 102)'},
75 {at: 1, is: 'rgb(0, 128, 0)'},
76 {at: 1.5, is: 'rgb(0, 192, 0)'},
77 ]);
78
79 assertInterpolation({
80 property: 'stroke',
30 from: 'orange', 81 from: 'orange',
31 to: 'blue' 82 to: 'blue'
32 }, [ 83 }, [
33 {at: -0.4, is: '#ffe700'}, 84 {at: -0.4, is: '#ffe700'},
34 {at: 0, is: 'orange'}, 85 {at: 0, is: 'orange'},
35 {at: 0.2, is: '#cc8433'}, 86 {at: 0.2, is: '#cc8433'},
36 {at: 0.6, is: '#664299'}, 87 {at: 0.6, is: '#664299'},
37 {at: 1, is: 'blue'}, 88 {at: 1, is: 'blue'},
38 {at: 1.5, is: 'blue'} 89 {at: 1.5, is: 'blue'}
39 ]); 90 ]);
(...skipping 17 matching lines...) Expand all
57 {at: 0.6, is: '#996366'}, 108 {at: 0.6, is: '#996366'},
58 {at: 1, is: 'orange'}, 109 {at: 1, is: 'orange'},
59 ]); 110 ]);
60 assertNoInterpolation({ 111 assertNoInterpolation({
61 property: 'stroke', 112 property: 'stroke',
62 from: 'orange', 113 from: 'orange',
63 to: 'url(#gradient)' 114 to: 'url(#gradient)'
64 }); 115 });
65 </script> 116 </script>
66 </body> 117 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698