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

Side by Side Diff: LayoutTests/animations/interpolation/motion-offset-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 motion-offset: 30px;
6 }
4 .target { 7 .target {
5 width: 80px; 8 width: 10px;
6 height: 80px; 9 height: 10px;
7 display: inline-block;
8 background-color: black; 10 background-color: black;
9 margin-right: 5px; 11 motion-path: path("M0 0H 400");
12 motion-offset: 10px;
10 } 13 }
11 .expected { 14 .expected {
12 background-color: green; 15 background-color: green;
13 margin-right: 15px;
14 } 16 }
15 </style> 17 </style>
16 <body> 18 <body>
17 <script src="resources/interpolation-test.js"></script> 19 <script src="resources/interpolation-test.js"></script>
18 <script> 20 <script>
19 assertInterpolation({ 21 assertInterpolation({
20 property: 'motion-offset', 22 property: 'motion-offset',
23 from: '',
24 to: '20px',
25 }, [
26 {at: -0.3, is: '7px'},
27 {at: 0, is: '10px'},
28 {at: 0.3, is: '13px'},
29 {at: 0.6, is: '16px'},
30 {at: 1, is: '20px'},
31 {at: 1.5, is: '25px'},
32 ]);
33
34 assertInterpolation({
35 property: 'motion-offset',
36 from: 'initial',
37 to: '20px',
38 }, [
39 {at: -0.3, is: '-6px'},
40 {at: 0, is: '0px'},
41 {at: 0.3, is: '6px'},
42 {at: 0.6, is: '12px'},
43 {at: 1, is: '20px'},
44 {at: 1.5, is: '30px'},
45 ]);
46
47 assertInterpolation({
48 property: 'motion-offset',
49 from: 'inherit',
50 to: '20px',
51 }, [
52 {at: -0.3, is: '33px'},
53 {at: 0, is: '30px'},
54 {at: 0.3, is: '27px'},
55 {at: 0.6, is: '24px'},
56 {at: 1, is: '20px'},
57 {at: 1.5, is: '15px'},
58 ]);
59
60 assertInterpolation({
61 property: 'motion-offset',
62 from: 'unset',
63 to: '20px',
64 }, [
65 {at: -0.3, is: '-6px'},
66 {at: 0, is: '0px'},
67 {at: 0.3, is: '6px'},
68 {at: 0.6, is: '12px'},
69 {at: 1, is: '20px'},
70 {at: 1.5, is: '30px'},
71 ]);
72
73 assertInterpolation({
74 property: 'motion-offset',
21 from: '10px', 75 from: '10px',
22 to: '50px' 76 to: '50px',
23 }, [ 77 }, [
24 {at: -0.3, is: '-2px'}, 78 {at: -0.3, is: '-2px'},
25 {at: 0, is: '10px'}, 79 {at: 0, is: '10px'},
26 {at: 0.3, is: '22px'}, 80 {at: 0.3, is: '22px'},
27 {at: 0.6, is: '34px'}, 81 {at: 0.6, is: '34px'},
28 {at: 1, is: '50px'}, 82 {at: 1, is: '50px'},
29 {at: 1.5, is: '70px'}, 83 {at: 1.5, is: '70px'},
30 ]); 84 ]);
85
31 assertInterpolation({ 86 assertInterpolation({
32 property: 'motion-offset', 87 property: 'motion-offset',
33 from: '10px', 88 from: '10px',
34 to: '100%' 89 to: '100%',
35 }, [ 90 }, [
36 // These expectations are expected to fail on the current animation engine 91 // These expectations are expected to fail on the current animation engine
37 // with different (but equivalent) calc expressions. 92 // with different (but equivalent) calc expressions.
38 {at: -0.3, is: 'calc(13px + -30%)'}, 93 {at: -0.3, is: 'calc(13px + -30%)'},
39 {at: 0, is: '10px'}, 94 {at: 0, is: '10px'},
40 {at: 0.3, is: 'calc(7px + 30%)'}, 95 {at: 0.3, is: 'calc(7px + 30%)'},
41 {at: 0.6, is: 'calc(4px + 60%)'}, 96 {at: 0.6, is: 'calc(4px + 60%)'},
42 {at: 1, is: '100%'}, 97 {at: 1, is: '100%'},
43 {at: 1.5, is: 'calc(-5px + 150%)'}, 98 {at: 1.5, is: 'calc(-5px + 150%)'},
44 ]); 99 ]);
45 </script> 100 </script>
46 </body> 101 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698