Bug 1513039 - part2 : remove temporary autoplay permission tests. r=florian
authoralwu <alwu@mozilla.com>
Mon, 07 Jan 2019 18:32:35 +0000
changeset 509872 838615dbf1f307e1adc83c7152fcb22cc8584e4d
parent 509871 612d05e15b6f99c7f5efb688ea9513f21bfa5491
child 509873 5d5121ecc18102123d5b84f388313a10a535e2dd
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1513039, 1493766
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1513039 - part2 : remove temporary autoplay permission tests. r=florian These tests were added in bug 1493766 for testing caching temporary autoplay permission. Differential Revision: https://phabricator.services.mozilla.com/D14326
browser/base/content/test/permissions/browser.ini
browser/base/content/test/permissions/browser_temporary_autoplay_permission.js
browser/base/content/test/permissions/head.js
browser/base/content/test/permissions/permissions.html
toolkit/content/tests/browser/browser_autoplay_policy_request_permission.js
--- a/browser/base/content/test/permissions/browser.ini
+++ b/browser/base/content/test/permissions/browser.ini
@@ -14,15 +14,11 @@ support-files =
 support-files =
   browser_autoplay_blocked.html
   ../general/audio.ogg
 skip-if = verify && os == 'linux' && debug # Bug 1483648
 [browser_autoplay_doorhanger.js]
 support-files =
   browser_autoplay_blocked.html
   ../general/audio.ogg
-[browser_temporary_autoplay_permission.js]
-support-files =
-  temporary_permissions_subframe.html
-  ../general/audio.ogg
 [browser_temporary_permissions_expiry.js]
 [browser_temporary_permissions_navigation.js]
 [browser_temporary_permissions_tabs.js]
