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

Side by Side Diff: LayoutTests/animations/interpolation/clip-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 <body> 2 <body>
3 <style> 3 <style>
4 .container { 4 .container {
5 width: 80px; 5 width: 80px;
6 height: 80px; 6 height: 80px;
7 background: black; 7 background: black;
8 display: inline-block; 8 display: inline-block;
9 padding: 5px; 9 padding: 5px;
10 } 10 }
11 .container:nth-child(2n) { 11 .container:nth-child(2n) {
12 background: green; 12 background: green;
13 } 13 }
14 .parent {
15 clip: rect(100px, 0px, 100px, 0px);
16 }
14 .target { 17 .target {
15 width: 80px; 18 width: 80px;
16 height: 80px; 19 height: 80px;
17 display: inline-block; 20 display: inline-block;
18 position: absolute; 21 position: absolute;
19 background: white; 22 background: white;
23 clip: rect(0px, 100px, 0px, 100px);
20 } 24 }
21 </style> 25 </style>
22 <template id="target-template"> 26 <template id="target-template">
23 <div class="container"><div class="target"></div></div> 27 <div class="container"><div class="target"></div></div>
24 </template> 28 </template>
25 <script src="resources/interpolation-test.js"></script> 29 <script src="resources/interpolation-test.js"></script>
26 <script> 30 <script>
27 assertInterpolation({ 31 assertInterpolation({
28 property: 'clip', 32 property: 'clip',
33 from: '',
34 to: 'rect(20px, 20px, 20px, 20px)',
35 }, [
36 {at: -1, is: 'rect(-20px 180px -20px 180px)'},
37 {at: 0, is: 'rect(0px 100px 0px 100px)'},
38 {at: 0.25, is: 'rect(5px 80px 5px 80px)'},
39 {at: 0.75, is: 'rect(15px 40px 15px 40px)'},
40 {at: 1, is: 'rect(20px 20px 20px 20px)'},
41 {at: 2, is: 'rect(40px -60px 40px -60px)'},
42 ]);
43
44 assertNoInterpolation({
45 property: 'clip',
46 from: 'initial',
47 to: 'rect(20px, 20px, 20px, 20px)',
48 });
49
50 assertInterpolation({
51 property: 'clip',
52 from: 'inherit',
53 to: 'rect(20px, 20px, 20px, 20px)',
54 }, [
55 {at: -1, is: 'rect(180px -20px 180px -20px)'},
56 {at: 0, is: 'rect(100px 0px 100px 0px)'},
57 {at: 0.25, is: 'rect(80px 5px 80px 5px)'},
58 {at: 0.75, is: 'rect(40px 15px 40px 15px)'},
59 {at: 1, is: 'rect(20px 20px 20px 20px)'},
60 {at: 2, is: 'rect(-60px 40px -60px 40px)'},
61 ]);
62
63 assertNoInterpolation({
64 property: 'clip',
65 from: 'unset',
66 to: 'rect(20px, 20px, 20px, 20px)',
67 });
68
69 assertInterpolation({
70 property: 'clip',
29 from: 'rect(0px, 75px, 80px, 10px)', 71 from: 'rect(0px, 75px, 80px, 10px)',
30 to: 'rect(0px, 100px, 90px, 5px)' 72 to: 'rect(0px, 100px, 90px, 5px)'
31 }, [ 73 }, [
32 {at: -1, is: 'rect(0px, 50px, 70px, 15px)'}, 74 {at: -1, is: 'rect(0px, 50px, 70px, 15px)'},
33 {at: 0, is: 'rect(0px, 75px, 80px, 10px)'}, 75 {at: 0, is: 'rect(0px, 75px, 80px, 10px)'},
34 {at: 0.25, is: 'rect(0px, 81.25px, 82.5px, 8.75px)'}, 76 {at: 0.25, is: 'rect(0px, 81.25px, 82.5px, 8.75px)'},
35 {at: 0.75, is: 'rect(0px, 93.75px, 87.5px, 6.25px)'}, 77 {at: 0.75, is: 'rect(0px, 93.75px, 87.5px, 6.25px)'},
36 {at: 1, is: 'rect(0px, 100px, 90px, 5px)'}, 78 {at: 1, is: 'rect(0px, 100px, 90px, 5px)'},
37 {at: 2, is: 'rect(0px, 125px, 100px, 0px)'}, 79 {at: 2, is: 'rect(0px, 125px, 100px, 0px)'},
38 ]); 80 ]);
(...skipping 29 matching lines...) Expand all
68 from: 'auto', 110 from: 'auto',
69 to: 'rect(0px, 50px, 50px, 0px)' 111 to: 'rect(0px, 50px, 50px, 0px)'
70 }); 112 });
71 113
72 assertNoInterpolation({ 114 assertNoInterpolation({
73 property: 'clip', 115 property: 'clip',
74 from: 'rect(0px, 50px, 50px, 0px)', 116 from: 'rect(0px, 50px, 50px, 0px)',
75 to: 'auto' 117 to: 'auto'
76 }); 118 });
77 </script> 119 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698