Bug 1382841 - Remove old test_XXX openers from dom/animation/test/**; r=hiro draft
authorBrian Birtles <birtles@gmail.com>
Thu, 15 Feb 2018 16:37:38 +0900
changeset 755369 9bbb9d79863dbf917ad4ab1dc9348cdba4a87a9f
parent 754160 6d8f470b2579e7570f14e3db557264dc075dd654
child 755370 420ad667a6deccaa4d7a26f17847996aff4b6089
push id99159
push userbmo:bbirtles@mozilla.com
push dateThu, 15 Feb 2018 07:40:32 +0000
reviewershiro
bugs1382841
milestone60.0a1
Bug 1382841 - Remove old test_XXX openers from dom/animation/test/**; r=hiro We rename the file_XXX contents to test_XXX_to_rename so that these tests keep running (so long as they begin with file_ and not test_ the test harness will refuse to run them). If we rename these files to test_XXX in the same patch Mercurial will not treat this as a rename and so we will lose the history associated with file_XXX. Instead, we rename test_XXX_to_rename to test_XXX in the next patch in this series and by doing this Mercurial will treat this as two rename operations and `hg log -f test_XXX` will show the history file_XXX as well. One minor exception to this occurs due to the fact that we have two naming conventions: (a) For tests in css-animations, css-transitions, style etc. Most of these tests should eventually land in web-platform-tests. However, in many cases that's not yet possible because, for example, CSS Animations 2 does not yet specify the behavior tested by the css-animations tests. For tests in web-platform-tests we generally separate words using -. However, our mochitest running machinery requires that tests begin with test_. Hence we name tests: test_abc-def-ghi.html. (b) For tests in mozilla These tests are never intended to be part of web-platform-tests and generally for mochitests we use _ to separate words (hence the test_ prefix). Hence we name these tests test_abc_def_ghi.html Now, there are some tests in the 'mozilla' directory that use the (a) naming scheme instead of (b). In this case, instead of renaming file_xxx-xxx.html to test_xxx-xxx_to_rename.html in this patch, and then renaming test_xxx-xxx_to_rename.html to test_xxx-xxx.html in a second patch, we can just delete test_xxx-xxx.html and rename file_xxx-xxx.html to test_xxx_xxx.html in the one patch and Mercurial will recognize this as a rename because the file names don't overlap. MozReview-Commit-ID: Etcdmyfx0zf
dom/animation/test/css-animations/file_animation-cancel.html
dom/animation/test/css-animations/file_animation-computed-timing.html
dom/animation/test/css-animations/file_animation-currenttime.html
dom/animation/test/css-animations/file_animation-finish.html
dom/animation/test/css-animations/file_animation-finished.html
dom/animation/test/css-animations/file_animation-id.html
dom/animation/test/css-animations/file_animation-pausing.html
dom/animation/test/css-animations/file_animation-playstate.html
dom/animation/test/css-animations/file_animation-ready.html
dom/animation/test/css-animations/file_animation-reverse.html
dom/animation/test/css-animations/file_animations-dynamic-changes.html
dom/animation/test/css-animations/file_cssanimation-animationname.html
dom/animation/test/css-animations/file_document-get-animations.html
dom/animation/test/css-animations/file_effect-target.html
dom/animation/test/css-animations/file_element-get-animations.html
dom/animation/test/css-animations/file_event-order.html
dom/animation/test/css-animations/file_keyframeeffect-getkeyframes.html
dom/animation/test/css-animations/file_pseudoElement-get-animations.html
dom/animation/test/css-animations/file_setting-effect.html
dom/animation/test/css-animations/test_animation-cancel.html
dom/animation/test/css-animations/test_animation-cancel_to_rename.html
dom/animation/test/css-animations/test_animation-computed-timing.html
dom/animation/test/css-animations/test_animation-computed-timing_to_rename.html
dom/animation/test/css-animations/test_animation-currenttime.html
dom/animation/test/css-animations/test_animation-currenttime_to_rename.html
dom/animation/test/css-animations/test_animation-finish.html
dom/animation/test/css-animations/test_animation-finish_to_rename.html
dom/animation/test/css-animations/test_animation-finished.html
dom/animation/test/css-animations/test_animation-finished_to_rename.html
dom/animation/test/css-animations/test_animation-id.html
dom/animation/test/css-animations/test_animation-id_to_rename.html
dom/animation/test/css-animations/test_animation-pausing.html
dom/animation/test/css-animations/test_animation-pausing_to_rename.html
dom/animation/test/css-animations/test_animation-playstate.html
dom/animation/test/css-animations/test_animation-playstate_to_rename.html
dom/animation/test/css-animations/test_animation-ready.html
dom/animation/test/css-animations/test_animation-ready_to_rename.html
dom/animation/test/css-animations/test_animation-reverse.html
dom/animation/test/css-animations/test_animation-reverse_to_rename.html
dom/animation/test/css-animations/test_animation-starttime.html
dom/animation/test/css-animations/test_animations-dynamic-changes.html
dom/animation/test/css-animations/test_animations-dynamic-changes_to_rename.html
dom/animation/test/css-animations/test_cssanimation-animationname.html
dom/animation/test/css-animations/test_cssanimation-animationname_to_rename.html
dom/animation/test/css-animations/test_document-get-animations.html
dom/animation/test/css-animations/test_document-get-animations_to_rename.html
dom/animation/test/css-animations/test_effect-target.html
dom/animation/test/css-animations/test_effect-target_to_rename.html
dom/animation/test/css-animations/test_element-get-animations.html
dom/animation/test/css-animations/test_element-get-animations_to_rename.html
dom/animation/test/css-animations/test_event-dispatch.html
dom/animation/test/css-animations/test_event-order.html
dom/animation/test/css-animations/test_event-order_to_rename.html
dom/animation/test/css-animations/test_keyframeeffect-getkeyframes.html
dom/animation/test/css-animations/test_keyframeeffect-getkeyframes_to_rename.html
dom/animation/test/css-animations/test_pseudoElement-get-animations.html
dom/animation/test/css-animations/test_pseudoElement-get-animations_to_rename.html
dom/animation/test/css-animations/test_setting-effect.html
dom/animation/test/css-animations/test_setting-effect_to_rename.html
dom/animation/test/css-transitions/file_animation-cancel.html
dom/animation/test/css-transitions/file_animation-computed-timing.html
dom/animation/test/css-transitions/file_animation-currenttime.html
dom/animation/test/css-transitions/file_animation-finished.html
dom/animation/test/css-transitions/file_animation-pausing.html
dom/animation/test/css-transitions/file_animation-ready.html
dom/animation/test/css-transitions/file_animation-starttime.html
dom/animation/test/css-transitions/file_csstransition-transitionproperty.html
dom/animation/test/css-transitions/file_document-get-animations.html
dom/animation/test/css-transitions/file_effect-target.html
dom/animation/test/css-transitions/file_element-get-animations.html
dom/animation/test/css-transitions/file_event-dispatch.html
dom/animation/test/css-transitions/file_keyframeeffect-getkeyframes.html
dom/animation/test/css-transitions/file_pseudoElement-get-animations.html
dom/animation/test/css-transitions/file_setting-effect.html
dom/animation/test/css-transitions/test_animation-cancel.html
dom/animation/test/css-transitions/test_animation-cancel_to_rename.html
dom/animation/test/css-transitions/test_animation-computed-timing.html
dom/animation/test/css-transitions/test_animation-computed-timing_to_rename.html
dom/animation/test/css-transitions/test_animation-currenttime.html
dom/animation/test/css-transitions/test_animation-currenttime_to_rename.html
dom/animation/test/css-transitions/test_animation-finished.html
dom/animation/test/css-transitions/test_animation-finished_to_rename.html
dom/animation/test/css-transitions/test_animation-pausing.html
dom/animation/test/css-transitions/test_animation-pausing_to_rename.html
dom/animation/test/css-transitions/test_animation-ready.html
dom/animation/test/css-transitions/test_animation-ready_to_rename.html
dom/animation/test/css-transitions/test_animation-starttime.html
dom/animation/test/css-transitions/test_animation-starttime_to_rename.html
dom/animation/test/css-transitions/test_csstransition-transitionproperty.html
dom/animation/test/css-transitions/test_csstransition-transitionproperty_to_rename.html
dom/animation/test/css-transitions/test_document-get-animations.html
dom/animation/test/css-transitions/test_document-get-animations_to_rename.html
dom/animation/test/css-transitions/test_effect-target.html
dom/animation/test/css-transitions/test_effect-target_to_rename.html
dom/animation/test/css-transitions/test_element-get-animations.html
dom/animation/test/css-transitions/test_element-get-animations_to_rename.html
dom/animation/test/css-transitions/test_event-dispatch.html
dom/animation/test/css-transitions/test_event-dispatch_to_rename.html
dom/animation/test/css-transitions/test_keyframeeffect-getkeyframes.html
dom/animation/test/css-transitions/test_keyframeeffect-getkeyframes_to_rename.html
dom/animation/test/css-transitions/test_pseudoElement-get-animations.html
dom/animation/test/css-transitions/test_pseudoElement-get-animations_to_rename.html
dom/animation/test/css-transitions/test_setting-effect.html
dom/animation/test/css-transitions/test_setting-effect_to_rename.html
dom/animation/test/document-timeline/file_document-timeline.html
dom/animation/test/document-timeline/test_document-timeline.html
dom/animation/test/document-timeline/test_document-timeline_to_rename.html
dom/animation/test/mochitest.ini
dom/animation/test/mozilla/file_cubic_bezier_limits.html
dom/animation/test/mozilla/file_disabled_properties.html
dom/animation/test/mozilla/file_document-timeline-origin-time-range.html
dom/animation/test/mozilla/file_hide_and_show.html
dom/animation/test/mozilla/file_restyling_xhr_doc.html
dom/animation/test/mozilla/file_set-easing.html
dom/animation/test/mozilla/file_transform_limits.html
dom/animation/test/mozilla/file_underlying-discrete-value.html
dom/animation/test/mozilla/test_cubic_bezier_limits.html
dom/animation/test/mozilla/test_cubic_bezier_limits_to_rename.html
dom/animation/test/mozilla/test_disabled_properties.html
dom/animation/test/mozilla/test_disabled_properties_to_rename.html
dom/animation/test/mozilla/test_discrete-animations.html
dom/animation/test/mozilla/test_document-timeline-origin-time-range.html
dom/animation/test/mozilla/test_document_timeline_origin_time_range.html
dom/animation/test/mozilla/test_hide_and_show.html
dom/animation/test/mozilla/test_hide_and_show_to_rename.html
dom/animation/test/mozilla/test_restyles.html
dom/animation/test/mozilla/test_restyling_xhr_doc.html
dom/animation/test/mozilla/test_restyling_xhr_doc_to_rename.html
dom/animation/test/mozilla/test_set-easing.html
dom/animation/test/mozilla/test_set_easing.html
dom/animation/test/mozilla/test_transform_limits.html
dom/animation/test/mozilla/test_transform_limits_to_rename.html
dom/animation/test/mozilla/test_transition_finish_on_compositor.html
dom/animation/test/mozilla/test_underlying-discrete-value.html
dom/animation/test/mozilla/test_underlying_discrete_value.html
dom/animation/test/style/file_animation-seeking-with-current-time.html
dom/animation/test/style/file_animation-seeking-with-start-time.html
dom/animation/test/style/file_animation-setting-effect.html
dom/animation/test/style/file_composite.html
dom/animation/test/style/file_missing-keyframe-on-compositor.html
dom/animation/test/style/file_missing-keyframe.html
dom/animation/test/style/test_animation-seeking-with-current-time.html
dom/animation/test/style/test_animation-seeking-with-current-time_to_rename.html
dom/animation/test/style/test_animation-seeking-with-start-time.html
dom/animation/test/style/test_animation-seeking-with-start-time_to_rename.html
dom/animation/test/style/test_animation-setting-effect.html
dom/animation/test/style/test_animation-setting-effect_to_rename.html
dom/animation/test/style/test_composite.html
dom/animation/test/style/test_composite_to_rename.html
dom/animation/test/style/test_missing-keyframe-on-compositor.html
dom/animation/test/style/test_missing-keyframe-on-compositor_to_rename.html
dom/animation/test/style/test_missing-keyframe.html
dom/animation/test/style/test_missing-keyframe_to_rename.html
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_animation-cancel.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_animation-cancel.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-animations/file_animation-cancel.html
rename to dom/animation/test/css-animations/test_animation-cancel_to_rename.html
--- a/dom/animation/test/css-animations/file_animation-cancel.html
+++ b/dom/animation/test/css-animations/test_animation-cancel_to_rename.html
@@ -1,24 +1,27 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 @keyframes translateAnim {
   to { transform: translate(100px) }
 }
 @keyframes marginLeftAnim {
   to { margin-left: 100px }
 }
 @keyframes marginLeftAnim100To200 {
   from { margin-left: 100px }
   to { margin-left: 200px }
 }
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 promise_test(function(t) {
   var div = addDiv(t, { style: 'animation: translateAnim 100s' });
   var animation = div.getAnimations()[0];
 
   return animation.ready.then(function() {
@@ -180,12 +183,11 @@ promise_test(function(t) {
     return waitForFrame();
   }).then(function() {
     assert_equals(animation.playState, 'idle');
     assert_equals(getComputedStyle(childDiv).marginLeft, '0px');
   });
 }, 'Setting display:none on an ancestor element cancels animations on ' +
    'descendants');
 
-done();
 </script>
 </body>
 </html>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_animation-computed-timing.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_animation-computed-timing.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-animations/file_animation-computed-timing.html
rename to dom/animation/test/css-animations/test_animation-computed-timing_to_rename.html
--- a/dom/animation/test/css-animations/file_animation-computed-timing.html
+++ b/dom/animation/test/css-animations/test_animation-computed-timing_to_rename.html
@@ -1,18 +1,21 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 @keyframes moveAnimation {
   from { margin-left: 100px }
   to { margin-left: 200px }
 }
 </style>
 <body>
+<div id="log"></div>
 <script>
 
 'use strict';
 
 // --------------------
 // delay
 // --------------------
 test(function(t) {
@@ -556,11 +559,10 @@ test(function(t) {
 
   assert_equals(effect.getComputedTiming().currentIteration, null,
                 'currentIteration for orphaned effect');
 }, 'currentIteration of an AnimationEffect without an Animation');
 
 // TODO: If iteration duration is Infinity, currentIteration is 0.
 // However, we cannot set iteration duration to Infinity in CSS Animation now.
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_animation-currenttime.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_animation-currenttime.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-animations/file_animation-currenttime.html
rename to dom/animation/test/css-animations/test_animation-currenttime_to_rename.html
--- a/dom/animation/test/css-animations/file_animation-currenttime.html
+++ b/dom/animation/test/css-animations/test_animation-currenttime_to_rename.html
@@ -13,19 +13,22 @@
 }
 
 @keyframes anim {
   from { margin-left: 100px; }
   to { margin-left: 200px; }
 }
 
     </style>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
     <script src="../testcommon.js"></script>
   </head>
   <body>
+    <div id="log"></div>
     <script type="text/javascript">
 
 'use strict';
 
 // TODO: We should separate this test(Testing for CSS Animation events /
 // Testing for currentTime of Web Animation).
 // e.g:
 //  CSS Animation events test :
@@ -334,12 +337,11 @@ promise_test(function(t) {
   }).then(function() {
     assert_true(animation.currentTime < 100 * 1000,
                 'After aborting a pause when finished, the currentTime should'
                 + ' jump back towards the start of the animation');
   });
 }, 'After aborting a pause when finished, the call to play() should rewind'
    + ' the current time');
 
-done();
     </script>
   </body>
 </html>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_animation-finish.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_animation-finish.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-animations/file_animation-finish.html
rename to dom/animation/test/css-animations/test_animation-finish_to_rename.html
--- a/dom/animation/test/css-animations/file_animation-finish.html
+++ b/dom/animation/test/css-animations/test_animation-finish_to_rename.html
@@ -1,18 +1,21 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 @keyframes anim {
   from { margin-left: 100px; }
   to { margin-left: 200px; }
 }
 </style>
 <body>
+<div id="log"></div>
 <script>
 
 'use strict';
 
 const ANIM_PROP_VAL = 'anim 100s';
 const ANIM_DURATION = 100000; // ms
 
 test(function(t) {
@@ -85,11 +88,10 @@ test(function(t) {
   assert_equals(animation.playState, 'finished',
                 'The play state of a pause-pending animation should become ' +
                 '"finished" after finish() is called');
   assert_equals(animation.startTime, animation.timeline.currentTime,
                 'The start time of a pause-pending animation should be ' +
                 'set after calling finish()');
 }, 'Test finish() while pause-pending with negative playbackRate');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_animation-finished.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_animation-finished.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-animations/file_animation-finished.html
rename to dom/animation/test/css-animations/test_animation-finished_to_rename.html
--- a/dom/animation/test/css-animations/file_animation-finished.html
+++ b/dom/animation/test/css-animations/test_animation-finished_to_rename.html
@@ -1,18 +1,21 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 @keyframes abc {
   to { transform: translate(10px) }
 }
 @keyframes def {}
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 const ANIM_PROP_VAL = 'abc 100s';
 const ANIM_DURATION = 100 * MS_PER_SEC;
 
 promise_test(function(t) {
   var div = addDiv(t);
@@ -83,11 +86,10 @@ promise_test(function(t) {
                   'Should not replay when animation-play-state changes to ' +
                   '"running" on finished animation');
     assert_equals(animation.currentTime, ANIM_DURATION,
                   'currentTime should not change when animation-play-state ' +
                   'changes to "running" on finished animation');
   });
 }, 'Test finished promise changes when animationPlayState set to running');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_animation-id.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_animation-id.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-animations/file_animation-id.html
rename to dom/animation/test/css-animations/test_animation-id_to_rename.html
--- a/dom/animation/test/css-animations/file_animation-id.html
+++ b/dom/animation/test/css-animations/test_animation-id_to_rename.html
@@ -1,24 +1,26 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 @keyframes abc { }
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 test(function(t) {
   var div = addDiv(t);
   div.style.animation = 'abc 100s';
   var animation = div.getAnimations()[0];
   assert_equals(animation.id, '', 'id for CSS Animation is initially empty');
   animation.id = 'anim'
 
   assert_equals(animation.id, 'anim', 'animation.id reflects the value set');
 }, 'Animation.id for CSS Animations');
 
-done();
 </script>
 </body>
 </html>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_animation-pausing.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true],
-            ["dom.animations-api.pending-member.enabled", true]]},
-  function() {
-    window.open("file_animation-pausing.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-animations/file_animation-pausing.html
rename to dom/animation/test/css-animations/test_animation-pausing_to_rename.html
--- a/dom/animation/test/css-animations/file_animation-pausing.html
+++ b/dom/animation/test/css-animations/test_animation-pausing_to_rename.html
@@ -1,18 +1,21 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
-@keyframes anim { 
+@keyframes anim {
   0% { margin-left: 0px }
   100% { margin-left: 10000px }
 }
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 function getMarginLeft(cs) {
   return parseFloat(cs.marginLeft);
 }
 
 promise_test(function(t) {
@@ -156,11 +159,10 @@ promise_test(function(t) {
                   'pause operation to complete');
 
     // The ready promise should now be resolved. If it's not then test will
     // probably time out before anything else happens that causes it to resolve.
     return animation.ready;
   });
 }, 'Setting the current time completes a pending pause');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_animation-playstate.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true],
-            ["dom.animations-api.pending-member.enabled", true]]},
-  function() {
-    window.open("file_animation-playstate.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-animations/file_animation-playstate.html
rename to dom/animation/test/css-animations/test_animation-playstate_to_rename.html
--- a/dom/animation/test/css-animations/file_animation-playstate.html
+++ b/dom/animation/test/css-animations/test_animation-playstate_to_rename.html
@@ -1,15 +1,18 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 @keyframes anim { }
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 test(function(t) {
   var div = addDiv(t);
   var cs = getComputedStyle(div);
   div.style.animation = 'anim 1000s';
   var animation = div.getAnimations()[0];
@@ -49,11 +52,10 @@ test(function(t) {
 test(function(t) {
   var div = addDiv(t);
   div.style.animation = 'anim 1000s';
   var animation = div.getAnimations()[0];
   animation.cancel();
   assert_equals(animation.playState, 'idle');
 }, 'Animation returns correct playState when cancelled');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_animation-ready.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true],
-            ["dom.animations-api.pending-member.enabled", true]]},
-  function() {
-    window.open("file_animation-ready.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-animations/file_animation-ready.html
rename to dom/animation/test/css-animations/test_animation-ready_to_rename.html
--- a/dom/animation/test/css-animations/file_animation-ready.html
+++ b/dom/animation/test/css-animations/test_animation-ready_to_rename.html
@@ -1,17 +1,20 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 @keyframes abc {
   to { transform: translate(10px) }
 }
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 promise_test(function(t) {
   var div = addDiv(t);
   div.style.animation = 'abc 100s paused';
   var animation = div.getAnimations()[0];
   var originalReadyPromise = animation.ready;
@@ -137,11 +140,10 @@ promise_test(function(t) {
   }).then(function(resolvedAnimation) {
     assert_equals(resolvedAnimation, animation,
                   'Promise received when ready Promise for a pause operation'
                   + ' is completed is the animation on which the pause was'
                   + ' performed');
   });
 }, 'When a pause is complete the Promise callback gets the correct animation');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_animation-reverse.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_animation-reverse.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-animations/file_animation-reverse.html
rename to dom/animation/test/css-animations/test_animation-reverse_to_rename.html
--- a/dom/animation/test/css-animations/file_animation-reverse.html
+++ b/dom/animation/test/css-animations/test_animation-reverse_to_rename.html
@@ -1,29 +1,30 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 @keyframes anim {
   to { transform: translate(100px) }
 }
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 test(function(t) {
   var div = addDiv(t, { style: 'animation: anim 100s' });
   var animation = div.getAnimations()[0];
   div.style.animation = "";
   flushComputedStyle(div);
 
   assert_equals(animation.currentTime, null);
   animation.reverse();
 
   assert_equals(animation.currentTime, 100 * MS_PER_SEC,
     'animation.currentTime should be its effect end');
 }, 'reverse() from idle state starts playing the animation');
 
-
-done();
 </script>
 </body>
--- a/dom/animation/test/css-animations/test_animation-starttime.html
+++ b/dom/animation/test/css-animations/test_animation-starttime.html
@@ -2,16 +2,17 @@
 <meta charset=utf-8>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
 <script>
 'use strict';
 setup({explicit_done: true});
 SpecialPowers.pushPrefEnv(
-  { "set": 
-      [["dom.animations-api.core.enabled", true],
-       ["privacy.reduceTimerPrecision", false]]},
+  {
+    set: [['privacy.reduceTimerPrecision', false]],
+  },
   function() {
-    window.open("file_animation-starttime.html");
-  });
+    window.open('file_animation-starttime.html');
+  }
+);
 </script>
 </html>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_animations-dynamic-changes.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_animations-dynamic-changes.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-animations/file_animations-dynamic-changes.html
rename to dom/animation/test/css-animations/test_animations-dynamic-changes_to_rename.html
--- a/dom/animation/test/css-animations/file_animations-dynamic-changes.html
+++ b/dom/animation/test/css-animations/test_animations-dynamic-changes_to_rename.html
@@ -1,18 +1,21 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 @keyframes anim1 {
   to { left: 100px }
 }
 @keyframes anim2 { }
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 promise_test(function(t) {
   var div = addDiv(t);
   div.style.animation = 'anim1 100s';
   var originalAnimation = div.getAnimations()[0];
   var originalStartTime;
@@ -146,11 +149,10 @@ promise_test(function(t) {
     assert_greater_than(animations[1].startTime, animations[0].startTime,
                         'Interleaved animation starts later than existing ' +
                         'animations');
     assert_greater_than(animations[0].startTime, animations[2].startTime,
                         'Original animations retain their start time');
   });
 }, 'Animation state is preserved when interleaving animations in list');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_cssanimation-animationname.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_cssanimation-animationname.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-animations/file_cssanimation-animationname.html
rename to dom/animation/test/css-animations/test_cssanimation-animationname_to_rename.html
--- a/dom/animation/test/css-animations/file_cssanimation-animationname.html
+++ b/dom/animation/test/css-animations/test_cssanimation-animationname_to_rename.html
@@ -1,17 +1,20 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 @keyframes xyz {
   to { left: 100px }
 }
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 test(function(t) {
   var div = addDiv(t);
   div.style.animation = 'xyz 100s';
   assert_equals(div.getAnimations()[0].animationName, 'xyz',
                 'Animation name matches keyframes rule name');
@@ -27,11 +30,10 @@ test(function(t) {
 test(function(t) {
   var div = addDiv(t);
   div.style.animation = 'x\\79 z 100s';
   assert_equals(div.getAnimations()[0].animationName, 'xyz',
                 'Hex-escaped animation name matches keyframes rule'
                 + ' name');
 }, 'Animation name with hex-escape');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_document-get-animations.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_document-get-animations.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-animations/file_document-get-animations.html
rename to dom/animation/test/css-animations/test_document-get-animations_to_rename.html
--- a/dom/animation/test/css-animations/file_document-get-animations.html
+++ b/dom/animation/test/css-animations/test_document-get-animations_to_rename.html
@@ -1,10 +1,12 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 @keyframes animLeft {
   to { left: 100px }
 }
 @keyframes animTop {
   to { top: 100px }
 }
@@ -17,16 +19,17 @@
 ::before {
   content: ''
 }
 ::after {
   content: ''
 }
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 test(function(t) {
   assert_equals(document.getAnimations().length, 0,
     'getAnimations returns an empty sequence for a document'
     + ' with no animations');
 }, 'getAnimations for non-animated content');
@@ -272,11 +275,10 @@ test(function(t) {
                 'The animation targeting the ::before element comes second');
   assert_equals(anims[2].effect.target.type, '::after',
                 'The animation targeting the ::after element comes third');
   assert_equals(anims[3].effect.target, child,
                 'The animation targeting the child element comes last');
 }, 'CSS Animations targetting (pseudo-)elements should have correct order ' +
    'after sorting');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_effect-target.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_effect-target.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-animations/file_effect-target.html
rename to dom/animation/test/css-animations/test_effect-target_to_rename.html
--- a/dom/animation/test/css-animations/file_effect-target.html
+++ b/dom/animation/test/css-animations/test_effect-target_to_rename.html
@@ -1,21 +1,24 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 @keyframes anim { }
 ::before {
   content: ''
 }
 ::after {
   content: ''
 }
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 test(function(t) {
   var div = addDiv(t);
   div.style.animation = 'anim 100s';
   var animation = div.getAnimations()[0];
   assert_equals(animation.effect.target, div,
@@ -50,11 +53,10 @@ test(function(t) {
                 'The effect.target of the scripted-generated animation is ' +
                 'the same as the one from the argument of ' +
                 'KeyframeEffectReadOnly constructor');
   assert_equals(anims[0].effect.target, newAnim.effect.target,
                 'Both animations return the same target object');
 }, 'effect.target from the script-generated animation should return the same ' +
    'CSSPseudoElement object as that from the CSS generated animation');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_element-get-animations.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true],
-            ["dom.animations-api.pending-member.enabled", true]]},
-  function() {
-    window.open("file_element-get-animations.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-animations/file_element-get-animations.html
rename to dom/animation/test/css-animations/test_element-get-animations_to_rename.html
--- a/dom/animation/test/css-animations/file_element-get-animations.html
+++ b/dom/animation/test/css-animations/test_element-get-animations_to_rename.html
@@ -1,10 +1,12 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 @keyframes anim1 {
   to { left: 100px }
 }
 @keyframes anim2 {
   to { top: 100px }
 }
@@ -15,16 +17,17 @@
   content: ''
 }
 ::after {
   content: ''
 }
 @keyframes empty { }
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 test(function(t) {
   var div = addDiv(t);
   assert_equals(div.getAnimations().length, 0,
     'getAnimations returns an empty sequence for an element'
     + ' with no animations');
@@ -441,11 +444,10 @@ test(function(t) {
                 'should be returned fourth');
 
   assert_equals(animations[4].effect.target, child2,
                 'The animation targeting the child2 element ' +
                 'should be returned last');
 
 }, 'Test AnimationFilter{ subtree: true } with element that has many descendant');
 
-done();
 </script>
 </body>
--- a/dom/animation/test/css-animations/test_event-dispatch.html
+++ b/dom/animation/test/css-animations/test_event-dispatch.html
@@ -2,16 +2,17 @@
 <meta charset=utf-8>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
 <script>
 'use strict';
 setup({explicit_done: true});
 SpecialPowers.pushPrefEnv(
-  { "set":
-  	  [["dom.animations-api.core.enabled", true],
-       ["privacy.reduceTimerPrecision", false]]},
+  {
+    set: [['privacy.reduceTimerPrecision', false]],
+  },
   function() {
-    window.open("file_event-dispatch.html");
-  });
+    window.open('file_event-dispatch.html');
+  }
+);
 </script>
 </html>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_event-order.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_event-order.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-animations/file_event-order.html
rename to dom/animation/test/css-animations/test_event-order_to_rename.html
--- a/dom/animation/test/css-animations/file_event-order.html
+++ b/dom/animation/test/css-animations/test_event-order_to_rename.html
@@ -1,20 +1,23 @@
 <!doctype html>
 <meta charset=utf-8>
 <title>Tests for CSS animation event order</title>
 <link rel="help" href="https://drafts.csswg.org/css-animations-2/#event-dispatch"/>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
   @keyframes anim {
     from { margin-left: 0px; }
     to { margin-left: 100px; }
   }
 </style>
 <body>
+<div id="log"></div>
 <script type='text/javascript'>
 'use strict';
 
 /**
  * Asserts that the set of actual and received events match.
  * @param actualEvents   An array of the received AnimationEvent objects.
  * @param expectedEvents A series of array objects representing the expected
  *        events, each having the form:
@@ -150,12 +153,11 @@ promise_test(t => {
                                            'animationend' ]) ]).then(() => {
     checkEvents(events, ['animationstart', div2, 0],
                         ['animationstart', div1, 0],
                         ['animationend',   div1, 100],
                         ['animationend',   div2, 200]);
   });
 }, 'Test start and end events are sorted correctly when fired simultaneously');
 
-done();
 </script>
 </body>
 </html>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_keyframeeffect-getkeyframes.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_keyframeeffect-getkeyframes.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-animations/file_keyframeeffect-getkeyframes.html
rename to dom/animation/test/css-animations/test_keyframeeffect-getkeyframes_to_rename.html
--- a/dom/animation/test/css-animations/file_keyframeeffect-getkeyframes.html
+++ b/dom/animation/test/css-animations/test_keyframeeffect-getkeyframes_to_rename.html
@@ -1,10 +1,12 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 @keyframes anim-empty { }
 
 @keyframes anim-empty-frames {
   from { }
   to   { }
 }
@@ -148,16 +150,17 @@
   to { --end-color: rgb(0, 255, 0); color: var(--end-color) }
 }
 @keyframes anim-only-custom-property-in-keyframe {
   from { transform: translate(100px, 0) }
   to { --not-used: 200px }
 }
 </style>
 <body>
+<div id="log"></div>
 <script>
 "use strict";
 
 function getKeyframes(e) {
   return e.getAnimations()[0].effect.getKeyframes();
 }
 
 function assert_frames_equal(a, b, name) {
@@ -744,11 +747,10 @@ test(function(t) {
       transform: "none" },
   ];
   for (var i = 0; i < frames.length; i++) {
     assert_frames_equal(frames[i], expected[i], "ComputedKeyframe #" + i);
   }
 }, 'KeyframeEffectReadOnly.getKeyframes() returns expected values for ' +
    'animations with only custom property in a keyframe');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_pseudoElement-get-animations.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_pseudoElement-get-animations.html");
-  });
-</script>
rename from dom/animation/test/css-animations/file_pseudoElement-get-animations.html
rename to dom/animation/test/css-animations/test_pseudoElement-get-animations_to_rename.html
--- a/dom/animation/test/css-animations/file_pseudoElement-get-animations.html
+++ b/dom/animation/test/css-animations/test_pseudoElement-get-animations_to_rename.html
@@ -1,10 +1,12 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 @keyframes anim1 { }
 @keyframes anim2 { }
 .before::before {
   animation: anim1 10s;
   content: '';
 }
@@ -17,16 +19,17 @@
 }
 .after-change::after {
   width: 100px;
   height: 100px;
   content: '';
 }
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 test(function(t) {
   var div = addDiv(t, { class: 'before' });
   var pseudoTarget = document.getAnimations()[0].effect.target;
   assert_equals(pseudoTarget.getAnimations().length, 1,
                 'Expected number of animations are returned');
@@ -62,11 +65,10 @@ test(function(t) {
                 '3rd animation is the 1st animation in animation-name list');
   assert_equals(anims[3].animationName, 'anim2',
                 '4rd animation is the 2nd animation in animation-name list');
   assert_equals(anims[4].id, 'scripted-anim',
                 'Animation added by script appears last');
 }, 'getAnimations returns css transitions/animations, and script-generated ' +
    'animations in the expected order');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-animations/test_setting-effect.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src='/resources/testharness.js'></script>
-<script src='/resources/testharnessreport.js'></script>
-<div id='log'></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true],
-            ["dom.animations-api.pending-member.enabled", true]]},
-  function() {
-    window.open('file_setting-effect.html');
-  });
-</script>
rename from dom/animation/test/css-animations/file_setting-effect.html
rename to dom/animation/test/css-animations/test_setting-effect_to_rename.html
--- a/dom/animation/test/css-animations/file_setting-effect.html
+++ b/dom/animation/test/css-animations/test_setting-effect_to_rename.html
@@ -1,22 +1,25 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src='../testcommon.js'></script>
 <style>
   @keyframes anim {
     from {
       margin-left: 0px;
     }
     to {
       margin-left: 100px;
     }
   }
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 promise_test(function(t) {
   var div = addDiv(t);
   div.style.animation = 'anim 100s';
 
   var watcher = new EventWatcher(t, div, [ 'animationend',
@@ -120,11 +123,10 @@ promise_test(function(t) {
     animation.effect = new KeyframeEffect(div,
                                           { left: [ '0px', '100px' ] },
                                           200 * MS_PER_SEC);
     return watcher.wait_for('animationstart');
   });
 }, 'After replacing a finished animation\'s effect with a longer one ' +
    'it fires an animationstart event');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-transitions/test_animation-cancel.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_animation-cancel.html");
-  });
-</script>
rename from dom/animation/test/css-transitions/file_animation-cancel.html
rename to dom/animation/test/css-transitions/test_animation-cancel_to_rename.html
--- a/dom/animation/test/css-transitions/file_animation-cancel.html
+++ b/dom/animation/test/css-transitions/test_animation-cancel_to_rename.html
@@ -1,12 +1,15 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 promise_test(function(t) {
   var div = addDiv(t, { style: 'margin-left: 0px' });
   flushComputedStyle(div);
 
   div.style.transition = 'margin-left 100s';
@@ -223,11 +226,10 @@ promise_test(function(t) {
     div.style.marginLeft = '0px';
     flushComputedStyle(div);
     return waitForFrame();
   }).then(function() {
     assert_equals(transition.playState, 'idle');
   });
 }, 'Reversing a running transition cancels the original transition');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-transitions/test_animation-computed-timing.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_animation-computed-timing.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-transitions/file_animation-computed-timing.html
rename to dom/animation/test/css-transitions/test_animation-computed-timing_to_rename.html
--- a/dom/animation/test/css-transitions/file_animation-computed-timing.html
+++ b/dom/animation/test/css-transitions/test_animation-computed-timing_to_rename.html
@@ -1,19 +1,22 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 
 .animated-div {
   margin-left: 100px;
 }
 
 </style>
 <body>
+<div id="log"></div>
 <script>
 
 'use strict';
 
 // --------------------
 // delay
 // --------------------
 test(function(t) {
@@ -305,11 +308,10 @@ test(function(t) {
   div.style.marginLeft = '10px';
 
   var anim = div.getAnimations()[0];
   anim.finish();
   assert_equals(anim.effect.getComputedTiming().currentIteration, null,
                 'finished currentIteration');
 }, 'currentIteration of a finished transition');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-transitions/test_animation-currenttime.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_animation-currenttime.html");
-  });
-</script>
rename from dom/animation/test/css-transitions/file_animation-currenttime.html
rename to dom/animation/test/css-transitions/test_animation-currenttime_to_rename.html
--- a/dom/animation/test/css-transitions/file_animation-currenttime.html
+++ b/dom/animation/test/css-transitions/test_animation-currenttime_to_rename.html
@@ -7,19 +7,22 @@
     <style>
 
 .animated-div {
   margin-left: 100px;
   transition: margin-left 1000s linear 1000s;
 }
 
     </style>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
     <script src="../testcommon.js"></script>
   </head>
   <body>
+    <div id="log"></div>
     <script type="text/javascript">
 
 'use strict';
 
 // TODO: Once the computedTiming property is implemented, add checks to the
 // checker helpers to ensure that computedTiming's properties are updated as
 // expected.
 // See https://bugzilla.mozilla.org/show_bug.cgi?id=1108055
@@ -296,12 +299,11 @@ async_test(function(t) {
       'Animation.currentTime is unchanged after pausing');
   })).catch(t.step_func(function(reason) {
     assert_unreached(reason);
   })).then(function() {
     t.done();
   });
 }, 'Animation.currentTime after pausing');
 
-done();
     </script>
   </body>
 </html>
deleted file mode 100644
--- a/dom/animation/test/css-transitions/test_animation-finished.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_animation-finished.html");
-  });
-</script>
rename from dom/animation/test/css-transitions/file_animation-finished.html
rename to dom/animation/test/css-transitions/test_animation-finished_to_rename.html
--- a/dom/animation/test/css-transitions/file_animation-finished.html
+++ b/dom/animation/test/css-transitions/test_animation-finished_to_rename.html
@@ -1,20 +1,23 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 
 .animated-div {
   margin-left: 100px;
   transition: margin-left 1000s linear 1000s;
 }
 
 </style>
 <body>
+<div id="log"></div>
 <script>
 
 'use strict';
 
 const ANIM_DELAY_MS = 1000000; // 1000s
 const ANIM_DUR_MS = 1000000; // 1000s
 
 async_test(function(t) {
@@ -51,11 +54,10 @@ async_test(function(t) {
     // 1108055) we should use that here.
     assert_equals(animation.currentTime, ANIM_DELAY_MS + ANIM_DUR_MS,
                   'Replaying a finished reversed transition should reset ' +
                   'its currentTime to the end of the effect');
     t.done();
   }));
 }, 'Test restarting a reversed finished transition');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-transitions/test_animation-pausing.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_animation-pausing.html");
-  });
-</script>
rename from dom/animation/test/css-transitions/file_animation-pausing.html
rename to dom/animation/test/css-transitions/test_animation-pausing_to_rename.html
--- a/dom/animation/test/css-transitions/file_animation-pausing.html
+++ b/dom/animation/test/css-transitions/test_animation-pausing_to_rename.html
@@ -1,12 +1,15 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 async_test(function(t) {
   var div = addDiv(t);
   var cs = getComputedStyle(div);
 
   div.style.marginLeft = '0px';
@@ -38,11 +41,10 @@ async_test(function(t) {
   })).then(t.step_func(function() {
     assert_greater_than(animation.effect.getComputedTiming().progress,
                         previousProgress,
                         'Iteration progress increases after calling play()');
     t.done();
   }));
 }, 'pause() and play() a transition');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-transitions/test_animation-ready.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true],
-            ["dom.animations-api.pending-member.enabled", true]]},
-  function() {
-    window.open("file_animation-ready.html");
-  });
-</script>
rename from dom/animation/test/css-transitions/file_animation-ready.html
rename to dom/animation/test/css-transitions/test_animation-ready_to_rename.html
--- a/dom/animation/test/css-transitions/file_animation-ready.html
+++ b/dom/animation/test/css-transitions/test_animation-ready_to_rename.html
@@ -1,12 +1,15 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 async_test(function(t) {
   var div = addDiv(t);
   div.style.transform = 'translate(0px)';
   getComputedStyle(div).transform;
   div.style.transition = 'transform 100s';
@@ -86,11 +89,10 @@ async_test(function(t) {
 
   // Now update the transition to animate to something not-interpolable
   div.style.marginLeft = 'auto';
   getComputedStyle(div).marginLeft;
 
 }, 'ready promise is rejected when a transition is cancelled by changing'
    + ' the transition property to something not interpolable');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-transitions/test_animation-starttime.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_animation-starttime.html");
-  });
-</script>
rename from dom/animation/test/css-transitions/file_animation-starttime.html
rename to dom/animation/test/css-transitions/test_animation-starttime_to_rename.html
--- a/dom/animation/test/css-transitions/file_animation-starttime.html
+++ b/dom/animation/test/css-transitions/test_animation-starttime_to_rename.html
@@ -7,19 +7,22 @@
     <style>
 
 .animated-div {
   margin-left: 100px;
   transition: margin-left 1000s linear 1000s;
 }
 
     </style>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
     <script src="../testcommon.js"></script>
   </head>
   <body>
+    <div id="log"></div>
     <script type="text/javascript">
 
 'use strict';
 
 // TODO: Once the computedTiming property is implemented, add checks to the
 // checker helpers to ensure that computedTiming's properties are updated as
 // expected.
 // See https://bugzilla.mozilla.org/show_bug.cgi?id=1108055
@@ -273,12 +276,11 @@ async_test(function(t) {
       'Animation.playState is "paused" after pause() call');
   })).catch(t.step_func(function(reason) {
     assert_unreached(reason);
   })).then(function() {
     t.done();
   });
 }, 'Animation.startTime after paused');
 
-done();
     </script>
   </body>
 </html>
deleted file mode 100644
--- a/dom/animation/test/css-transitions/test_csstransition-transitionproperty.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_csstransition-transitionproperty.html");
-  });
-</script>
rename from dom/animation/test/css-transitions/file_csstransition-transitionproperty.html
rename to dom/animation/test/css-transitions/test_csstransition-transitionproperty_to_rename.html
--- a/dom/animation/test/css-transitions/file_csstransition-transitionproperty.html
+++ b/dom/animation/test/css-transitions/test_csstransition-transitionproperty_to_rename.html
@@ -1,12 +1,15 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 test(function(t) {
   var div = addDiv(t);
 
   // Add a transition
   div.style.left = '0px';
@@ -14,11 +17,10 @@ test(function(t) {
   div.style.transition = 'all 100s';
   div.style.left = '100px';
 
   assert_equals(div.getAnimations()[0].transitionProperty, 'left',
                 'The transitionProperty for the corresponds to the specific ' +
                 'property being transitioned');
 }, 'CSSTransition.transitionProperty');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-transitions/test_document-get-animations.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_document-get-animations.html");
-  });
-</script>
-</html>
rename from dom/animation/test/css-transitions/file_document-get-animations.html
rename to dom/animation/test/css-transitions/test_document-get-animations_to_rename.html
--- a/dom/animation/test/css-transitions/file_document-get-animations.html
+++ b/dom/animation/test/css-transitions/test_document-get-animations_to_rename.html
@@ -1,12 +1,15 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 test(function(t) {
   assert_equals(document.getAnimations().length, 0,
     'getAnimations returns an empty sequence for a document'
     + ' with no animations');
 }, 'getAnimations for non-animated content');
@@ -83,11 +86,10 @@ async_test(function(t) {
   assert_equals(animations.length, 1, 'Got transition');
   animations[0].finished.then(t.step_func(function() {
     assert_equals(document.getAnimations().length, 0,
                   'No animations returned');
     t.done();
   }));
 }, 'Transitions are not returned after they have finished');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-transitions/test_effect-target.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_effect-target.html");
-  });
-</script>
rename from dom/animation/test/css-transitions/file_effect-target.html
rename to dom/animation/test/css-transitions/test_effect-target_to_rename.html
--- a/dom/animation/test/css-transitions/file_effect-target.html
+++ b/dom/animation/test/css-transitions/test_effect-target_to_rename.html
@@ -1,12 +1,15 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 test(function(t) {
   var div = addDiv(t);
 
   div.style.left = '0px';
   getComputedStyle(div).transitionProperty;
@@ -56,11 +59,10 @@ test(function(t) {
                 'the same as the one from the argument of ' +
                 'KeyframeEffectReadOnly constructor');
   assert_equals(anims[0].effect.target, newAnim.effect.target,
                 'Both the transition and the scripted-generated animation ' +
                 'return the same target object');
 }, 'effect.target from the script-generated animation should return the same ' +
    'CSSPseudoElement object as that from the CSS generated transition');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-transitions/test_element-get-animations.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_element-get-animations.html");
-  });
-</script>
rename from dom/animation/test/css-transitions/file_element-get-animations.html
rename to dom/animation/test/css-transitions/test_element-get-animations_to_rename.html
--- a/dom/animation/test/css-transitions/file_element-get-animations.html
+++ b/dom/animation/test/css-transitions/test_element-get-animations_to_rename.html
@@ -1,12 +1,15 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 async_test(function(t) {
   var div = addDiv(t);
 
   // FIXME: This test does too many things. It should be split up.
 
@@ -137,11 +140,10 @@ test(function(t) {
   assert_equals(div.getAnimations().length, 2,
                 'Then a second (opacity) transition is added');
 
   var animations = div.getAnimations();
   assert_equals(animations[0].transitionProperty, 'transform');
   assert_equals(animations[1].transitionProperty, 'opacity');
 }, 'getAnimations sorts transitions by when they were generated');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-transitions/test_event-dispatch.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_event-dispatch.html");
-  });
-</script>
rename from dom/animation/test/css-transitions/file_event-dispatch.html
rename to dom/animation/test/css-transitions/test_event-dispatch_to_rename.html
--- a/dom/animation/test/css-transitions/file_event-dispatch.html
+++ b/dom/animation/test/css-transitions/test_event-dispatch_to_rename.html
@@ -1,14 +1,17 @@
 <!doctype html>
 <meta charset=utf-8>
 <title>Tests for CSS-Transition events</title>
 <link rel="help" href="https://drafts.csswg.org/css-transitions-2/#transition-events">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 /**
  * Helper class to record the elapsedTime member of each event.
  * The EventWatcher class in testharness.js allows us to wait on
  * multiple events in a certain order but only records the event
  * parameters of the most recent event.
@@ -463,12 +466,11 @@ promise_test(t => {
   }).then(evt => {
     transition.cancel();
 
     // Then wait a couple of frames and check that no event was dispatched
     return waitForAnimationFrames(2);
   });
 }, 'Cancel the transition after clearing the target effect');
 
-done();
 </script>
 </body>
 </html>
deleted file mode 100644
--- a/dom/animation/test/css-transitions/test_keyframeeffect-getkeyframes.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_keyframeeffect-getkeyframes.html");
-  });
-</script>
rename from dom/animation/test/css-transitions/file_keyframeeffect-getkeyframes.html
rename to dom/animation/test/css-transitions/test_keyframeeffect-getkeyframes_to_rename.html
--- a/dom/animation/test/css-transitions/file_keyframeeffect-getkeyframes.html
+++ b/dom/animation/test/css-transitions/test_keyframeeffect-getkeyframes_to_rename.html
@@ -1,17 +1,20 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 :root {
   --var-100px: 100px;
 }
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 function getKeyframes(e) {
   return e.getAnimations()[0].effect.getKeyframes();
 }
 
 function assert_frames_equal(a, b, name) {
@@ -91,11 +94,10 @@ test(function(t) {
       left: '100px' },
   ];
   for (var i = 0; i < frames.length; i++) {
     assert_frames_equal(frames[i], expected[i], "ComputedKeyframe #" + i);
   }
 }, 'KeyframeEffectReadOnly.getKeyframes() returns expected frames for a'
    + ' transition with a CSS variable endpoint');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-transitions/test_pseudoElement-get-animations.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_pseudoElement-get-animations.html");
-  });
-</script>
rename from dom/animation/test/css-transitions/file_pseudoElement-get-animations.html
rename to dom/animation/test/css-transitions/test_pseudoElement-get-animations_to_rename.html
--- a/dom/animation/test/css-transitions/file_pseudoElement-get-animations.html
+++ b/dom/animation/test/css-transitions/test_pseudoElement-get-animations_to_rename.html
@@ -1,26 +1,29 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 .init::before {
   content: '';
   height: 0px;
   width: 0px;
   opacity: 0;
   transition: all 100s;
 }
 .change::before {
   height: 100px;
   width: 100px;
   opacity: 1;
 }
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 test(function(t) {
   var div = addDiv(t, { class: 'init' });
   flushComputedStyle(div);
   div.classList.add('change');
 
@@ -35,11 +38,10 @@ test(function(t) {
   var anims = pseudoTarget.getAnimations();
   assert_equals(anims.length, 3,
                 'Got expected number of animations on pseudo-element');
   assert_equals(anims[0].transitionProperty, 'height');
   assert_equals(anims[1].transitionProperty, 'opacity');
   assert_equals(anims[2].transitionProperty, 'width');
 }, 'getAnimations sorts simultaneous transitions by name');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/css-transitions/test_setting-effect.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src='/resources/testharness.js'></script>
-<script src='/resources/testharnessreport.js'></script>
-<div id='log'></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true],
-            ["dom.animations-api.pending-member.enabled", true]]},
-  function() {
-    window.open('file_setting-effect.html');
-  });
-</script>
rename from dom/animation/test/css-transitions/file_setting-effect.html
rename to dom/animation/test/css-transitions/test_setting-effect_to_rename.html
--- a/dom/animation/test/css-transitions/file_setting-effect.html
+++ b/dom/animation/test/css-transitions/test_setting-effect_to_rename.html
@@ -1,12 +1,15 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src='../testcommon.js'></script>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 promise_test(function(t) {
   var div = addDiv(t);
   var watcher = new EventWatcher(t, div, [ 'transitionend',
                                            'transitioncancel' ]);
   div.style.left = '0px';
@@ -90,11 +93,10 @@ promise_test(function(t) {
   assert_equals(transition.transitionProperty, 'left');
   assert_true(transition.pending);
 
   return transition.ready.then(function() {
     assert_false(transition.pending);
   });
 }, 'Test for setting a new keyframe effect to a pending transition');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/document-timeline/test_document-timeline.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_document-timeline.html");
-  });
-</script>
rename from dom/animation/test/document-timeline/file_document-timeline.html
rename to dom/animation/test/document-timeline/test_document-timeline_to_rename.html
--- a/dom/animation/test/document-timeline/file_document-timeline.html
+++ b/dom/animation/test/document-timeline/test_document-timeline_to_rename.html
@@ -1,14 +1,17 @@
 <!doctype html>
 <meta charset=utf-8>
 <title>Web Animations API: DocumentTimeline tests</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <iframe srcdoc='<html><meta charset=utf-8></html>' width="10" height="10" id="iframe"></iframe>
 <iframe srcdoc='<html style="display:none"><meta charset=utf-8></html>' width="10" height="10" id="hidden-iframe"></iframe>
+<div id="log"></div>
 <script>
 'use strict';
 
 test(function() {
   assert_equals(document.timeline, document.timeline,
     'document.timeline returns the same object every time');
   var iframe = document.getElementById('iframe');
   assert_not_equals(document.timeline, iframe.contentDocument.timeline,
@@ -126,10 +129,9 @@ async_test(function(t) {
 
   if (hiddenIFrame.contentDocument.readyState === 'complete') {
     testToRunOnLoad();
   } else {
     hiddenIFrame.addEventListener("load", testToRunOnLoad);
   }
 }, 'document.timeline.currentTime hidden subframe dynamic test');
 
-done();
 </script>
--- a/dom/animation/test/mochitest.ini
+++ b/dom/animation/test/mochitest.ini
@@ -1,134 +1,87 @@
 [DEFAULT]
+prefs =
+  dom.animations-api.core.enabled=true
+  dom.animations-api.pending-member.enabled=true
 # Support files for chrome tests that we want to load over HTTP need
 # to go in here, not chrome.ini.
 support-files =
-  chrome/file_animate_xrays.html
-  css-animations/file_animation-cancel.html
-  css-animations/file_animation-computed-timing.html
-  css-animations/file_animation-currenttime.html
-  css-animations/file_animation-finish.html
-  css-animations/file_animation-finished.html
-  css-animations/file_animation-id.html
-  css-animations/file_animation-pausing.html
-  css-animations/file_animation-playstate.html
-  css-animations/file_animation-ready.html
-  css-animations/file_animation-reverse.html
   css-animations/file_animation-starttime.html
-  css-animations/file_animations-dynamic-changes.html
-  css-animations/file_cssanimation-animationname.html
-  css-animations/file_document-get-animations.html
-  css-animations/file_effect-target.html
-  css-animations/file_element-get-animations.html
   css-animations/file_event-dispatch.html
-  css-animations/file_event-order.html
-  css-animations/file_keyframeeffect-getkeyframes.html
-  css-animations/file_pseudoElement-get-animations.html
-  css-animations/file_setting-effect.html
-  css-transitions/file_animation-cancel.html
-  css-transitions/file_animation-computed-timing.html
-  css-transitions/file_animation-currenttime.html
-  css-transitions/file_animation-finished.html
-  css-transitions/file_animation-pausing.html
-  css-transitions/file_animation-ready.html
-  css-transitions/file_animation-starttime.html
-  css-transitions/file_csstransition-transitionproperty.html
-  css-transitions/file_document-get-animations.html
-  css-transitions/file_effect-target.html
-  css-transitions/file_element-get-animations.html
-  css-transitions/file_event-dispatch.html
-  css-transitions/file_keyframeeffect-getkeyframes.html
-  css-transitions/file_pseudoElement-get-animations.html
-  css-transitions/file_setting-effect.html
-  document-timeline/file_document-timeline.html
+  chrome/file_animate_xrays.html
   mozilla/xhr_doc.html
-  mozilla/file_cubic_bezier_limits.html
-  mozilla/file_deferred_start.html
-  mozilla/file_disabled_properties.html
   mozilla/file_disable_animations_api_core.html
   mozilla/file_discrete-animations.html
-  mozilla/file_document-timeline-origin-time-range.html
-  mozilla/file_hide_and_show.html
   mozilla/file_restyles.html
-  mozilla/file_restyling_xhr_doc.html
-  mozilla/file_set-easing.html
-  mozilla/file_transform_limits.html
   mozilla/file_transition_finish_on_compositor.html
-  mozilla/file_underlying-discrete-value.html
-  style/file_animation-seeking-with-current-time.html
-  style/file_animation-seeking-with-start-time.html
-  style/file_animation-setting-effect.html
-  style/file_composite.html
-  style/file_missing-keyframe.html
-  style/file_missing-keyframe-on-compositor.html
   ../../../layout/style/test/property_database.js
   testcommon.js
 
-[css-animations/test_animations-dynamic-changes.html]
-[css-animations/test_animation-cancel.html]
-[css-animations/test_animation-computed-timing.html]
-[css-animations/test_animation-currenttime.html]
-[css-animations/test_animation-finish.html]
-[css-animations/test_animation-finished.html]
-[css-animations/test_animation-id.html]
-[css-animations/test_animation-pausing.html]
-[css-animations/test_animation-playstate.html]
-[css-animations/test_animation-ready.html]
-[css-animations/test_animation-reverse.html]
+[css-animations/test_animations-dynamic-changes_to_rename.html]
+[css-animations/test_animation-cancel_to_rename.html]
+[css-animations/test_animation-computed-timing_to_rename.html]
+[css-animations/test_animation-currenttime_to_rename.html]
+[css-animations/test_animation-finish_to_rename.html]
+[css-animations/test_animation-finished_to_rename.html]
+[css-animations/test_animation-id_to_rename.html]
+[css-animations/test_animation-pausing_to_rename.html]
+[css-animations/test_animation-playstate_to_rename.html]
+[css-animations/test_animation-ready_to_rename.html]
+[css-animations/test_animation-reverse_to_rename.html]
 [css-animations/test_animation-starttime.html]
-[css-animations/test_cssanimation-animationname.html]
-[css-animations/test_document-get-animations.html]
-[css-animations/test_effect-target.html]
-[css-animations/test_element-get-animations.html]
+[css-animations/test_cssanimation-animationname_to_rename.html]
+[css-animations/test_document-get-animations_to_rename.html]
+[css-animations/test_effect-target_to_rename.html]
+[css-animations/test_element-get-animations_to_rename.html]
 [css-animations/test_event-dispatch.html]
-[css-animations/test_event-order.html]
-[css-animations/test_keyframeeffect-getkeyframes.html]
-[css-animations/test_pseudoElement-get-animations.html]
-[css-animations/test_setting-effect.html]
-[css-transitions/test_animation-cancel.html]
-[css-transitions/test_animation-computed-timing.html]
-[css-transitions/test_animation-currenttime.html]
-[css-transitions/test_animation-finished.html]
-[css-transitions/test_animation-pausing.html]
-[css-transitions/test_animation-ready.html]
-[css-transitions/test_animation-starttime.html]
-[css-transitions/test_csstransition-transitionproperty.html]
-[css-transitions/test_document-get-animations.html]
-[css-transitions/test_effect-target.html]
-[css-transitions/test_element-get-animations.html]
-[css-transitions/test_event-dispatch.html]
-[css-transitions/test_keyframeeffect-getkeyframes.html]
-[css-transitions/test_pseudoElement-get-animations.html]
-[css-transitions/test_setting-effect.html]
-[document-timeline/test_document-timeline.html]
+[css-animations/test_event-order_to_rename.html]
+[css-animations/test_keyframeeffect-getkeyframes_to_rename.html]
+[css-animations/test_pseudoElement-get-animations_to_rename.html]
+[css-animations/test_setting-effect_to_rename.html]
+[css-transitions/test_animation-cancel_to_rename.html]
+[css-transitions/test_animation-computed-timing_to_rename.html]
+[css-transitions/test_animation-currenttime_to_rename.html]
+[css-transitions/test_animation-finished_to_rename.html]
+[css-transitions/test_animation-pausing_to_rename.html]
+[css-transitions/test_animation-ready_to_rename.html]
+[css-transitions/test_animation-starttime_to_rename.html]
+[css-transitions/test_csstransition-transitionproperty_to_rename.html]
+[css-transitions/test_document-get-animations_to_rename.html]
+[css-transitions/test_effect-target_to_rename.html]
+[css-transitions/test_element-get-animations_to_rename.html]
+[css-transitions/test_event-dispatch_to_rename.html]
+[css-transitions/test_keyframeeffect-getkeyframes_to_rename.html]
+[css-transitions/test_pseudoElement-get-animations_to_rename.html]
+[css-transitions/test_setting-effect_to_rename.html]
+[document-timeline/test_document-timeline_to_rename.html]
 [document-timeline/test_request_animation_frame.html]
 [mozilla/test_cascade.html]
-[mozilla/test_cubic_bezier_limits.html]
+[mozilla/test_cubic_bezier_limits_to_rename.html]
 [mozilla/test_deferred_start.html]
 skip-if = (toolkit == 'android' && debug) || (os == 'win' && bits == 64) || webrender # Bug 1363957; bug 1424752 for webrender
 [mozilla/test_disable_animations_api_core.html]
-[mozilla/test_disabled_properties.html]
+[mozilla/test_disabled_properties_to_rename.html]
 [mozilla/test_discrete-animations.html]
 [mozilla/test_distance_of_basic_shape.html]
 [mozilla/test_distance_of_filter.html]
 [mozilla/test_distance_of_transform.html]
-[mozilla/test_document-timeline-origin-time-range.html]
-[mozilla/test_hide_and_show.html]
+[mozilla/test_document_timeline_origin_time_range.html]
+[mozilla/test_hide_and_show_to_rename.html]
 [mozilla/test_moz-prefixed-properties.html]
 [mozilla/test_restyles.html]
 skip-if = webrender # bug 1424752
-[mozilla/test_restyling_xhr_doc.html]
-[mozilla/test_set-easing.html]
-[mozilla/test_transform_limits.html]
+[mozilla/test_restyling_xhr_doc_to_rename.html]
+[mozilla/test_set_easing.html]
+[mozilla/test_transform_limits_to_rename.html]
 [mozilla/test_transition_finish_on_compositor.html]
 skip-if = toolkit == 'android' || webrender # bug 1424752 for webrender
-[mozilla/test_underlying-discrete-value.html]
-[style/test_animation-seeking-with-current-time.html]
-[style/test_animation-seeking-with-start-time.html]
-[style/test_animation-setting-effect.html]
-[style/test_composite.html]
+[mozilla/test_underlying_discrete_value.html]
+[style/test_animation-seeking-with-current-time_to_rename.html]
+[style/test_animation-seeking-with-start-time_to_rename.html]
+[style/test_animation-setting-effect_to_rename.html]
+[style/test_composite_to_rename.html]
 skip-if = webrender # bug 1424752
 [style/test_interpolation-from-interpolatematrix-to-none.html]
-[style/test_missing-keyframe.html]
-[style/test_missing-keyframe-on-compositor.html]
+[style/test_missing-keyframe_to_rename.html]
+[style/test_missing-keyframe-on-compositor_to_rename.html]
 skip-if = webrender # bug 1424752
 [style/test_transform-non-normalizable-rotate3d.html]
deleted file mode 100644
--- a/dom/animation/test/mozilla/test_cubic_bezier_limits.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_cubic_bezier_limits.html");
-  });
-</script>
rename from dom/animation/test/mozilla/file_cubic_bezier_limits.html
rename to dom/animation/test/mozilla/test_cubic_bezier_limits_to_rename.html
--- a/dom/animation/test/mozilla/file_cubic_bezier_limits.html
+++ b/dom/animation/test/mozilla/test_cubic_bezier_limits_to_rename.html
@@ -1,21 +1,24 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <body>
 <style>
 @keyframes anim {
   to { margin-left: 100px; }
 }
 
 .transition-div {
   margin-left: 100px;
 }
 </style>
+<div id="log"></div>
 <script>
 'use strict';
 
 // We clamp +infinity or -inifinity value in floating point to
 // maximum floating point value or -maxinum floating point value.
 const max_float = 3.40282e+38;
 
 test(function(t) {
@@ -156,12 +159,10 @@ test(function(t) {
     'progress on lower edge for the lowest value of y1 and y2 control points');
 
   anim.finish();
   assert_equals(anim.effect.getComputedTiming().progress, 1.0,
     'progress on lower edge for the lowest value of y1 and y2 control points');
 
 }, 'Calculated values on both edges');
 
-done();
-
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/mozilla/test_disabled_properties.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_disabled_properties.html");
-  });
-</script>
rename from dom/animation/test/mozilla/file_disabled_properties.html
rename to dom/animation/test/mozilla/test_disabled_properties_to_rename.html
--- a/dom/animation/test/mozilla/file_disabled_properties.html
+++ b/dom/animation/test/mozilla/test_disabled_properties_to_rename.html
@@ -1,12 +1,15 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 function waitForSetPref(pref, value) {
   return SpecialPowers.pushPrefEnv({ 'set': [[pref, value]] });
 }
 
 /*
@@ -61,11 +64,10 @@ promise_test(function(t) {
     var anim = createAnim();
     assert_does_not_have_property(anim, 0, 'Initial keyframe',
                                   'webkitTextFillColor');
     assert_does_not_have_property(anim, 1, 'Final keyframe',
                                   'webkitTextFillColor');
   });
 }, 'Specifying a disabled property using a keyframe sequence');
 
-done();
 </script>
 </body>
--- a/dom/animation/test/mozilla/test_discrete-animations.html
+++ b/dom/animation/test/mozilla/test_discrete-animations.html
@@ -3,16 +3,15 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
 <script>
 'use strict';
 setup({explicit_done: true});
 SpecialPowers.pushPrefEnv(
   { "set": [
-    ["dom.animations-api.core.enabled", true],
     ["layout.css.osx-font-smoothing.enabled", true],
     ["layout.css.prefixes.webkit", true]
   ] },
   function() {
     window.open("file_discrete-animations.html");
   });
 </script>
deleted file mode 100644
--- a/dom/animation/test/mozilla/test_document-timeline-origin-time-range.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_document-timeline-origin-time-range.html");
-  });
-</script>
rename from dom/animation/test/mozilla/file_document-timeline-origin-time-range.html
rename to dom/animation/test/mozilla/test_document_timeline_origin_time_range.html
--- a/dom/animation/test/mozilla/file_document-timeline-origin-time-range.html
+++ b/dom/animation/test/mozilla/test_document_timeline_origin_time_range.html
@@ -1,12 +1,15 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 // If the originTime parameter passed to the DocumentTimeline exceeds
 // the range of the internal storage type (a signed 64-bit integer number
 // of ticks--a platform-dependent unit) then we should throw.
 // Infinity isn't allowed as an origin time value and clamping to just
 // inside the allowed range will just mean we overflow elsewhere.
@@ -20,11 +23,10 @@ test(function(t) {
 
 test(function(t) {
   assert_throws({ name: 'TypeError'},
     function() {
       new DocumentTimeline({ originTime: -1 * Number.MAX_SAFE_INTEGER });
     });
 }, 'Calculated current time is negative infinity');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/mozilla/test_hide_and_show.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_hide_and_show.html");
-  });
-</script>
rename from dom/animation/test/mozilla/file_hide_and_show.html
rename to dom/animation/test/mozilla/test_hide_and_show_to_rename.html
--- a/dom/animation/test/mozilla/file_hide_and_show.html
+++ b/dom/animation/test/mozilla/test_hide_and_show_to_rename.html
@@ -1,25 +1,28 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <style>
 @keyframes move {
   100% {
     transform: translateX(100px);
   }
 }
 
 div.pseudo::before {
   animation: move 0.01s;
   content: 'content';
 }
 
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 test(function(t) {
   var div = addDiv(t, { style: 'animation: move 100s infinite' });
   assert_equals(div.getAnimations().length, 1,
                 'display:initial element has animations');
 
@@ -186,11 +189,10 @@ promise_test(function(t) {
     // Add the class again to re-generate pseudo element.
     div.classList.add('pseudo');
     assert_equals(document.getAnimations().length, 1,
                   'A new CSS animation on pseudo element');
   });
 }, 'CSS animation on pseudo element restarts after the pseudo element that ' +
    'had a finished CSS animation is re-generated');
 
-done();
 </script>
 </body>
--- a/dom/animation/test/mozilla/test_restyles.html
+++ b/dom/animation/test/mozilla/test_restyles.html
@@ -3,16 +3,20 @@
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 <div id='log'></div>
 <script>
 'use strict';
 SimpleTest.waitForExplicitFinish();
 SimpleTest.expectAssertions(0, 1); // bug 1332970
 SpecialPowers.pushPrefEnv(
-  { 'set': [['dom.animations-api.core.enabled', true],
-            ['layout.reflow.synthMouseMove', false],
-            ['privacy.reduceTimerPrecision', false]] },
+  {
+    set: [
+      ['layout.reflow.synthMouseMove', false],
+      ['privacy.reduceTimerPrecision', false],
+    ],
+  },
   function() {
     window.open('file_restyles.html');
-  });
+  }
+);
 </script>
 </html>
deleted file mode 100644
--- a/dom/animation/test/mozilla/test_restyling_xhr_doc.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_restyling_xhr_doc.html");
-  });
-</script>
rename from dom/animation/test/mozilla/file_restyling_xhr_doc.html
rename to dom/animation/test/mozilla/test_restyling_xhr_doc_to_rename.html
--- a/dom/animation/test/mozilla/file_restyling_xhr_doc.html
+++ b/dom/animation/test/mozilla/test_restyling_xhr_doc_to_rename.html
@@ -1,11 +1,14 @@
 <!doctype html>
 <meta charset=utf-8>
 <script src="../testcommon.js"></script>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id="log"></div>
 <script>
 'use strict';
 
 // This test supplements the web-platform-tests in:
 //
 //   web-animations/interfaces/Animatable/animate-no-browsing-context.html
 //
 // Specifically, it covers the case where we have a running animation
@@ -106,11 +109,9 @@ promise_test(t => {
     if (isServo) {
       assert_equals(getComputedStyle(div).opacity, '1',
                     'Style should NOT be updated');
     }
   });
 }, 'Moving an element with a pending animation restyle to a document without'
    + ' a browsing context resets animation style');
 
-done();
-
 </script>
deleted file mode 100644
--- a/dom/animation/test/mozilla/test_set-easing.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_set-easing.html");
-  });
-</script>
rename from dom/animation/test/mozilla/file_set-easing.html
rename to dom/animation/test/mozilla/test_set_easing.html
--- a/dom/animation/test/mozilla/file_set-easing.html
+++ b/dom/animation/test/mozilla/test_set_easing.html
@@ -1,15 +1,18 @@
 <!doctype html>
 <head>
 <meta charset=utf-8>
 <title>Test setting easing in sandbox</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 </head>
 <body>
+<div id="log"></div>
 <script>
 "use strict";
 
 test(function(t) {
   const div = document.createElement("div");
   document.body.appendChild(div);
   div.animate({ opacity: [0, 1] }, 100000 );
 
@@ -24,11 +27,10 @@ test(function(t) {
 
   const sandbox = new SpecialPowers.Cu.Sandbox(window);
   sandbox.importFunction(document, "document");
   sandbox.importFunction(assert_true, "assert_true");
   sandbox.importFunction(assert_unreached, "assert_unreached");
   SpecialPowers.Cu.evalInSandbox(`(${contentScript.toSource()})()`, sandbox);
 }, 'Setting easing should not throw any exceptions in sandbox');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/mozilla/test_transform_limits.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_transform_limits.html");
-  });
-</script>
rename from dom/animation/test/mozilla/file_transform_limits.html
rename to dom/animation/test/mozilla/test_transform_limits_to_rename.html
--- a/dom/animation/test/mozilla/file_transform_limits.html
+++ b/dom/animation/test/mozilla/test_transform_limits_to_rename.html
@@ -1,12 +1,15 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 // We clamp +infinity or -inifinity value in floating point to
 // maximum floating point value or -maximum floating point value.
 const MAX_FLOAT = 3.40282e+38;
 
 test(function(t) {
@@ -44,12 +47,10 @@ test(function(t) {
                          100 * MS_PER_SEC);
 
   anim.pause();
   anim.currentTime = 50 * MS_PER_SEC;
   assert_equals(getComputedStyle(div).transform,
                 'matrix(2, 0, 0, 2, ' + MAX_FLOAT + ', 0)');
 }, 'Test that the parameter of transform matrix is clamped' );
 
-done();
-
 </script>
 </body>
--- a/dom/animation/test/mozilla/test_transition_finish_on_compositor.html
+++ b/dom/animation/test/mozilla/test_transition_finish_on_compositor.html
@@ -4,16 +4,19 @@
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
 <script>
 'use strict';
 setup({explicit_done: true});
 // This test appears like it might get racey and cause a timeout with too low of a
 // precision, so we hardcode it to something reasonable.
 SpecialPowers.pushPrefEnv(
-  { "set":
-      [["dom.animations-api.core.enabled", true],
-       ["privacy.reduceTimerPrecision", true],
-       ["privacy.resistFingerprinting.reduceTimerPrecision.microseconds", 2000]]},
+  {
+    set: [
+      ['privacy.reduceTimerPrecision', true],
+      ['privacy.resistFingerprinting.reduceTimerPrecision.microseconds', 2000],
+    ],
+  },
   function() {
-    window.open("file_transition_finish_on_compositor.html");
-  });
+    window.open('file_transition_finish_on_compositor.html');
+  }
+);
 </script>
deleted file mode 100644
--- a/dom/animation/test/mozilla/test_underlying-discrete-value.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_underlying-discrete-value.html");
-  });
-</script>
-</html>
rename from dom/animation/test/mozilla/file_underlying-discrete-value.html
rename to dom/animation/test/mozilla/test_underlying_discrete_value.html
--- a/dom/animation/test/mozilla/file_underlying-discrete-value.html
+++ b/dom/animation/test/mozilla/test_underlying_discrete_value.html
@@ -1,12 +1,15 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <body>
+<div id="log"></div>
 <script>
 "use strict";
 
 const isGecko = !isStyledByServo();
 
 // Tests that we correctly extract the underlying value when the animation
 // type is 'discrete'.
 const discreteTests = [
@@ -193,11 +196,10 @@ discreteTests.forEach(testcase => {
                     `${ expectedKeyframe.computedOffset }`);
       assert_equals(keyframe.alignContent, expectedKeyframe.alignContent,
                     `alignContent of keyframes[${ index }] should be ` +
                     `${ expectedKeyframe.alignContent }`);
     });
   }, testcase.explanation);
 });
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/style/test_animation-seeking-with-current-time.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_animation-seeking-with-current-time.html");
-  });
-</script>
-</html>
rename from dom/animation/test/style/file_animation-seeking-with-current-time.html
rename to dom/animation/test/style/test_animation-seeking-with-current-time_to_rename.html
--- a/dom/animation/test/style/file_animation-seeking-with-current-time.html
+++ b/dom/animation/test/style/test_animation-seeking-with-current-time_to_rename.html
@@ -9,19 +9,22 @@
   animation-timing-function: linear ! important;
 }
 
 @keyframes anim {
   from { margin-left: 0px; }
   to { margin-left: 100px; }
 }
     </style>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
     <script src="../testcommon.js"></script>
   </head>
   <body>
+    <div id="log"></div>
     <script type="text/javascript">
 'use strict';
 
 function assert_marginLeft_equals(target, expect, description) {
   var marginLeft = parseFloat(getComputedStyle(target).marginLeft);
   assert_equals(marginLeft, expect, description);
 }
 
@@ -110,12 +113,11 @@ promise_test(function(t) {
     // active -> after
     animation.currentTime = 250 * MS_PER_SEC;
     assert_marginLeft_equals(div, -10,
       'Computed value is not affected after seeking forwards from ' +
       '\'in effect\' to not \'in effect\' state');
   });
 }, 'Seeking to \'in effect\' from non-\'in effect\' (active -> after)');
 
-done();
     </script>
   </body>
 </html>
deleted file mode 100644
--- a/dom/animation/test/style/test_animation-seeking-with-start-time.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
-  function() {
-    window.open("file_animation-seeking-with-start-time.html");
-  });
-</script>
-</html>
rename from dom/animation/test/style/file_animation-seeking-with-start-time.html
rename to dom/animation/test/style/test_animation-seeking-with-start-time_to_rename.html
--- a/dom/animation/test/style/file_animation-seeking-with-start-time.html
+++ b/dom/animation/test/style/test_animation-seeking-with-start-time_to_rename.html
@@ -9,19 +9,22 @@
   animation-timing-function: linear ! important;
 }
 
 @keyframes anim {
   from { margin-left: 0px; }
   to { margin-left: 100px; }
 }
     </style>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
     <script src="../testcommon.js"></script>
   </head>
   <body>
+    <div id="log"></div>
     <script type="text/javascript">
 'use strict';
 
 function assert_marginLeft_equals(target, expect, description) {
   var marginLeft = parseFloat(getComputedStyle(target).marginLeft);
   assert_equals(marginLeft, expect, description);
 }
 
@@ -110,12 +113,11 @@ promise_test(function(t) {
     // active -> after
     animation.startTime = animation.timeline.currentTime - 250 * MS_PER_SEC;
     assert_marginLeft_equals(div, -10,
       'Computed value is not affected after seeking forwards from ' +
       '\'in effect\' to not \'in effect\' state');
   });
 }, 'Seeking to \'in effect\' from non-\'in effect\' (active -> after)');
 
-done();
     </script>
   </body>
 </html>
deleted file mode 100644
--- a/dom/animation/test/style/test_animation-setting-effect.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src='/resources/testharness.js'></script>
-<script src='/resources/testharnessreport.js'></script>
-<div id='log'></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { 'set': [['dom.animations-api.core.enabled', true]]},
-  function() {
-    window.open('file_animation-setting-effect.html');
-  });
-</script>
-</html>
rename from dom/animation/test/style/file_animation-setting-effect.html
rename to dom/animation/test/style/test_animation-setting-effect_to_rename.html
--- a/dom/animation/test/style/file_animation-setting-effect.html
+++ b/dom/animation/test/style/test_animation-setting-effect_to_rename.html
@@ -1,16 +1,19 @@
 <!doctype html>
 <html>
   <head>
     <meta charset=utf-8>
     <title>Tests for setting effects by using Animation.effect</title>
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
     <script src='../testcommon.js'></script>
   </head>
   <body>
+    <div id="log"></div>
     <script type='text/javascript'>
 
 'use strict';
 
 test(function(t) {
   var target = addDiv(t);
   var anim = new Animation();
   anim.effect = new KeyframeEffectReadOnly(target,
@@ -114,12 +117,11 @@ test(function(t) {
   var effectA = animA.effect;
   animA.effect = animB.effect;
   animB.effect = effectA;
   assert_equals(getComputedStyle(target).marginLeft, '60px');
   assert_equals(getComputedStyle(target).marginTop, '10px');
 }, 'After swapping effects of two playing animations, both animations are ' +
    'still running with the same current time');
 
-done();
     </script>
   </body>
 </html>
deleted file mode 100644
--- a/dom/animation/test/style/test_composite.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src='/resources/testharness.js'></script>
-<script src='/resources/testharnessreport.js'></script>
-<div id='log'></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { 'set': [['dom.animations-api.core.enabled', true]] },
-  function() {
-    window.open('file_composite.html');
-  });
-</script>
-</html>
rename from dom/animation/test/style/file_composite.html
rename to dom/animation/test/style/test_composite_to_rename.html
--- a/dom/animation/test/style/file_composite.html
+++ b/dom/animation/test/style/test_composite_to_rename.html
@@ -1,21 +1,24 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <script src="/tests/SimpleTest/paint_listener.js"></script>
 <style>
 div {
   /* Element needs geometry to be eligible for layerization */
   width: 20px;
   height: 20px;
   background-color: white;
 }
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 if (!SpecialPowers.DOMWindowUtils.layerManagerRemote ||
     !SpecialPowers.getBoolPref(
       'layers.offmainthreadcomposition.async-animations')) {
   // If OMTA is disabled, nothing to run.
   done();
@@ -130,11 +133,10 @@ promise_test(t => {
     var transform =
       SpecialPowers.DOMWindowUtils.getOMTAStyle(div, 'transform');
     assert_matrix_equals(transform, 'matrix(5, 0, 0, 5, 0, 0)',
       // (scale(2 - 1) + scale(4 - 1) + scale(1))
       'The accumulate scale value should be scale(5)');
   });
 }, 'Composite operation change');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/style/test_missing-keyframe-on-compositor.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src='/resources/testharness.js'></script>