deleted file mode 100644
--- a/browser/base/content/test/permissions/browser_temporary_autoplay_permission.js
+++ /dev/null
@@ -1,192 +0,0 @@
-/**
- * This test is used to ensure the value of temporary 'autoplay-media' permission
- * is sync correctly between JS side (TemporaryPermissions) and C++ side
- * (nsPIDOMWindowOuter). When the value of temporary permission changes in JS
- * side, the C++ side would be notified and cache the result of allowing autoplay.
- */
-/* eslint-disable mozilla/no-arbitrary-setTimeout */
-"use strict";
-
-ChromeUtils.import("resource://gre/modules/E10SUtils.jsm");
-
-const ORIGIN = "https://example.com";
-const URI = Services.io.newURI(ORIGIN);
-const PERMISSIONS_PAGE = getRootDirectory(gTestPath).replace("chrome://mochitests/content", ORIGIN) + "permissions.html";
-const SUBFRAME_PAGE = getRootDirectory(gTestPath).replace("chrome://mochitests/content", ORIGIN) + "temporary_permissions_subframe.html";
-const ID = "autoplay-media";
-
-async function checkTemporaryPermission(browser, state, scope) {
-  Assert.deepEqual(SitePermissions.get(URI, ID, browser), {state, scope});
-  let isAllowed = state == SitePermissions.ALLOW;
-  await ContentTask.spawn(browser, isAllowed,
-    isTemporaryAllowed => {
-      is(content.windowUtils.isAutoplayTemporarilyAllowed(), isTemporaryAllowed,
-         "temporary autoplay permission is as same as what we cached in window.");
-    });
-}
-
-add_task(async function setTestingPreferences() {
-  return SpecialPowers.pushPrefEnv({"set": [
-    ["media.autoplay.default", SpecialPowers.Ci.nsIAutoplay.PROMPT],
-    ["media.autoplay.enabled.user-gestures-needed", true],
-    ["media.autoplay.ask-permission", true],
-  ]});
-});
-
-// Test that temp blocked permissions requested by subframes (with a different URI) affect the whole page.
-add_task(async function testTempPermissionSubframes() {
-  await BrowserTestUtils.withNewTab(SUBFRAME_PAGE, async function(browser) {
-    let popupshown = BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popupshown");
-
-    info(`- request permission from subframe -`);
-    await ContentTask.spawn(browser, URI.host, function(host) {
-      E10SUtils.wrapHandlingUserInput(content, true, function() {
-        let frame = content.document.getElementById("frame");
-        let frameDoc = frame.contentWindow.document;
-
-        // Make sure that the origin of our test page is different.
-        Assert.notEqual(frameDoc.location.host, host);
-        frameDoc.getElementById("autoplay").click();
-      });
-    });
-    await popupshown;
-    let popuphidden = BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popuphidden");
-
-    info(`- click 'allow' button and uncheck the checkbox-`);
-    let notification = PopupNotifications.panel.firstChild;
-    notification.checkbox.checked = false;
-    EventUtils.synthesizeMouseAtCenter(notification.button, {});
-    await popuphidden;
-
-    info(`- should get the temporary permission -`);
-    checkTemporaryPermission(browser, SitePermissions.ALLOW, SitePermissions.SCOPE_TEMPORARY);
-  });
-});
-
-// Test that temporary permissions are removed on user initiated reload only.
-add_task(async function testTempPermissionOnReload() {
-  await BrowserTestUtils.withNewTab(URI.spec, async function(browser) {
-    info(`- set temporary permission -`);
-    SitePermissions.set(URI, ID, SitePermissions.ALLOW, SitePermissions.SCOPE_TEMPORARY, browser);
-    checkTemporaryPermission(browser, SitePermissions.ALLOW, SitePermissions.SCOPE_TEMPORARY);
-
-    info(`- reload through the page -`);
-    // Reload through the page (should not remove the temp permission).
-    await ContentTask.spawn(browser, {}, () => content.document.location.reload());
-    let reloadButton = document.getElementById("reload-button");
-    let reloaded = BrowserTestUtils.browserLoaded(browser, false, URI.spec);
-    await reloaded;
-    await BrowserTestUtils.waitForCondition(() => {
-      return !reloadButton.disabled;
-    });
-
-    info(`- the temporary permission should not be removed -`);
-    checkTemporaryPermission(browser, SitePermissions.ALLOW, SitePermissions.SCOPE_TEMPORARY);
-
-    info(`- reload as a user -`);
-    reloaded = BrowserTestUtils.browserLoaded(browser, false, URI.spec);
-    // Reload as a user (should remove the temp permission).
-    EventUtils.synthesizeMouseAtCenter(reloadButton, {});
-    await reloaded;
-
-    info(`- the temporary permission should be removed -`);
-    checkTemporaryPermission(browser, SitePermissions.UNKNOWN, SitePermissions.SCOPE_PERSISTENT);
-
-    info(`- set temporary permission again -`);
-    SitePermissions.set(URI, ID, SitePermissions.BLOCK, SitePermissions.SCOPE_TEMPORARY, browser);
-
-    info(`- open the tab context menu -`);
-    openTabContextMenu();
-
-    info(`- reload as a user through the context menu -`);
-    let reloadMenuItem = document.getElementById("context_reloadTab");
-    reloaded = BrowserTestUtils.browserLoaded(browser, false, URI.spec);
-    // Reload as a user through the context menu (should remove the temp permission).
-    EventUtils.synthesizeMouseAtCenter(reloadMenuItem, {});
-    await reloaded;
-
-    info(`- the temporary permission should be removed -`);
-    checkTemporaryPermission(browser, SitePermissions.UNKNOWN, SitePermissions.SCOPE_PERSISTENT);
-
-    SitePermissions.remove(URI, ID, browser);
-  });
-});
-
-// Test that temporary permissions are not removed when reloading all tabs.
-add_task(async function testTempPermissionOnReloadAllTabs() {
-  await BrowserTestUtils.withNewTab(URI.spec, async function(browser) {
-    info(`- set temporary permission -`);
-    SitePermissions.set(URI, ID, SitePermissions.ALLOW, SitePermissions.SCOPE_TEMPORARY, browser);
-    // Select all tabs before opening the context menu.
-    gBrowser.selectAllTabs();
-
-    info(`- open the tab context menu -`);
-    openTabContextMenu();
-
-    info(`- reload all tabs -`);
-    let reloadMenuItem = document.getElementById("context_reloadSelectedTabs");
-    let reloaded = Promise.all(gBrowser.visibleTabs.map(
-      tab => BrowserTestUtils.browserLoaded(gBrowser.getBrowserForTab(tab))));
-    EventUtils.synthesizeMouseAtCenter(reloadMenuItem, {});
-    await reloaded;
-
-    info(`- the temporary permissions for the current URI should not be removed -`);
-    checkTemporaryPermission(browser, SitePermissions.ALLOW, SitePermissions.SCOPE_TEMPORARY);
-
-    SitePermissions.remove(URI, ID, browser);
-  });
-});
-
-// Test that temporary permissions are persisted through navigation in a tab.
-add_task(async function testTempPermissionOnNavigation() {
-  await BrowserTestUtils.withNewTab(URI.spec, async function(browser) {
-    info(`- set temporary permission -`);
-    SitePermissions.set(URI, ID, SitePermissions.ALLOW, SitePermissions.SCOPE_TEMPORARY, browser);
-
-    info(`- check temporary permission -`);
-    checkTemporaryPermission(browser, SitePermissions.ALLOW, SitePermissions.SCOPE_TEMPORARY);
-
-    info(`- navigate to another domain -`);
-    let loaded = BrowserTestUtils.browserLoaded(browser, false, "https://example.org/");
-    await ContentTask.spawn(browser, {}, () => content.document.location = "https://example.org/");
-    await loaded;
-
-    info(`- the temporary permissions for the current URI should be reset -`);
-    checkTemporaryPermission(browser, SitePermissions.UNKNOWN, SitePermissions.SCOPE_PERSISTENT);
-
-    info(`- navigate to the original domain -`);
-    loaded = BrowserTestUtils.browserLoaded(browser, false, URI.spec);
-    await ContentTask.spawn(browser, {}, () => content.document.location = "https://example.com/");
-    await loaded;
-
-    info(`- the temporary permissions for the original URI should still exist -`);
-    checkTemporaryPermission(browser, SitePermissions.ALLOW, SitePermissions.SCOPE_TEMPORARY);
-
-    SitePermissions.remove(URI, ID, browser);
-  });
-});
-
-// Test that temporary permissions can be re-requested after they expired
-// and that the identity block is updated accordingly.
-add_task(async function testTempPermissionRequestAfterExpiry() {
-  const TIMEOUT_MS = 100;
-  await SpecialPowers.pushPrefEnv({set: [
-    ["privacy.temporary_permission_expire_time_ms", TIMEOUT_MS],
-  ]});
-
-  await BrowserTestUtils.withNewTab(PERMISSIONS_PAGE, async function(browser) {
-    info(`- set temporary permission -`);
-    SitePermissions.set(URI, ID, SitePermissions.ALLOW, SitePermissions.SCOPE_TEMPORARY, browser);
-
-    info(`- check temporary permission -`);
-    checkTemporaryPermission(browser, SitePermissions.ALLOW, SitePermissions.SCOPE_TEMPORARY);
-
-    info(`- wait for the permission expiration -`);
-    await new Promise((c) => setTimeout(c, TIMEOUT_MS));
-
-    info(`- the temporary permission should be removed -`);
-    checkTemporaryPermission(browser, SitePermissions.UNKNOWN, SitePermissions.SCOPE_PERSISTENT);
-
-    SitePermissions.remove(URI, ID, browser);
-  });
-});
--- a/browser/base/content/test/permissions/head.js
+++ b/browser/base/content/test/permissions/head.js
@@ -1,8 +1,1 @@
 ChromeUtils.import("resource:///modules/SitePermissions.jsm", this);
