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

Side by Side Diff: LayoutTests/animations/interpolation/font-size-adjust-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 <style type="text/css"> 2 <style type="text/css">
3 .container { 3 .container {
4 font-size: 20px; 4 font-size: 20px;
5 line-height: 1; 5 line-height: 1;
6 } 6 }
7 7
8 @font-face { 8 @font-face {
9 font-family : 'testFont'; 9 font-family : 'testFont';
10 src : url('../../resources/opensans/OpenSans-Regular.woff') format("woff"); 10 src : url('../../resources/opensans/OpenSans-Regular.woff') format("woff");
11 } 11 }
12 12
13 .parent {
14 font-size-adjust: 3;
15 }
16
13 .target { 17 .target {
14 display: inline-block; 18 display: inline-block;
15 font-family: testFont; 19 font-family: testFont;
20 font-size-adjust: 1;
16 } 21 }
17 22
18 .expected { 23 .expected {
19 color: green; 24 color: green;
20 margin-right: 30px; 25 margin-right: 30px;
21 } 26 }
22 </style> 27 </style>
23 28
24 <template id="target-template"> 29 <template id="target-template">
25 <span class="container"> 30 <span class="container">
26 <div class="target">x</span> 31 <div class="target">x</span>
27 </div> 32 </div>
28 </template> 33 </template>
29 <script src="resources/interpolation-test.js"></script> 34 <script src="resources/interpolation-test.js"></script>
30 <script> 35 <script>
31 assertInterpolation({ 36 assertInterpolation({
37 property: 'font-size-adjust',
38 from: '',
39 to: '2',
40 }, [
41 {at: -2, is: '0'},
42 {at: -0.3, is: '0.7'},
43 {at: 0, is: '1'},
44 {at: 0.3, is: '1.3'},
45 {at: 0.6, is: '1.6'},
46 {at: 1, is: '2'},
47 {at: 1.5, is: '2.5'},
48 ]);
49
50 assertNoInterpolation({
51 property: 'font-size-adjust',
52 from: 'initial',
53 to: '2',
54 });
55
56 assertInterpolation({
57 property: 'font-size-adjust',
58 from: 'inherit',
59 to: '2',
60 }, [
61 {at: -2, is: '5'},
62 {at: -0.3, is: '3.3'},
63 {at: 0, is: '3'},
64 {at: 0.3, is: '2.7'},
65 {at: 0.6, is: '2.4'},
66 {at: 1, is: '2'},
67 {at: 1.5, is: '1.5'},
68 ]);
69
70 assertInterpolation({
71 property: 'font-size-adjust',
72 from: 'unset',
73 to: '2',
74 }, [
75 {at: -2, is: '5'},
76 {at: -0.3, is: '3.3'},
77 {at: 0, is: '3'},
78 {at: 0.3, is: '2.7'},
79 {at: 0.6, is: '2.4'},
80 {at: 1, is: '2'},
81 {at: 1.5, is: '1.5'},
82 ]);
83
84
85 assertInterpolation({
32 property: 'font-size-adjust', 86 property: 'font-size-adjust',
33 from: '0', 87 from: '0',
34 to: '1.2' 88 to: '1.2'
35 }, [ 89 }, [
36 {at: -2, is: '0'}, 90 {at: -2, is: '0'},
37 {at: -0.3, is: '0'}, 91 {at: -0.3, is: '0'},
38 {at: 0, is: '0'}, 92 {at: 0, is: '0'},
39 {at: 0.3, is: '0.36'}, 93 {at: 0.3, is: '0.36'},
40 {at: 0.6, is: '0.72'}, 94 {at: 0.6, is: '0.72'},
41 {at: 1, is: '1.2'}, 95 {at: 1, is: '1.2'},
(...skipping 13 matching lines...) Expand all
55 }, [ 109 }, [
56 {at: -2, is: '0'}, // CSS font-size-adjust can't be negative. 110 {at: -2, is: '0'}, // CSS font-size-adjust can't be negative.
57 {at: -0.3, is: '0'}, 111 {at: -0.3, is: '0'},
58 {at: 0, is: '0.2'}, 112 {at: 0, is: '0.2'},
59 {at: 0.3, is: '0.5'}, 113 {at: 0.3, is: '0.5'},
60 {at: 0.6, is: '0.8'}, 114 {at: 0.6, is: '0.8'},
61 {at: 1, is: '1.2'}, 115 {at: 1, is: '1.2'},
62 {at: 1.5, is: '1.7'}, 116 {at: 1.5, is: '1.7'},
63 ]); 117 ]);
64 </script> 118 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698