Bug 1406381 - Add tests for simple iteration progress and current iteration when the playback rate is negative; r?hiro draft
authorBrian Birtles <birtles@gmail.com>
Fri, 13 Oct 2017 12:28:05 +0900
changeset 679930 c291f71fc9f8dc86caf2030b0af91288b8073516
parent 679929 acf69a25294f35b73d67aa8bad0895d4181858d6
child 679931 675bb696bf6ca35ae8472c9560791621a65d2a78
push id84346
push userbmo:bbirtles@mozilla.com
push dateFri, 13 Oct 2017 07:36:54 +0000
reviewershiro
bugs1406381
milestone58.0a1
Bug 1406381 - Add tests for simple iteration progress and current iteration when the playback rate is negative; r?hiro MozReview-Commit-ID: H7cgEeGYUoj
testing/web-platform/meta/web-animations/timing-model/animation-effects/current-iteration.html.ini
testing/web-platform/meta/web-animations/timing-model/animation-effects/simple-iteration-progress.html.ini
testing/web-platform/tests/web-animations/timing-model/animation-effects/current-iteration.html
testing/web-platform/tests/web-animations/timing-model/animation-effects/simple-iteration-progress.html
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>