-
-async function openTabContextMenu() {
-  let contextMenu = document.getElementById("tabContextMenu");
-  let popupShownPromise = BrowserTestUtils.waitForEvent(contextMenu, "popupshown");
-  EventUtils.synthesizeMouseAtCenter(gBrowser.selectedTab, {type: "contextmenu", button: 2});
-  await popupShownPromise;
-}
--- a/browser/base/content/test/permissions/permissions.html
+++ b/browser/base/content/test/permissions/permissions.html
@@ -5,23 +5,16 @@
 <html dir="ltr" xml:lang="en-US" lang="en-US">
   <head>
     <meta charset="utf8">
   </head>
 <script>
 var gKeyDowns = 0;
 var gKeyPresses = 0;
 
-function playMedia() {
-  let audio = new Audio();
-  audio.src = "audio.ogg";
-  audio.addEventListener("canplay", () => audio.play(), {once: true});
-}
-
 </script>
   <body onkeydown="gKeyDowns++;" onkeypress="gKeyPresses++">
 	<!-- This page could eventually request permissions from content
 	     and make sure that chrome responds appropriately -->
   <button id="geo" onclick="navigator.geolocation.getCurrentPosition(() => {})">Geolocation</button>
   <button id="camera" onclick="navigator.mediaDevices.getUserMedia({video: true, fake: true})">Camera</button>
