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

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

Powered by Google App Engine
This is Rietveld 408576698