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

Side by Side Diff: LayoutTests/animations/interpolation/border-image-outset-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 border-image-outset: 10px;
6 }
4 .target { 7 .target {
5 width: 50px; 8 width: 50px;
6 height: 50px; 9 height: 50px;
7 background-color: black; 10 background-color: black;
8 display: inline-block; 11 display: inline-block;
9 border: 25px; 12 border: 25px;
10 margin-right: 50px; 13 margin-right: 50px;
11 border-image-slice: 30%; 14 border-image-slice: 30%;
12 background-clip: content-box; 15 background-clip: content-box;
13 border-image-source: linear-gradient(45deg, pink, blue, white, black, green); 16 border-image-source: linear-gradient(45deg, pink, blue, white, black, green);
17 border-image-outset: 1px;
14 } 18 }
15 .expected { 19 .expected {
16 background-color: green; 20 background-color: green;
17 } 21 }
18 </style> 22 </style>
19 <body> 23 <body>
20 <script src="resources/interpolation-test.js"></script> 24 <script src="resources/interpolation-test.js"></script>
21 <script> 25 <script>
22 assertInterpolation({ 26 assertInterpolation({
23 property: 'border-image-outset', 27 property: 'border-image-outset',
28 from: '',
29 to: '2px',
30 }, [
31 {at: -0.3, is: '0.7px'},
32 {at: 0, is: '1px'},
33 {at: 0.3, is: '1.3px'},
34 {at: 0.6, is: '1.6px'},
35 {at: 1, is: '2px'},
36 {at: 1.5, is: '2.5px'},
37 ]);
38
39 assertInterpolation({
40 property: 'border-image-outset',
41 from: 'initial',
42 to: '2px',
43 }, [
44 {at: -0.3, is: '0px'}, // Non-negative
45 {at: 0, is: '0px'},
46 {at: 0.3, is: '0.6px'},
47 {at: 0.6, is: '1.2px'},
48 {at: 1, is: '2px'},
49 {at: 1.5, is: '3px'},
50 ]);
51
52 assertInterpolation({
53 property: 'border-image-outset',
54 from: 'inherit',
55 to: '2px',
56 }, [
57 {at: -0.3, is: '12.4px'},
58 {at: 0, is: '10px'},
59 {at: 0.3, is: '7.6px'},
60 {at: 0.6, is: '5.2px'},
61 {at: 1, is: '2px'},
62 {at: 1.5, is: '0px'},
63 ]);
64
65 assertInterpolation({
66 property: 'border-image-outset',
67 from: 'unset',
68 to: '2px',
69 }, [
70 {at: -0.3, is: '0px'}, // Non-negative
71 {at: 0, is: '0px'},
72 {at: 0.3, is: '0.6px'},
73 {at: 0.6, is: '1.2px'},
74 {at: 1, is: '2px'},
75 {at: 1.5, is: '3px'},
76 ]);
77
78 assertInterpolation({
79 property: 'border-image-outset',
24 from: '0px', 80 from: '0px',
25 to: '5px', 81 to: '5px',
26 }, [ 82 }, [
27 {at: -0.3, is: '0px'}, // CSS border-image-outset can't be negative. 83 {at: -0.3, is: '0px'}, // Non-negative
28 {at: 0, is: '0px'}, 84 {at: 0, is: '0px'},
29 {at: 0.1, is: '0.5px'},
30 {at: 0.2, is: '1px'},
31 {at: 0.3, is: '1.5px'}, 85 {at: 0.3, is: '1.5px'},
32 {at: 0.4, is: '2px'},
33 {at: 0.5, is: '2.5px'},
34 {at: 0.6, is: '3px'}, 86 {at: 0.6, is: '3px'},
35 {at: 0.7, is: '3.5px'},
36 {at: 0.8, is: '4px'},
37 {at: 0.9, is: '4.5px'},
38 {at: 1, is: '5px'}, 87 {at: 1, is: '5px'},
39 {at: 1.5, is: '7.5px'}, 88 {at: 1.5, is: '7.5px'},
40 {at: 10, is: '50px'}
41 ]); 89 ]);
90
42 assertInterpolation({ 91 assertInterpolation({
43 property: 'border-image-outset', 92 property: 'border-image-outset',
44 from: '0', 93 from: '0',
45 to: '5', 94 to: '1',
46 }, [ 95 }, [
47 {at: -0.3, is: '0'}, // CSS border-image-outset can't be negative. 96 {at: -0.3, is: '0'}, // Non-negative
48 {at: 0, is: '0'}, 97 {at: 0, is: '0'},
49 {at: 0.1, is: '0.5'}, 98 {at: 0.3, is: '0.3'},
50 {at: 0.2, is: '1'}, 99 {at: 0.6, is: '0.6'},
51 {at: 0.3, is: '1.5'}, 100 {at: 1, is: '1'},
52 {at: 0.4, is: '2'}, 101 {at: 1.5, is: '1.5'},
53 {at: 0.5, is: '2.5'},
54 {at: 0.6, is: '3'},
55 {at: 0.7, is: '3.5'},
56 {at: 0.8, is: '4'},
57 {at: 0.9, is: '4.5'},
58 {at: 1, is: '5'},
59 {at: 1.5, is: '7.5'},
60 {at: 10, is: '50'}
61 ]); 102 ]);
62 </script> 103 </script>
63 </body> 104 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698