-  <button id="autoplay" onclick="playMedia()">Autoplay</button>
   </body>
 </html>
--- a/toolkit/content/tests/browser/browser_autoplay_policy_request_permission.js
+++ b/toolkit/content/tests/browser/browser_autoplay_policy_request_permission.js
@@ -5,20 +5,18 @@
 "use strict";
 
 ChromeUtils.import("resource:///modules/SitePermissions.jsm", this);
 
 const VIDEO_PAGE = "https://example.com/browser/toolkit/content/tests/browser/file_empty.html";
 
 add_task(() => {
   return SpecialPowers.pushPrefEnv({"set": [
-    ["media.autoplay.default", SpecialPowers.Ci.nsIAutoplay.PROMPT],
+    ["media.autoplay.default", SpecialPowers.Ci.nsIAutoplay.BLOCKED],
     ["media.autoplay.enabled.user-gestures-needed", true],
-    ["media.autoplay.ask-permission", true],
-    ["media.autoplay.block-webaudio", true],
     ["media.autoplay.block-event.enabled", true],
   ]});
 });
 
 async function testAutoplayExistingPermission(args) {
   info("- Starting '" + args.name + "' -");
   await BrowserTestUtils.withNewTab({
     gBrowser,
@@ -64,305 +62,8 @@ add_task(async () => {
   });
   await testAutoplayExistingPermission({
     name: "Prexisting block permission call play",
     permission: SitePermissions.BLOCK,
     shouldPlay: false,
     mode: "call play",
   });
 });
-
-async function testAutoplayUnknownPermission(args) {
-  info("- Starting '" + args.name + "' -");
-  info("- open new tab -");
-
-  await BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: VIDEO_PAGE,
-  }, async (browser) => {
-    let promptShowing = () =>
-      PopupNotifications.getNotification("autoplay-media", browser);
-
-    // Set this site to ask permission to autoplay.
-    SitePermissions.set(browser.currentURI, "autoplay-media", SitePermissions.UNKNOWN);
-    ok(!promptShowing(), "Should not be showing permission prompt");
-
-    let popupshown = BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popupshown");
-    await loadAutoplayVideo(browser, args);
-
-    info("Awaiting popupshown");
-    await popupshown;
-    ok(promptShowing(), "Should now be showing permission prompt");
-
-    // Click the appropriate doorhanger button.
-    PopupNotifications.panel.firstElementChild.checkbox.checked = args.checkbox;
-    if (args.button == "allow") {
-      info("Clicking allow button");
-      PopupNotifications.panel.firstElementChild.button.click();
-    } else if (args.button == "block") {
-      info("Clicking block button");
-      PopupNotifications.panel.firstElementChild.secondaryButton.click();
-    } else {
-      ok(false, "Invalid button field");
-    }
-    // Check that the video started playing.
-    await checkVideoDidPlay(browser, args);
-
-    const isTemporaryPermission = !args.checkbox;
-    if (isTemporaryPermission) {
-      info("- check temporary permission -");
-      const isAllowed = (args.button === "allow");
-
-      let permission = SitePermissions.get(browser.currentURI, "autoplay-media", browser);
-      is(permission.state == SitePermissions.ALLOW, isAllowed,
-         "should get autoplay permission.");
-      ok(permission.scope == SitePermissions.SCOPE_TEMPORARY,
-         "the permission is temporary permission.");
-      await ContentTask.spawn(browser, isAllowed,
-        isAllowed => {
-          is(content.windowUtils.isAutoplayTemporarilyAllowed(), isAllowed,
-             "window should have" + (isAllowed ? " " : " not ") +
-             "granted temporary autoplay permission.");
-        });
-
-      info("- remove temporary permission -");
-      const permissionChanged = BrowserTestUtils.waitForEvent(browser, "PermissionStateChange");
-      SitePermissions.remove(browser.currentURI, "autoplay-media", browser);
-      await permissionChanged;
-
-      permission = SitePermissions.get(browser.currentURI, "autoplay-media", browser);
-      ok(permission.state == SitePermissions.UNKNOWN, "temporary permission has been reset.");
-      await ContentTask.spawn(browser, null,
-        () => {
-          ok(!content.windowUtils.isAutoplayTemporarilyAllowed(),
-             "window should reset temporary autoplay permission as well.");
-        });
-    }
-
-    // Reset permission.
-    SitePermissions.remove(browser.currentURI, "autoplay-media");
-    info("- Finished '" + args.name + "' -");
-  });
-}
-
-// Test the permission UNKNOWN case; we should prompt for permission, and
-// test pressing approve/block in both the autoplay attribute and call
-// play case.
-add_task(async () => {
-  await testAutoplayUnknownPermission({
-    name: "Unknown permission click allow autoplay attribute",
-    button: "allow",
-    shouldPlay: true,
-    mode: "autoplay attribute",
-    checkbox: true,
-  });
-  await testAutoplayUnknownPermission({
-    name: "Unknown permission click allow call play",
-    button: "allow",
-    shouldPlay: true,
-    mode: "call play",
-    checkbox: true,
-  });
-  await testAutoplayUnknownPermission({
-    name: "Unknown permission click allow autoplay attribute and no check check-box",
-    button: "allow",
-    shouldPlay: true,
-    mode: "autoplay attribute",
-    checkbox: false,
-  });
-  await testAutoplayUnknownPermission({
-    name: "Unknown permission click allow call play and no check check-box",
-    button: "allow",
-    shouldPlay: true,
-    mode: "call play",
-    checkbox: false,
-  });
-  await testAutoplayUnknownPermission({
-    name: "Unknown permission click block autoplay attribute",
-    button: "block",
-    shouldPlay: false,
-    mode: "autoplay attribute",
-    checkbox: true,
-  });
-  await testAutoplayUnknownPermission({
-    name: "Unknown permission click block call play",
-    button: "block",
-    shouldPlay: false,
-    mode: "call play",
-    checkbox: true,
-  });
-  await testAutoplayUnknownPermission({
-    name: "Unknown permission click block autoplay attribute and no check check-box",
-    button: "block",
-    shouldPlay: false,
-    mode: "autoplay attribute",
-    checkbox: false,
-  });
-  await testAutoplayUnknownPermission({
-    name: "Unknown permission click block call play and no check check-box",
-    button: "block",
-    shouldPlay: false,
-    mode: "call play",
-    checkbox: false,
-  });
-});
-
-async function testIgnorePrompt({name, type, isAudible}) {
-  info(`- Starting test '${name}' -`);
-  if (type == "MediaElement") {
-    await testIgnorePromptAndPlayMediaElement(isAudible);
-  } else if (type == "WebAudio") {
-    await testIgnorePromptAndPlayWebAudio(isAudible);
-  } else {
-    ok(false, `undefined test type.`);
-  }
-}
-
-async function testIgnorePromptAndPlayMediaElement(isAudible) {
-  await BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: VIDEO_PAGE,
-  }, async (browser) => {
-    info("- Started test prompt hides upon play -");
-    let promptShowing = () =>
-      PopupNotifications.getNotification("autoplay-media", browser);
-
-    // Set this site to ask permission to autoplay.
-    SitePermissions.set(browser.currentURI, "autoplay-media", SitePermissions.UNKNOWN);
-    ok(!promptShowing(), "Should not be showing permission prompt");
-
-    let popupshown = BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popupshown");
-    await loadAutoplayVideo(browser, { mode: "call play" });
-
-    info("Awaiting popupshown");
-    await popupshown;
-    ok(promptShowing(), "Should now be showing permission prompt");
-
-    // Check that the video didn't start playing.
-    await ContentTask.spawn(browser, null,
-      async () => {
-        let video = content.document.getElementById("v1");
-        ok(video.paused && !video.didPlay, "Video should not be playing");
-      });
-
-    let popuphidden = BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popuphidden");
-    await ContentTask.spawn(browser, isAudible,
-      async (isAudible) => {
-        // Gesture activate the document, i.e. simulate a click in the document,
-        // to unblock autoplay,
-        content.document.notifyUserGestureActivation();
-        let video = content.document.getElementById("v1");
-        video.muted = !isAudible;
-        // Gesture activating in itself should not cause the previous pending
-        // play to proceed.
-        ok(video.paused && !video.didPlay, "Video should not have played yet");
-        // But trying to play again now that we're gesture activated will work...
-        let played = await video.play().then(() => true, () => false);
-        ok(played, "Should have played as now gesture activated");
-        // And because we started playing, the previous promise returned in the
-        // first call to play() above should also resolve too.
-        await video.didPlayPromise;
-        ok(video.didPlay, "Existing promise should resolve when media starts playing");
-      });
-
-    if (isAudible) {
-      info("Awaiting popuphidden");
-      await popuphidden;
-      ok(!promptShowing(), "Permission prompt should have hidden when media started playing");
-    } else {
-      ok(promptShowing(), `doorhanger would only be dismissed when audible media starts`);
-    }
-
-    // Reset permission.
-    SitePermissions.remove(browser.currentURI, "autoplay-media");
-    info("- Finished test prompt hides upon play -");
-  });
-}
-
-async function testIgnorePromptAndPlayWebAudio(isAudible) {
-  function createAudioContext() {
-    content.ac = new content.AudioContext();
-    content.ac.notAllowedToStart = new Promise(resolve => {
-      content.ac.addEventListener("blocked", function() {
-        resolve();
-      }, {once: true});
-    });
-  }
-
-  await BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: VIDEO_PAGE,
-  }, async (browser) => {
-    info(`- set the 'autoplay-media' permission to UNKNOWN -`);
-    const promptShowing = () =>
-      PopupNotifications.getNotification("autoplay-media", browser);
-    SitePermissions.set(browser.currentURI, "autoplay-media", SitePermissions.UNKNOWN);
-    ok(!promptShowing(), "Should not be showing permission prompt");
-
-    info(`- create AudioContext which should not start until user approves -`);
-    loadFrameScript(browser, createAudioContext);
-    await ContentTask.spawn(browser, null, async () => {
-      await content.ac.notAllowedToStart;
-      ok(content.ac.state === "suspended", `AudioContext is not started yet.`);
-    });
-
-    info(`- try to start AudioContext and show doorhanger to ask for user's approval -`);
-    const popupShow = BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popupshown");
-    await ContentTask.spawn(browser, null, () => {
-      content.ac.resume();
-    });
-    await popupShow;
-    ok(promptShowing(), `should now be showing permission prompt`);
-
-    info(`- simulate user activate the page -`);
-    await ContentTask.spawn(browser, null, () => {
-      content.document.notifyUserGestureActivation();
-    });
-
-    if (isAudible) {
-      info(`- ignore doorhanger, connect audible node and start node -`);
-      const popupHide = BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popuphidden");
-      await ContentTask.spawn(browser, null, () => {
-        const ac = content.ac;
-        let node = ac.createOscillator();
-        node.connect(ac.destination);
-        node.start();
-      });
-      await popupHide;
-      ok(true, `doorhanger should dismiss after AudioContext starts audible`);
-    } else {
-      info(`- ignore doorhanger and resume AudioContext without connecting audible node -`);
-      await ContentTask.spawn(browser, null, async () => {
-        await content.ac.resume();
-        ok(true, `successfully resume AudioContext.`);
-      });
-      ok(promptShowing(),
-         `doorhanger would only be dismissed when audible media starts`);
-    }
-
-    SitePermissions.remove(browser.currentURI, "autoplay-media");
-  });
-}
-
-// Test that the prompt would dismiss when audible media starts, but not dismiss
-// when inaudible media starts.
-add_task(async () => {
-  await testIgnorePrompt({
-    name: "ignore doorhanger and play audible media element",
-    type: "MediaElement",
-    isAudible: true,
-  });
-  await testIgnorePrompt({
-    name: "ignore doorhanger and play inaudible media element",
-    type: "MediaElement",
-    isAudible: false,
-  });
-  await testIgnorePrompt({
-    name: "ignore doorhanger and play audible web audio",
-    type: "WebAudio",
-    isAudible: true,
-  });
-  await testIgnorePrompt({
-    name: "ignore doorhanger and play inaudible web audio",
-    type: "WebAudio",
-    isAudible: false,
-  });
-});