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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/web-animations/timing-model/animation-effects/current-iteration.html

Issue 2212873003: W3C auto test importer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imported/wpt/web-animations/timing-model/animation-effects/current-iteration.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/web-animations/timing-model/animation-effects/current-iteration.html b/third_party/WebKit/LayoutTests/imported/wpt/web-animations/timing-model/animation-effects/current-iteration.html
index 98d47fd8798729c6556fb0c357770430306175a4..d24908628a0aea77df9b8f78582c8ee924303aa8 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt/web-animations/timing-model/animation-effects/current-iteration.html
+++ b/third_party/WebKit/LayoutTests/imported/wpt/web-animations/timing-model/animation-effects/current-iteration.html
@@ -10,7 +10,7 @@
<script>
'use strict';
-function executeTests(tests, description) {
+function runTests(tests, description) {
tests.forEach(function(currentTest) {
var testParams = '';
for (var attr in currentTest.input) {
@@ -29,7 +29,7 @@ function executeTests(tests, description) {
assert_equals(anim.effect.getComputedTiming().currentIteration,
currentTest.after);
}
- }, description + testParams);
+ }, description + ':' + testParams);
});
}
@@ -43,7 +43,14 @@ async_test(function(t) {
}));
}, 'Test currentIteration during before and after phase when fill is none');
-var gTests_zero_iterations = [
+
+// --------------------------------------------------------------------
+//
+// Zero iteration duration tests
+//
+// --------------------------------------------------------------------
+
+runTests([
{
input: { iterations: 0,
iterationStart: 0,
@@ -142,9 +149,16 @@ var gTests_zero_iterations = [
active: 3,
after: 3
}
-];
+], 'Test zero iterations');
+
-var gTests_integer_iterations = [
+// --------------------------------------------------------------------
+//
+// Tests where the iteration count is an integer
+//
+// --------------------------------------------------------------------
+
+runTests([
{
input: { iterations: 3,
iterationStart: 0,
@@ -240,9 +254,16 @@ var gTests_integer_iterations = [
before: 3,
active: 3
}
-];
+], 'Test integer iterations');
+
+
+// --------------------------------------------------------------------
+//
+// Tests where the iteration count is a fraction
+//
+// --------------------------------------------------------------------
-var gTests_fractional_iterations = [
+runTests([
{
input: { iterations: 3.5,
iterationStart: 0,
@@ -338,9 +359,16 @@ var gTests_fractional_iterations = [
before: 3,
active: 3
}
-];
+], 'Test fractional iterations');
-var gTests_infinity_iterations = [
+
+// --------------------------------------------------------------------
+//
+// Tests where the iteration count is Infinity
+//
+// --------------------------------------------------------------------
+
+runTests([
{
input: { iterations: Infinity,
iterationStart: 0,
@@ -433,12 +461,124 @@ var gTests_infinity_iterations = [
before: 3,
active: 3
}
-];
+], 'Test infinity iterations');
+
+
+// --------------------------------------------------------------------
+//
+// End delay tests
+//
+// --------------------------------------------------------------------
+
+runTests([
+ {
+ input: { duration: 100,
+ delay: 1,
+ fill: 'both',
+ endDelay: 50 },
+ before: 0,
+ active: 0,
+ after: 0
+ },
+
+ {
+ input: { duration: 100,
+ delay: 1,
+ fill: 'both',
+ endDelay: -50 },
+ before: 0,
+ active: 0,
+ after: 0
+ },
+
+ {
+ 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,
+ active: 0,
+ after: 1
+ },
+
+ {
+ input: { iterationStart: 0.5,
+ duration: 100,
+ delay: 1,
+ fill: 'both',
+ endDelay: -50 },
+ before: 0,
+ active: 0,
+ after: 0
+ },
+
+ {
+ input: { iterationStart: 0.5,
+ duration: 100,
+ delay: 1,
+ fill: 'both',
+ endDelay: -100 },
+ before: 0,
+ active: 0,
+ after: 0
+ },
+
+ {
+ input: { iterations: 2,
+ duration: 100,
+ delay: 1,
+ fill: 'both',
+ endDelay: -100 },
+ before: 0,
+ active: 0,
+ after: 0
+ },
-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: { iterations: 1,
+ iterationStart: 2,
+ duration: 100,
+ delay: 1,
+ fill: 'both',
+ endDelay: -50 },
+ before: 2,
+ active: 2,
+ after: 2
+ },
+
+ {
+ input: { iterations: 1,
+ iterationStart: 2,
+ duration: 100,
+ delay: 1,
+ fill: 'both',
+ endDelay: -100 },
+ before: 2,
+ active: 2,
+ after: 2
+ },
+], 'Test end delay');
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698