-<script src='/resources/testharnessreport.js'></script>
-<div id='log'></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { 'set': [['dom.animations-api.core.enabled', true]] },
-  function() {
-    window.open('file_missing-keyframe-on-compositor.html');
-  });
-</script>
-</html>
rename from dom/animation/test/style/file_missing-keyframe-on-compositor.html
rename to dom/animation/test/style/test_missing-keyframe-on-compositor_to_rename.html
--- a/dom/animation/test/style/file_missing-keyframe-on-compositor.html
+++ b/dom/animation/test/style/test_missing-keyframe-on-compositor_to_rename.html
@@ -1,21 +1,24 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <script src="/tests/SimpleTest/paint_listener.js"></script>
 <style>
 div {
   /* Element needs geometry to be eligible for layerization */
   width: 100px;
   height: 100px;
   background-color: white;
 }
 </style>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 if (!SpecialPowers.DOMWindowUtils.layerManagerRemote ||
     !SpecialPowers.getBoolPref(
       'layers.offmainthreadcomposition.async-animations')) {
   // If OMTA is disabled, nothing to run.
   done();
@@ -555,11 +558,10 @@ promise_test(t => {
     // (150px + 300px) * (50 * MS_PER_SEC / 100 * MS_PER_SEC) = 225px.
     assert_matrix_equals(transform, 'matrix(1, 0, 0, 1, 225, 0)',
       'Composed transform value should be composed onto the value of ' +
       'lower-priority animation without timeline');
   });
 }, 'Transform value for animation with no keyframe at offset 0 at 50% when ' +
    'composed onto an animation without timeline');
 
