Bug 1463919 - Remove dead code in browser_block_autoplay_media.js test. r?mconley draft
authorChris Pearce <cpearce@mozilla.com>
Wed, 27 Jun 2018 15:24:00 +1200
changeset 811171 13b71ced6f0cf08eef3ba7796e5912dbfd2aa69b
parent 811170 9261e2232aa934944c01a59fe9a1ba62fd303c69
push id114216
push userbmo:cpearce@mozilla.com
push dateWed, 27 Jun 2018 03:52:23 +0000
reviewersmconley
bugs1463919
milestone62.0a1
Bug 1463919 - Remove dead code in browser_block_autoplay_media.js test. r?mconley eslint pointed failed with an error: browser_block_autoplay_media.js:25:7 | 'audio' is not defined. (no-undef) It turns out, the function this line resides in is never called, so we can remove it. MozReview-Commit-ID: EUe5cRwGhfA
toolkit/content/tests/browser/browser_block_autoplay_media.js
--- a/toolkit/content/tests/browser/browser_block_autoplay_media.js
+++ b/toolkit/content/tests/browser/browser_block_autoplay_media.js
@@ -12,24 +12,16 @@ function check_audio_suspended(suspended
   if (!autoPlay) {
     ok(false, "Can't get the audio element!");
   }
 
   is(autoPlay.computedSuspended, suspendedType,
      "The suspeded state of autoplay audio is correct.");
 }
 
-function check_audio_not_paused() {
-  var autoPlay = content.document.getElementById("autoplay");
-  if (!autoPlay) {
-    ok(false, "Can't get the audio element!");
-  }
-  ok(!audio.paused, "Audio is resumed correctly.");
-}
-
 add_task(async function setup_test_preference() {
   await SpecialPowers.pushPrefEnv({"set": [
     ["media.useAudioChannelService.testing", true],
     ["media.block-autoplay-until-in-foreground", true]
   ]});
 });
 
 add_task(async function block_autoplay_media() {