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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/web-animations/keyframe-effect/getComputedTiming.html

Issue 1899623002: Import latest web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: handle new failures Created 4 years, 8 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <meta charset=utf-8> 2 <meta charset=utf-8>
3 <title>KeyframeEffectReadOnly getComputedTiming() tests</title> 3 <title>KeyframeEffectReadOnly getComputedTiming() tests</title>
4 <link rel="help" href="https://w3c.github.io/web-animations/#dom-animationeffect readonly-getcomputedtiming"> 4 <link rel="help" href="https://w3c.github.io/web-animations/#dom-animationeffect readonly-getcomputedtiming">
5 <link rel="author" title="Boris Chiou" href="mailto:boris.chiou@gmail.com"> 5 <link rel="author" title="Boris Chiou" href="mailto:boris.chiou@gmail.com">
6 <script src="../../../../resources/testharness.js"></script> 6 <script src="../../../../resources/testharness.js"></script>
7 <script src="../../../../resources/testharnessreport.js"></script> 7 <script src="../../../../resources/testharnessreport.js"></script>
8 <script src="../testcommon.js"></script> 8 <script src="../testcommon.js"></script>
9 <body> 9 <body>
10 <div id="log"></div> 10 <div id="log"></div>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 expected: { duration: Infinity } }, 55 expected: { duration: Infinity } },
56 { desc: "an Infinity duration", 56 { desc: "an Infinity duration",
57 input: { duration: Infinity }, 57 input: { duration: Infinity },
58 expected: { duration: Infinity } }, 58 expected: { duration: Infinity } },
59 { desc: "an auto duration", 59 { desc: "an auto duration",
60 input: { duration: "auto" }, 60 input: { duration: "auto" },
61 expected: { duration: 0 } }, 61 expected: { duration: 0 } },
62 { desc: "an Infinity iterations", 62 { desc: "an Infinity iterations",
63 input: { iterations: Infinity }, 63 input: { iterations: Infinity },
64 expected: { iterations: Infinity } }, 64 expected: { iterations: Infinity } },
65 { desc: "a negative Infinity iterations",
66 input: { iterations: -Infinity},
67 expected: { iterations: 1 } },
68 { desc: "a NaN iterations",
69 input: { iterations: NaN },
70 expected: { iterations: 1 } },
71 { desc: "a negative iterations",
72 input: { iterations: -1 },
73 expected: { iterations: 1 } },
74 { desc: "an auto fill", 65 { desc: "an auto fill",
75 input: { fill: "auto" }, 66 input: { fill: "auto" },
76 expected: { fill: "none" } }, 67 expected: { fill: "none" } },
77 { desc: "a forwards fill", 68 { desc: "a forwards fill",
78 input: { fill: "forwards" }, 69 input: { fill: "forwards" },
79 expected: { fill: "forwards" } } 70 expected: { fill: "forwards" } }
80 ]; 71 ];
81 72
82 gGetComputedTimingTests.forEach(function(stest) { 73 gGetComputedTimingTests.forEach(function(stest) {
83 test(function(t) { 74 test(function(t) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 input: { duration: Infinity, iterations: 0 }, 136 input: { duration: Infinity, iterations: 0 },
146 expected: 0 }, 137 expected: 0 },
147 { desc: "an infinite duration and fractional iteration count", 138 { desc: "an infinite duration and fractional iteration count",
148 input: { duration: Infinity, iterations: 2.5 }, 139 input: { duration: Infinity, iterations: 2.5 },
149 expected: Infinity }, 140 expected: Infinity },
150 { desc: "an infinite duration and infinite iteration count", 141 { desc: "an infinite duration and infinite iteration count",
151 input: { duration: Infinity, iterations: Infinity }, 142 input: { duration: Infinity, iterations: Infinity },
152 expected: Infinity }, 143 expected: Infinity },
153 { desc: "an infinite duration and zero iteration count", 144 { desc: "an infinite duration and zero iteration count",
154 input: { duration: Infinity, iterations: 0 }, 145 input: { duration: Infinity, iterations: 0 },
155 expected: 0 }, 146 expected: 0 }
156 { desc: "a non-zero duration and invalid iteration count",
157 input: { duration: 1000, iterations: "cabbage" },
158 expected: 1000 }
159 ]; 147 ];
160 148
161 gActiveDurationTests.forEach(function(stest) { 149 gActiveDurationTests.forEach(function(stest) {
162 test(function(t) { 150 test(function(t) {
163 var effect = new KeyframeEffectReadOnly(target, 151 var effect = new KeyframeEffectReadOnly(target,
164 { left: ["10px", "20px"] }, 152 { left: ["10px", "20px"] },
165 stest.input); 153 stest.input);
166 154
167 assert_equals(effect.getComputedTiming().activeDuration, 155 assert_equals(effect.getComputedTiming().activeDuration,
168 stest.expected); 156 stest.expected);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 206
219 assert_equals(effect.getComputedTiming().endTime, 207 assert_equals(effect.getComputedTiming().endTime,
220 stest.expected); 208 stest.expected);
221 209
222 }, "getComputedTiming().endTime for " + stest.desc); 210 }, "getComputedTiming().endTime for " + stest.desc);
223 }); 211 });
224 212
225 done(); 213 done();
226 </script> 214 </script>
227 </body> 215 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698