-done();
 </script>
 </body>
deleted file mode 100644
--- a/dom/animation/test/style/test_missing-keyframe.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<script src='/resources/testharness.js'></script>
-<script src='/resources/testharnessreport.js'></script>
-<div id='log'></div>
-<script>
-'use strict';
-setup({explicit_done: true});
-SpecialPowers.pushPrefEnv(
-  { 'set': [['dom.animations-api.core.enabled', true]] },
-  function() {
-    window.open('file_missing-keyframe.html');
-  });
-</script>
-</html>
rename from dom/animation/test/style/file_missing-keyframe.html
rename to dom/animation/test/style/test_missing-keyframe_to_rename.html
--- a/dom/animation/test/style/file_missing-keyframe.html
+++ b/dom/animation/test/style/test_missing-keyframe_to_rename.html
@@ -1,12 +1,15 @@
 <!doctype html>
 <meta charset=utf-8>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
 <script src="../testcommon.js"></script>
 <body>
+<div id="log"></div>
 <script>
 'use strict';
 
 test(t => {
   var div = addDiv(t, { style: 'margin-left: 100px' });
   div.animate([{ marginLeft: '200px' }], 100 * MS_PER_SEC);
 
   assert_equals(getComputedStyle(div).marginLeft, '100px',
@@ -98,11 +101,10 @@ test(t => {
                                 iterationComposite: 'accumulate' });
 
   assert_equals(getComputedStyle(div).marginLeft, '300px',
                 'The margin-left value should be additive value of the ' +
                 'accumulation of the initial value onto the base value ');
 }, 'margin-left value for an animation with no keyframe at offset 1 and its ' +
    'iterationComposite is accumulate');
 
-done();
 </script>
 </body>