Bug 1406381 - Add tests for simple iteration progress and current iteration when the playback rate is negative; r?hiro
MozReview-Commit-ID: H7cgEeGYUoj
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/web-animations/timing-model/animation-effects/current-iteration.html.ini
@@ -0,0 +1,7 @@
+[current-iteration.html]
+ type: testharness
+ [Test negative playback rate: duration:1 delay:1 fill:both playbackRate:-1]
+ expected: FAIL
+
+ [Test negative playback rate: duration:1 delay:1 iterations:2 fill:both playbackRate:-1]
+ expected: FAIL
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/web-animations/timing-model/animation-effects/simple-iteration-progress.html.ini
@@ -0,0 +1,4 @@
+[simple-iteration-progress.html]
+ type: testharness
+ [Test negative playback rate: duration:1 delay:1 fill:both playbackRate:-1]
+ expected: FAIL
--- a/testing/web-platform/tests/web-animations/timing-model/animation-effects/current-iteration.html
+++ b/testing/web-platform/tests/web-animations/timing-model/animation-effects/current-iteration.html
@@ -562,10 +562,59 @@ runTests([
fill: 'both',
endDelay: -100 },
before: 2,
active: 2,
after: 2
},
], 'Test end delay');
+
+// --------------------------------------------------------------------
+//
+// Negative playback rate tests
+//
+// --------------------------------------------------------------------
+
+runTests([
+ {
+ input: { duration: 1,
+ delay: 1,
+ fill: 'both' },
+ playbackRate: -1,
+ before: 0,
+ active: 0,
+ after: 0
+ },
+
+ {
+ input: { duration: 1,
+ delay: 1,
+ iterations: 2,
+ fill: 'both' },
+ playbackRate: -1,
+ before: 0,
+ active: 1,
+ after: 1
+ },
+
+ {
+ input: { duration: 0,
+ delay: 1,
+ fill: 'both' },
+ playbackRate: -1,
+ before: 0,
+ after: 0
+ },
+
+ {
+ input: { duration: 0,
+ iterations: 0,
+ delay: 1,
+ fill: 'both' },
+ playbackRate: -1,
+ before: 0,
+ after: 0
+ },
+], 'Test negative playback rate');
+
</script>
</body>
--- a/testing/web-platform/tests/web-animations/timing-model/animation-effects/simple-iteration-progress.html
+++ b/testing/web-platform/tests/web-animations/timing-model/animation-effects/simple-iteration-progress.html
@@ -553,10 +553,48 @@ runTests([
fill: 'both',
endDelay: -100 },
before: 0,
active: 0,
after: 0
},
], 'Test end delay');
+
+// --------------------------------------------------------------------
+//
+// Negative playback rate tests
+//
+// --------------------------------------------------------------------
+
+runTests([
+ {
+ input: { duration: 1,
+ delay: 1,
+ fill: 'both' },
+ playbackRate: -1,
+ before: 0,
+ active: 1,
+ after: 1
+ },
+
+ {
+ input: { duration: 0,
+ delay: 1,
+ fill: 'both' },
+ playbackRate: -1,
+ before: 0,
+ after: 1
+ },
+
+ {
+ input: { duration: 0,
+ iterations: 0,
+ delay: 1,
+ fill: 'both' },
+ playbackRate: -1,
+ before: 0,
+ after: 0
+ },
+], 'Test negative playback rate');
+
</script>
</body>