Bug 1422248 - Drop redundant and contradictory test from web-animations/interfaces/finished.html; r?hiro draft
authorBrian Birtles <birtles@gmail.com>
Fri, 15 Dec 2017 10:30:47 -0600
changeset 712061 ea7e9633375e0b672d921006c91b22b42805a9b9
parent 712060 152484f22b8b5becad734aac326f76d6f9eba1c8
child 712062 80e6e86ce136fcbc83926171227d200101107c25
push id93244
push userbbirtles@mozilla.com
push dateFri, 15 Dec 2017 16:41:24 +0000
reviewershiro
bugs1422248
milestone59.0a1
Bug 1422248 - Drop redundant and contradictory test from web-animations/interfaces/finished.html; r?hiro The behavior covered in this dropped test (canceling an idle animation) is covered by the tests added in the previous patch. Furthermore, the behavior expected by the dropped test contradicts what the spec now requires. MozReview-Commit-ID: 49zik7qjID0
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/web-animations/interfaces/Animation/finished.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -575905,17 +575905,17 @@
    "bab0a2227994194c58e23edb3080d519ea453d1e",
    "testharness"
   ],
   "web-animations/interfaces/Animation/finish.html": [
    "629203bd3888631c616093315f2c3f1219486131",
    "testharness"
   ],
   "web-animations/interfaces/Animation/finished.html": [
-   "680fe7552b0cf5a246e11cd63540b343f56608bf",
+   "7543a989508e10c1448668795a5c2de6071838f5",
    "testharness"
   ],
   "web-animations/interfaces/Animation/id.html": [
    "2e40d20a3b221a4b99e776bdeb951c7cba173f57",
    "testharness"
   ],
   "web-animations/interfaces/Animation/idlharness.html": [
    "b369d57caf6557abee257ecbae0c7b4fd49965d7",
--- a/testing/web-platform/tests/web-animations/interfaces/Animation/finished.html
+++ b/testing/web-platform/tests/web-animations/interfaces/Animation/finished.html
@@ -177,37 +177,16 @@ promise_test(t => {
                       'A new finished promise should be created when'
                       + ' cancelling a finished animation');
   });
 }, 'cancelling an already-finished animation replaces the finished promise');
 
 promise_test(t => {
   const div = createDiv(t);
   const animation = div.animate({}, 100 * MS_PER_SEC);
-  animation.cancel();
-  // The spec says we still create a new finished promise and reject the old
-  // one even if we're already idle. That behavior might change, but for now
-  // test that we do that.
-  const retPromise = animation.finished.catch(err => {
-    assert_equals(err.name, 'AbortError',
-                  'finished promise is rejected with AbortError');
-  });
-
-  // Redundant call to cancel();
-  const previousFinishedPromise = animation.finished;
-  animation.cancel();
-  assert_not_equals(animation.finished, previousFinishedPromise,
-                    'A redundant call to cancel() should still generate a new'
-                    + ' finished promise');
-  return retPromise;
-}, 'cancelling an idle animation still replaces the finished promise');
-
-promise_test(t => {
-  const div = createDiv(t);
-  const animation = div.animate({}, 100 * MS_PER_SEC);
   const HALF_DUR = 100 * MS_PER_SEC / 2;
   const QUARTER_DUR = 100 * MS_PER_SEC / 4;
   let gotNextFrame = false;
   let currentTimeBeforeShortening;
   animation.currentTime = HALF_DUR;
   return animation.ready.then(() => {
     currentTimeBeforeShortening = animation.currentTime;
     animation.effect.timing.duration = QUARTER_DUR;