Index: third_party/WebKit/LayoutTests/imported/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress.html |
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress.html b/third_party/WebKit/LayoutTests/imported/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress.html |
index a8fb33d738aefc6832a5a0bb49c1ce7e08fedd79..f6a3a51bd9ffd646611ed79db65211dc9d29b9b7 100644 |
--- a/third_party/WebKit/LayoutTests/imported/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress.html |
+++ b/third_party/WebKit/LayoutTests/imported/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress.html |
@@ -11,7 +11,7 @@ |
<script> |
'use strict'; |
-function executeTests(tests, description) { |
+function runTests(tests, description) { |
tests.forEach(function(currentTest) { |
var testParams = ''; |
for (var attr in currentTest.input) { |
@@ -30,11 +30,18 @@ function executeTests(tests, description) { |
assert_equals(anim.effect.getComputedTiming().progress, |
currentTest.after); |
} |
- }, description + testParams); |
+ }, description + ':' + testParams); |
}); |
} |
-var gTests_zero_iterations = [ |
+ |
+// -------------------------------------------------------------------- |
+// |
+// Zero iteration duration tests |
+// |
+// -------------------------------------------------------------------- |
+ |
+runTests([ |
{ |
input: { iterations: 0, |
iterationStart: 0, |
@@ -133,9 +140,16 @@ var gTests_zero_iterations = [ |
active: 0, |
after: 0 |
} |
-]; |
+], 'Test zero iterations'); |
+ |
-var gTests_integer_iterations = [ |
+// -------------------------------------------------------------------- |
+// |
+// Tests where the iteration count is an integer |
+// |
+// -------------------------------------------------------------------- |
+ |
+runTests([ |
{ |
input: { iterations: 3, |
iterationStart: 0, |
@@ -231,9 +245,16 @@ var gTests_integer_iterations = [ |
before: 0, |
active: 0 |
} |
-]; |
+], 'Test integer iterations'); |
+ |
+ |
+// -------------------------------------------------------------------- |
+// |
+// Tests where the iteration count is a fraction |
+// |
+// -------------------------------------------------------------------- |
-var gTests_fractional_iterations = [ |
+runTests([ |
{ |
input: { iterations: 3.5, |
iterationStart: 0, |
@@ -329,9 +350,16 @@ var gTests_fractional_iterations = [ |
before: 0, |
active: 0 |
} |
-]; |
+], 'Test fractional iterations'); |
-var gTests_infinity_iterations = [ |
+ |
+// -------------------------------------------------------------------- |
+// |
+// Tests where the iteration count is Infinity |
+// |
+// -------------------------------------------------------------------- |
+ |
+runTests([ |
{ |
input: { iterations: Infinity, |
iterationStart: 0, |
@@ -424,12 +452,124 @@ var gTests_infinity_iterations = [ |
before: 0, |
active: 0 |
} |
-]; |
+], 'Test infinity iterations'); |
+ |
+ |
+// -------------------------------------------------------------------- |
+// |
+// End delay tests |
+// |
+// -------------------------------------------------------------------- |
+ |
+runTests([ |
+ { |
+ input: { duration: 100, |
+ delay: 1, |
+ fill: 'both', |
+ endDelay: 50 }, |
+ before: 0, |
+ active: 0, |
+ after: 1 |
+ }, |
-executeTests(gTests_zero_iterations, "Test zero iterations:"); |
-executeTests(gTests_integer_iterations, "Test integer iterations:"); |
-executeTests(gTests_fractional_iterations, "Test fractional iterations:"); |
-executeTests(gTests_infinity_iterations, "Test infinity iterations:"); |
+ { |
+ input: { duration: 100, |
+ delay: 1, |
+ fill: 'both', |
+ endDelay: -50 }, |
+ before: 0, |
+ active: 0, |
+ after: 0.5 |
+ }, |
+ |
+ { |
+ input: { duration: 100, |
+ delay: 1, |
+ fill: 'both', |
+ endDelay: -100 }, |
+ before: 0, |
+ active: 0, |
+ after: 0 |
+ }, |
+ |
+ { |
+ input: { duration: 100, |
+ delay: 1, |
+ fill: 'both', |
+ endDelay: -200 }, |
+ before: 0, |
+ active: 0, |
+ after: 0 |
+ }, |
+ |
+ { |
+ input: { iterationStart: 0.5, |
+ duration: 100, |
+ delay: 1, |
+ fill: 'both', |
+ endDelay: 50 }, |
+ before: 0.5, |
+ active: 0.5, |
+ after: 0.5 |
+ }, |
+ |
+ { |
+ input: { iterationStart: 0.5, |
+ duration: 100, |
+ delay: 1, |
+ fill: 'both', |
+ endDelay: -50 }, |
+ before: 0.5, |
+ active: 0.5, |
+ after: 1 |
+ }, |
+ |
+ { |
+ input: { iterationStart: 0.5, |
+ duration: 100, |
+ delay: 1, |
+ fill: 'both', |
+ endDelay: -100 }, |
+ before: 0.5, |
+ active: 0.5, |
+ after: 0.5 |
+ }, |
+ |
+ { |
+ input: { iterations: 2, |
+ duration: 100, |
+ delay: 1, |
+ fill: 'both', |
+ endDelay: -100 }, |
+ before: 0, |
+ active: 0, |
+ after: 1 |
+ }, |
+ |
+ { |
+ input: { iterations: 1, |
+ iterationStart: 2, |
+ duration: 100, |
+ delay: 1, |
+ fill: 'both', |
+ endDelay: -50 }, |
+ before: 0, |
+ active: 0, |
+ after: 0.5 |
+ }, |
+ |
+ { |
+ input: { iterations: 1, |
+ iterationStart: 2, |
+ duration: 100, |
+ delay: 1, |
+ fill: 'both', |
+ endDelay: -100 }, |
+ before: 0, |
+ active: 0, |
+ after: 0 |
+ }, |
+], 'Test end delay'); |
</script> |
</body> |