| OLD | NEW |
| 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> |
| 11 <div id="target"></div> | 11 <div id="target"></div> |
| 12 <script> | 12 <script> |
| 13 "use strict"; | 13 "use strict"; |
| 14 | 14 |
| 15 var target = document.getElementById("target"); | 15 var target = document.getElementById("target"); |
| 16 | 16 |
| 17 test(function(t) { | 17 test(function(t) { |
| 18 var effect = new KeyframeEffectReadOnly(target, | 18 var effect = new KeyframeEffectReadOnly(target, |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 expected: Infinity }, | 134 expected: Infinity }, |
| 135 { desc: "an infinite duration and zero iteration count", | 135 { desc: "an infinite duration and zero iteration count", |
| 136 input: { duration: Infinity, iterations: 0 }, | 136 input: { duration: Infinity, iterations: 0 }, |
| 137 expected: 0 }, | 137 expected: 0 }, |
| 138 { desc: "an infinite duration and fractional iteration count", | 138 { desc: "an infinite duration and fractional iteration count", |
| 139 input: { duration: Infinity, iterations: 2.5 }, | 139 input: { duration: Infinity, iterations: 2.5 }, |
| 140 expected: Infinity }, | 140 expected: Infinity }, |
| 141 { desc: "an infinite duration and infinite iteration count", | 141 { desc: "an infinite duration and infinite iteration count", |
| 142 input: { duration: Infinity, iterations: Infinity }, | 142 input: { duration: Infinity, iterations: Infinity }, |
| 143 expected: Infinity }, | 143 expected: Infinity }, |
| 144 { desc: "an infinite duration and zero iteration count", | |
| 145 input: { duration: Infinity, iterations: 0 }, | |
| 146 expected: 0 } | |
| 147 ]; | 144 ]; |
| 148 | 145 |
| 149 gActiveDurationTests.forEach(function(stest) { | 146 gActiveDurationTests.forEach(function(stest) { |
| 150 test(function(t) { | 147 test(function(t) { |
| 151 var effect = new KeyframeEffectReadOnly(target, | 148 var effect = new KeyframeEffectReadOnly(target, |
| 152 { left: ["10px", "20px"] }, | 149 { left: ["10px", "20px"] }, |
| 153 stest.input); | 150 stest.input); |
| 154 | 151 |
| 155 assert_equals(effect.getComputedTiming().activeDuration, | 152 assert_equals(effect.getComputedTiming().activeDuration, |
| 156 stest.expected); | 153 stest.expected); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 203 |
| 207 assert_equals(effect.getComputedTiming().endTime, | 204 assert_equals(effect.getComputedTiming().endTime, |
| 208 stest.expected); | 205 stest.expected); |
| 209 | 206 |
| 210 }, "getComputedTiming().endTime for " + stest.desc); | 207 }, "getComputedTiming().endTime for " + stest.desc); |
| 211 }); | 208 }); |
| 212 | 209 |
| 213 done(); | 210 done(); |
| 214 </script> | 211 </script> |
| 215 </body> | 212 </body> |
| OLD | NEW |