Backed out 3 changesets (bug 1497940) for Browser-chrome in toolkit/mozapps/extensions/test/browser/browser_CTP_plugins.js
authorDorel Luca <dluca@mozilla.com>
Thu, 22 Nov 2018 05:04:55 +0200
changeset 447652 373839b9f787786aca3869614d71bcda66bfabf4
parent 447651 24c9ee68f82f94fb3a0a0b78cde4abddd85bdf3e
child 447653 b1c8590d5f74c3e4ca3daf8caaf0662e8d126985
push id73507
push userdluca@mozilla.com
push dateThu, 22 Nov 2018 03:05:19 +0000
treeherderautoland@373839b9f787 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1497940
milestone65.0a1
backs out493083d55865df594eef9f26c5ba7a98873cacb1
b503b1a1552c5c92622d9a7da04a65221ae483a8
6918f8e2f38cdf586b1929d71c5f85a30f4c4d45
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
Backed out 3 changesets (bug 1497940) for Browser-chrome in toolkit/mozapps/extensions/test/browser/browser_CTP_plugins.js Backed out changeset 493083d55865 (bug 1497940) Backed out changeset b503b1a1552c (bug 1497940) Backed out changeset 6918f8e2f38c (bug 1497940)
browser/actors/ContextMenuChild.jsm
browser/actors/PluginChild.jsm
browser/base/content/browser-plugins.js
browser/base/content/test/plugins/browser.ini
browser/base/content/test/plugins/browser_CTP_crashreporting.js
browser/base/content/test/plugins/browser_CTP_hide_overlay.js
browser/base/content/test/plugins/browser_CTP_iframe.js
browser/base/content/test/plugins/browser_CTP_outsideScrollArea.js
browser/base/content/test/plugins/browser_CTP_overlay_styles.js
browser/base/content/test/plugins/browser_CTP_resize.js
browser/base/content/test/plugins/browser_CTP_shouldShowOverlay.js
browser/base/content/test/plugins/browser_CTP_zoom.js
browser/base/content/test/plugins/browser_blocking.js
browser/base/content/test/plugins/browser_pluginCrashCommentAndURL.js
browser/base/content/test/plugins/browser_pluginCrashReportNonDeterminism.js
browser/base/content/test/plugins/browser_pluginnotification.js
browser/base/content/test/plugins/browser_private_clicktoplay.js
browser/base/content/test/plugins/xbl/.eslintrc.js
browser/base/content/test/plugins/xbl/blockNoPlugins.xml
browser/base/content/test/plugins/xbl/blockPluginHard.xml
browser/base/content/test/plugins/xbl/blockPluginInfoURL.xml
browser/base/content/test/plugins/xbl/blockPluginVulnerableNoUpdate.xml
browser/base/content/test/plugins/xbl/blockPluginVulnerableUpdatable.xml
browser/base/content/test/plugins/xbl/blocklist_proxy.js
browser/base/content/test/plugins/xbl/browser.ini
browser/base/content/test/plugins/xbl/browser_CTP_context_menu.js
browser/base/content/test/plugins/xbl/browser_CTP_crashreporting.js
browser/base/content/test/plugins/xbl/browser_CTP_drag_drop.js
browser/base/content/test/plugins/xbl/browser_CTP_favorfallback.js
browser/base/content/test/plugins/xbl/browser_CTP_hide_overlay.js
browser/base/content/test/plugins/xbl/browser_CTP_iframe.js
browser/base/content/test/plugins/xbl/browser_CTP_nonplugins.js
browser/base/content/test/plugins/xbl/browser_CTP_outsideScrollArea.js
browser/base/content/test/plugins/xbl/browser_CTP_overlay_styles.js
browser/base/content/test/plugins/xbl/browser_CTP_resize.js
browser/base/content/test/plugins/xbl/browser_CTP_shouldShowOverlay.js
browser/base/content/test/plugins/xbl/browser_CTP_zoom.js
browser/base/content/test/plugins/xbl/browser_blocking.js
browser/base/content/test/plugins/xbl/browser_blocklist_content.js
browser/base/content/test/plugins/xbl/browser_bug743421.js
browser/base/content/test/plugins/xbl/browser_bug744745.js
browser/base/content/test/plugins/xbl/browser_bug787619.js
browser/base/content/test/plugins/xbl/browser_bug797677.js
browser/base/content/test/plugins/xbl/browser_bug812562.js
browser/base/content/test/plugins/xbl/browser_bug818118.js
browser/base/content/test/plugins/xbl/browser_bug820497.js
browser/base/content/test/plugins/xbl/browser_clearplugindata.html
browser/base/content/test/plugins/xbl/browser_clearplugindata.js
browser/base/content/test/plugins/xbl/browser_clearplugindata_noage.html
browser/base/content/test/plugins/xbl/browser_enable_DRM_prompt.js
browser/base/content/test/plugins/xbl/browser_globalplugin_crashinfobar.js
browser/base/content/test/plugins/xbl/browser_iterate_hidden_plugins.js
browser/base/content/test/plugins/xbl/browser_pluginCrashCommentAndURL.js
browser/base/content/test/plugins/xbl/browser_pluginCrashReportNonDeterminism.js
browser/base/content/test/plugins/xbl/browser_plugin_reloading.js
browser/base/content/test/plugins/xbl/browser_pluginnotification.js
browser/base/content/test/plugins/xbl/browser_private_browsing_eme_persistent_state.js
browser/base/content/test/plugins/xbl/browser_private_clicktoplay.js
browser/base/content/test/plugins/xbl/browser_subframe_access_hidden_plugins.js
browser/base/content/test/plugins/xbl/empty_file.html
browser/base/content/test/plugins/xbl/plugin_add_dynamically.html
browser/base/content/test/plugins/xbl/plugin_alternate_content.html
browser/base/content/test/plugins/xbl/plugin_big.html
browser/base/content/test/plugins/xbl/plugin_both.html
browser/base/content/test/plugins/xbl/plugin_both2.html
browser/base/content/test/plugins/xbl/plugin_bug744745.html
browser/base/content/test/plugins/xbl/plugin_bug749455.html
browser/base/content/test/plugins/xbl/plugin_bug787619.html
browser/base/content/test/plugins/xbl/plugin_bug797677.html
browser/base/content/test/plugins/xbl/plugin_bug820497.html
browser/base/content/test/plugins/xbl/plugin_clickToPlayAllow.html
browser/base/content/test/plugins/xbl/plugin_clickToPlayDeny.html
browser/base/content/test/plugins/xbl/plugin_crashCommentAndURL.html
browser/base/content/test/plugins/xbl/plugin_favorfallback.html
browser/base/content/test/plugins/xbl/plugin_hidden_to_visible.html
browser/base/content/test/plugins/xbl/plugin_iframe.html
browser/base/content/test/plugins/xbl/plugin_outsideScrollArea.html
browser/base/content/test/plugins/xbl/plugin_overlay_styles.html
browser/base/content/test/plugins/xbl/plugin_shouldShowOverlay.html
browser/base/content/test/plugins/xbl/plugin_simple_blank.swf
browser/base/content/test/plugins/xbl/plugin_small.html
browser/base/content/test/plugins/xbl/plugin_small_2.html
browser/base/content/test/plugins/xbl/plugin_syncRemoved.html
browser/base/content/test/plugins/xbl/plugin_test.html
browser/base/content/test/plugins/xbl/plugin_test2.html
browser/base/content/test/plugins/xbl/plugin_test3.html
browser/base/content/test/plugins/xbl/plugin_two_types.html
browser/base/content/test/plugins/xbl/plugin_unknown.html
browser/base/content/test/plugins/xbl/plugin_zoom.html
browser/base/moz.build
browser/themes/linux/preferences/applications.css
browser/themes/osx/preferences/applications.css
browser/themes/shared/notification-icons.inc.css
browser/themes/windows/preferences/applications.css
caps/tests/mochitest/test_bug292789.html
dom/base/nsObjectLoadingContent.cpp
dom/plugins/test/mochitest/test_crash_submit.xul
dom/plugins/test/mochitest/test_hang_submit.xul
mobile/android/chrome/content/PluginHelper.js
mobile/android/chrome/jar.mn
toolkit/actors/UAWidgetsChild.jsm
toolkit/content/jar.mn
toolkit/content/widgets/pluginProblem.js
toolkit/mozapps/extensions/Blocklist.jsm
toolkit/mozapps/extensions/test/browser/browser_bug523784.js
toolkit/pluginproblem/content/pluginProblem.xml
toolkit/pluginproblem/content/pluginProblemBinding.css
toolkit/pluginproblem/content/pluginProblemContent.css
toolkit/themes/mobile/jar.mn
toolkit/themes/mobile/mozapps/plugins/contentPluginActivate.png
toolkit/themes/mobile/mozapps/plugins/contentPluginBlocked.png
toolkit/themes/mobile/mozapps/plugins/contentPluginClose.png
toolkit/themes/mobile/mozapps/plugins/contentPluginCrashed.png
toolkit/themes/mobile/mozapps/plugins/contentPluginDisabled.png
toolkit/themes/mobile/mozapps/plugins/contentPluginStripe.png
toolkit/themes/mobile/mozapps/plugins/pluginProblem.css
toolkit/themes/osx/global/jar.mn
toolkit/themes/osx/global/plugins/pluginHelp-16.png
toolkit/themes/osx/mozapps/jar.mn
toolkit/themes/osx/mozapps/plugins/pluginHelp-16.png
toolkit/themes/shared/extensions/extensions.inc.css
toolkit/themes/shared/jar.inc.mn
toolkit/themes/shared/mozapps.inc.mn
toolkit/themes/shared/non-mac.jar.inc.mn
toolkit/themes/shared/plugins/pluginProblem.css
toolkit/themes/windows/global/plugins/pluginHelp-16.png
toolkit/themes/windows/mozapps/plugins/pluginHelp-16.png
--- a/browser/actors/ContextMenuChild.jsm
+++ b/browser/actors/ContextMenuChild.jsm
@@ -690,25 +690,23 @@ class ContextMenuChild extends ActorChil
 
     context.timeStamp = aEvent.timeStamp;
     context.screenX = aEvent.screenX;
     context.screenY = aEvent.screenY;
     context.mozInputSource = aEvent.mozInputSource;
 
     let node = aEvent.composedTarget;
 
-    // Set the node to containing <video>/<audio>/<embed>/<object> if the node
-    // is in the videocontrols/pluginProblem UA Widget.
+    // Set the node to containing <video>/<audio> if the node
+    // is in the videocontrols UA Widget.
     if (this.content.ShadowRoot) {
       let n = node;
       while (n) {
         if (n instanceof this.content.ShadowRoot) {
-          if (n.host instanceof this.content.HTMLMediaElement ||
-              n.host instanceof this.content.HTMLEmbedElement ||
-              n.host instanceof this.content.HTMLObjectElement) {
+          if (n.host instanceof this.content.HTMLMediaElement) {
             node = n.host;
             break;
           }
           break;
         }
         n = n.parentNode;
       }
     }
--- a/browser/actors/PluginChild.jsm
+++ b/browser/actors/PluginChild.jsm
@@ -116,22 +116,18 @@ class PluginChild extends ActorChild {
       return;
     }
 
     this.clearPluginCaches();
     this.haveShownNotification = false;
   }
 
   getPluginUI(plugin, anonid) {
-    if (plugin.openOrClosedShadowRoot &&
-        plugin.openOrClosedShadowRoot.isUAWidget()) {
-      return plugin.openOrClosedShadowRoot.getElementById(anonid);
-    }
     return plugin.ownerDocument.
-      getAnonymousElementByAttribute(plugin, "anonid", anonid);
+           getAnonymousElementByAttribute(plugin, "anonid", anonid);
   }
 
   _getPluginInfo(pluginElement) {
     let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
     pluginElement.QueryInterface(Ci.nsIObjectLoadingContent);
 
     let tagMimetype;
     let pluginName = gNavigatorBundle.GetStringFromName("pluginInfo.unknownPlugin");
@@ -631,18 +627,17 @@ class PluginChild extends ActorChild {
   }
 
   onOverlayClick(event) {
     let document = event.target.ownerDocument;
     let plugin = document.getBindingParent(event.target);
     let overlay = this.getPluginUI(plugin, "main");
     // Have to check that the target is not the link to update the plugin
     if (!(ChromeUtils.getClassName(event.originalTarget) === "HTMLAnchorElement") &&
-        event.originalTarget.getAttribute("anonid") != "closeIcon" &&
-        event.originalTarget.id != "closeIcon" &&
+        (event.originalTarget.getAttribute("anonid") != "closeIcon") &&
         !overlay.hasAttribute("dismissed") &&
         event.button == 0 &&
         event.isTrusted) {
       this._showClickToPlayNotification(plugin, true);
     event.stopPropagation();
     event.preventDefault();
     }
   }
--- a/browser/base/content/browser-plugins.js
+++ b/browser/base/content/browser-plugins.js
@@ -440,17 +440,17 @@ var gPluginHandler = {
     let notificationBox = gBrowser.getNotificationBox(browser);
     let notification = notificationBox.getNotificationWithValue("plugin-crashed");
     if (notification) {
       return;
     }
 
     // Configure the notification bar
     let priority = notificationBox.PRIORITY_WARNING_MEDIUM;
-    let iconURL = "chrome://global/skin/plugins/pluginGeneric.svg";
+    let iconURL = "chrome://mozapps/skin/plugins/pluginGeneric.svg";
     let reloadLabel = gNavigatorBundle.getString("crashedpluginsMessage.reloadButton.label");
     let reloadKey   = gNavigatorBundle.getString("crashedpluginsMessage.reloadButton.accesskey");
 
     let buttons = [{
       label: reloadLabel,
       accessKey: reloadKey,
       popup: null,
       callback() { browser.reload(); },
--- a/browser/base/content/test/plugins/browser.ini
+++ b/browser/base/content/test/plugins/browser.ini
@@ -1,10 +1,9 @@
 [DEFAULT]
-prefs = dom.ua_widget.enabled=true
 support-files =
   blocklist_proxy.js
   blockNoPlugins.xml
   blockPluginHard.xml
   blockPluginInfoURL.xml
   blockPluginVulnerableNoUpdate.xml
   blockPluginVulnerableUpdatable.xml
   browser_clearplugindata.html
--- a/browser/base/content/test/plugins/browser_CTP_crashreporting.js
+++ b/browser/base/content/test/plugins/browser_CTP_crashreporting.js
@@ -91,18 +91,20 @@ add_task(async function() {
         return plugin.activated;
       }, "Waited too long for plugin to activate.");
 
       try {
         Cu.waiveXrays(plugin).crash();
       } catch (e) {
       }
 
-      let getUI = (id) => {
-        return plugin.openOrClosedShadowRoot.getElementById(id);
+      let doc = plugin.ownerDocument;
+
+      let getUI = (anonid) => {
+        return doc.getAnonymousElementByAttribute(plugin, "anonid", anonid);
       };
 
       // Now wait until the plugin crash report UI shows itself, which is
       // asynchronous.
       let statusDiv;
 
       await ContentTaskUtils.waitForCondition(() => {
         statusDiv = getUI("submitStatus");
--- a/browser/base/content/test/plugins/browser_CTP_hide_overlay.js
+++ b/browser/base/content/test/plugins/browser_CTP_hide_overlay.js
@@ -28,18 +28,18 @@ add_task(async function() {
 
   // Work around for delayed PluginBindingAttached
   await promiseUpdatePluginBindings(gBrowser.selectedBrowser);
 
   // Tests that the overlay can be hidden for plugins using the close icon.
   await ContentTask.spawn(gBrowser.selectedBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
-    let closeIcon = plugin.openOrClosedShadowRoot.getElementById("closeIcon");
+    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
+    let closeIcon = doc.getAnonymousElementByAttribute(plugin, "anonid", "closeIcon");
     let bounds = closeIcon.getBoundingClientRect();
     let left = (bounds.left + bounds.right) / 2;
     let top = (bounds.top + bounds.bottom) / 2;
     let utils = content.windowUtils;
     utils.sendMouseEvent("mousedown", left, top, 0, 1, 0, false, 0, 0);
     utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
 
     Assert.ok(!overlay.classList.contains("visible"), "overlay should be hidden.");
@@ -54,18 +54,18 @@ add_task(async function() {
   await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
 
   // Work around for delayed PluginBindingAttached
   await promiseUpdatePluginBindings(gBrowser.selectedBrowser);
 
   await ContentTask.spawn(gBrowser.selectedBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
-    let closeIcon = plugin.openOrClosedShadowRoot.getElementById("closeIcon");
+    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
+    let closeIcon = doc.getAnonymousElementByAttribute(plugin, "anonid", "closeIcon");
     let closeIconBounds = closeIcon.getBoundingClientRect();
     let overlayBounds = overlay.getBoundingClientRect();
     let overlayLeft = (overlayBounds.left + overlayBounds.right) / 2;
     let overlayTop = (overlayBounds.left + overlayBounds.right) / 2 ;
     let closeIconLeft = (closeIconBounds.left + closeIconBounds.right) / 2;
     let closeIconTop = (closeIconBounds.top + closeIconBounds.bottom) / 2;
     let utils = content.windowUtils;
     // Simulate clicking on the close icon.
--- a/browser/base/content/test/plugins/browser_CTP_iframe.js
+++ b/browser/base/content/test/plugins/browser_CTP_iframe.js
@@ -24,21 +24,21 @@ add_task(async function() {
   await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_iframe.html");
 
   // Tests that the overlays are visible and actionable if the plugin is in an iframe.
 
   await ContentTask.spawn(gBrowser.selectedBrowser, null, async function() {
     let frame = content.document.getElementById("frame");
     let doc = frame.contentDocument;
     let plugin = doc.getElementById("test");
-    let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
+    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
     Assert.ok(plugin && overlay.classList.contains("visible"),
       "Test 1, Plugin overlay should exist, not be hidden");
 
-    let closeIcon = plugin.openOrClosedShadowRoot.getElementById("closeIcon");
+    let closeIcon = doc.getAnonymousElementByAttribute(plugin, "anonid", "closeIcon");
     let bounds = closeIcon.getBoundingClientRect();
     let left = (bounds.left + bounds.right) / 2;
     let top = (bounds.top + bounds.bottom) / 2;
     let utils = doc.defaultView.windowUtils;
     utils.sendMouseEvent("mousedown", left, top, 0, 1, 0, false, 0, 0);
     utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
     Assert.ok(!overlay.classList.contains("visible"),
       "Test 1, Plugin overlay should exist, be hidden");
--- a/browser/base/content/test/plugins/browser_CTP_outsideScrollArea.js
+++ b/browser/base/content/test/plugins/browser_CTP_outsideScrollArea.js
@@ -50,17 +50,18 @@ add_task(async function() {
 
   // Work around for delayed PluginBindingAttached
   await promiseUpdatePluginBindings(gTestBrowser);
 
   await promisePopupNotification("click-to-play-plugins");
 
   await ContentTask.spawn(gTestBrowser, {}, async function() {
     let plugin = content.document.getElementById("test");
-    let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
+    let doc = content.document;
+    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
     Assert.ok(overlay && overlay.classList.contains("visible") &&
               overlay.getAttribute("sizing") != "blank",
               "Test 2, overlay should be visible.");
   });
 });
 
 add_task(async function() {
   await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_outsideScrollArea.html");
@@ -79,17 +80,18 @@ add_task(async function() {
 
   // Work around for delayed PluginBindingAttached
   await promiseUpdatePluginBindings(gTestBrowser);
 
   await promisePopupNotification("click-to-play-plugins");
 
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let plugin = content.document.getElementById("test");
-    let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
+    let doc = content.document;
+    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
     Assert.ok(overlay && overlay.classList.contains("visible") &&
               overlay.getAttribute("sizing") != "blank",
               "Test 3, overlay should be visible.");
   });
 });
 
 add_task(async function() {
   await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_outsideScrollArea.html");
@@ -107,13 +109,14 @@ add_task(async function() {
   });
 
   // Work around for delayed PluginBindingAttached
   await promiseUpdatePluginBindings(gTestBrowser);
 
   await promisePopupNotification("click-to-play-plugins");
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let plugin = content.document.getElementById("test");
-    let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
+    let doc = content.document;
+    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
     Assert.ok(!overlay || overlay.getAttribute("sizing") == "blank",
       "Test 4, overlay should be blank.");
   });
 });
--- a/browser/base/content/test/plugins/browser_CTP_overlay_styles.js
+++ b/browser/base/content/test/plugins/browser_CTP_overlay_styles.js
@@ -70,17 +70,17 @@ add_task(async function() {
   // Work around for delayed PluginBindingAttached
   await promiseUpdatePluginBindings(gTestBrowser);
 
   await ContentTask.spawn(gTestBrowser, gTestcases, async function(testcases) {
     let doc = content.document;
 
     for (let testcaseId of Object.keys(testcases)) {
       let plugin = doc.querySelector(`#${testcaseId} > object`);
-      let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
+      let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
       Assert.ok(overlay, `overlay exists in ${testcaseId}`);
 
       let expectations = testcases[testcaseId];
 
       Assert.ok(overlay.classList.contains("visible"),
                 `The expected visibility is correct in ${testcaseId}`);
 
       Assert.ok(overlay.getAttribute("sizing") == expectations.sizing,
--- a/browser/base/content/test/plugins/browser_CTP_resize.js
+++ b/browser/base/content/test/plugins/browser_CTP_resize.js
@@ -40,17 +40,17 @@ add_task(async function() {
 // once they are resized to a size that can hold the overlay
 add_task(async function() {
   let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
   ok(popupNotification, "Test 2, Should have a click-to-play notification");
 
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
+    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
     Assert.ok(!overlay || overlay.getAttribute("sizing") == "blank",
       "Test 2, overlay should be blank.");
   });
 });
 
 add_task(async function() {
   await ContentTask.spawn(gTestBrowser, {}, async function() {
     let plugin = content.document.getElementById("test");
@@ -58,17 +58,17 @@ add_task(async function() {
   });
 
   // Work around for delayed PluginBindingAttached
   await promiseUpdatePluginBindings(gTestBrowser);
 
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
+    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
     Assert.ok(!overlay || overlay.getAttribute("sizing") == "blank",
       "Test 3, overlay should be blank.");
   });
 });
 
 
 add_task(async function() {
   await ContentTask.spawn(gTestBrowser, {}, async function() {
@@ -78,17 +78,17 @@ add_task(async function() {
 
   await ContentTask.spawn(gTestBrowser, {}, async function() {
     content.document.getElementById("test").clientTop;
   });
 
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
+    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
     Assert.ok(overlay && overlay.getAttribute("sizing") != "blank",
       "Test 4, overlay should be visible.");
   });
 });
 
 add_task(async function() {
   await ContentTask.spawn(gTestBrowser, {}, async function() {
     let plugin = content.document.getElementById("test");
@@ -98,17 +98,17 @@ add_task(async function() {
 
   await ContentTask.spawn(gTestBrowser, {}, async function() {
     content.document.getElementById("test").clientTop;
   });
 
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
+    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
     Assert.ok(!overlay || overlay.getAttribute("sizing") == "blank",
       "Test 5, overlay should be blank.");
   });
 });
 
 add_task(async function() {
   await ContentTask.spawn(gTestBrowser, {}, async function() {
     let plugin = content.document.getElementById("test");
@@ -118,13 +118,13 @@ add_task(async function() {
 
   await ContentTask.spawn(gTestBrowser, {}, async function() {
     content.document.getElementById("test").clientTop;
   });
 
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
+    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
     Assert.ok(overlay && overlay.getAttribute("sizing") != "blank",
       "Test 6, overlay should be visible.");
   });
 });
--- a/browser/base/content/test/plugins/browser_CTP_shouldShowOverlay.js
+++ b/browser/base/content/test/plugins/browser_CTP_shouldShowOverlay.js
@@ -46,17 +46,17 @@ add_task(async function() {
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let doc = content.document;
     let testcases = doc.querySelectorAll(".testcase");
 
     for (let testcase of testcases) {
       let plugin = testcase.querySelector("object");
       Assert.ok(plugin, `plugin exists in ${testcase.id}`);
 
-      let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
+      let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
       Assert.ok(overlay, `overlay exists in ${testcase.id}`);
 
       let expectedVisibility = (testcase.getAttribute("shouldshow") == "true");
       Assert.ok((overlay.getAttribute("sizing") != "blank") == expectedVisibility,
                 `The expected visibility is correct in ${testcase.id}`);
     }
   });
 });
--- a/browser/base/content/test/plugins/browser_CTP_zoom.js
+++ b/browser/base/content/test/plugins/browser_CTP_zoom.js
@@ -47,16 +47,16 @@ add_task(async function() {
     FullZoom.enlarge();
 
     // Reload the page
     await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_zoom.html");
     await promiseUpdatePluginBindings(gTestBrowser);
     await ContentTask.spawn(gTestBrowser, { count }, async function(args) {
       let doc = content.document;
       let plugin = doc.getElementById("test");
-      let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
+      let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
       Assert.ok(overlay && overlay.classList.contains("visible"),
         "Overlay should be visible for zoom change count " + args.count);
     });
   }
 });
 
 
--- a/browser/base/content/test/plugins/browser_blocking.js
+++ b/browser/base/content/test/plugins/browser_blocking.js
@@ -50,31 +50,31 @@ add_task(async function() {
   let pluginInfo = await promiseForPluginInfo("test");
   is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_VULNERABLE_UPDATABLE,
      "Test 18a, plugin fallback type should be PLUGIN_VULNERABLE_UPDATABLE");
   ok(!pluginInfo.activated, "Test 18a, Plugin should not be activated");
 
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
+    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
     Assert.ok(overlay && overlay.classList.contains("visible"),
       "Test 18a, Plugin overlay should exist, not be hidden");
 
-    let updateLink = plugin.openOrClosedShadowRoot.getElementById("checkForUpdatesLink");
+    let updateLink = doc.getAnonymousElementByAttribute(plugin, "anonid", "checkForUpdatesLink");
     Assert.ok(updateLink.style.visibility != "hidden",
       "Test 18a, Plugin should have an update link");
   });
 
   let promise = BrowserTestUtils.waitForEvent(gBrowser.tabContainer, "TabOpen", true);
 
   await ContentTask.spawn(gTestBrowser, {}, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let updateLink = plugin.openOrClosedShadowRoot.getElementById("checkForUpdatesLink");
+    let updateLink = doc.getAnonymousElementByAttribute(plugin, "anonid", "checkForUpdatesLink");
     let bounds = updateLink.getBoundingClientRect();
     let left = (bounds.left + bounds.right) / 2;
     let top = (bounds.top + bounds.bottom) / 2;
     let utils = content.windowUtils;
     utils.sendMouseEvent("mousedown", left, top, 0, 1, 0, false, 0, 0);
     utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
   });
   await promise;
@@ -89,17 +89,17 @@ add_task(async function() {
   let pluginInfo = await promiseForPluginInfo("test");
   is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_VULNERABLE_UPDATABLE,
      "Test 18a, plugin fallback type should be PLUGIN_VULNERABLE_UPDATABLE");
   ok(!pluginInfo.activated, "Test 18b, Plugin should not be activated");
 
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
+    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
     Assert.ok(overlay && overlay.classList.contains("visible"),
       "Test 18b, Plugin overlay should exist, not be hidden");
   });
 });
 
 // Tests a vulnerable plugin with no update
 add_task(async function() {
   updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
@@ -117,21 +117,21 @@ add_task(async function() {
   let pluginInfo = await promiseForPluginInfo("test");
   is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_VULNERABLE_NO_UPDATE,
      "Test 18c, plugin fallback type should be PLUGIN_VULNERABLE_NO_UPDATE");
   ok(!pluginInfo.activated, "Test 18c, Plugin should not be activated");
 
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
+    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
     Assert.ok(overlay && overlay.classList.contains("visible"),
       "Test 18c, Plugin overlay should exist, not be hidden");
 
-    let updateLink = plugin.openOrClosedShadowRoot.getElementById("checkForUpdatesLink");
+    let updateLink = doc.getAnonymousElementByAttribute(plugin, "anonid", "checkForUpdatesLink");
     Assert.ok(updateLink && updateLink.style.display != "block",
       "Test 18c, Plugin should not have an update link");
   });
 
   // check that click "Allow" works with blocked plugins
   await promiseForNotificationShown(notification);
 
   PopupNotifications.panel.firstElementChild.button.click();
--- a/browser/base/content/test/plugins/browser_pluginCrashCommentAndURL.js
+++ b/browser/base/content/test/plugins/browser_pluginCrashCommentAndURL.js
@@ -58,20 +58,20 @@ add_task(async function() {
   await pluginCrashed;
 
   let crashReportStatus = TestUtils.topicObserved("crash-report-status", onSubmitStatus);
 
   // Test that the crash submission UI is actually visible and submit the crash report.
   await ContentTask.spawn(gTestBrowser, config, async function(aConfig) {
     let doc = content.document;
     let plugin = doc.getElementById("plugin");
-    let pleaseSubmit = plugin.openOrClosedShadowRoot.getElementById("pleaseSubmit");
-    let submitButton = plugin.openOrClosedShadowRoot.getElementById("submitButton");
+    let pleaseSubmit = doc.getAnonymousElementByAttribute(plugin, "anonid", "pleaseSubmit");
+    let submitButton = doc.getAnonymousElementByAttribute(plugin, "anonid", "submitButton");
     // Test that we don't send the URL when urlOptIn is false.
-    plugin.openOrClosedShadowRoot.getElementById("submitURLOptIn").checked = aConfig.urlOptIn;
+    doc.getAnonymousElementByAttribute(plugin, "anonid", "submitURLOptIn").checked = aConfig.urlOptIn;
     submitButton.click();
     Assert.equal(content.getComputedStyle(pleaseSubmit).display == "block",
       aConfig.shouldSubmissionUIBeVisible, "The crash UI should be visible");
   });
 
   await crashReportStatus;
 });
 
@@ -95,21 +95,21 @@ add_task(async function() {
   await pluginCrashed;
 
   let crashReportStatus = TestUtils.topicObserved("crash-report-status", onSubmitStatus);
 
   // Test that the crash submission UI is actually visible and submit the crash report.
   await ContentTask.spawn(gTestBrowser, config, async function(aConfig) {
     let doc = content.document;
     let plugin = doc.getElementById("plugin");
-    let pleaseSubmit = plugin.openOrClosedShadowRoot.getElementById("pleaseSubmit");
-    let submitButton = plugin.openOrClosedShadowRoot.getElementById("submitButton");
+    let pleaseSubmit = doc.getAnonymousElementByAttribute(plugin, "anonid", "pleaseSubmit");
+    let submitButton = doc.getAnonymousElementByAttribute(plugin, "anonid", "submitButton");
     // Test that we send the URL when urlOptIn is true.
-    plugin.openOrClosedShadowRoot.getElementById("submitURLOptIn").checked = aConfig.urlOptIn;
-    plugin.openOrClosedShadowRoot.getElementById("submitComment").value = aConfig.comment;
+    doc.getAnonymousElementByAttribute(plugin, "anonid", "submitURLOptIn").checked = aConfig.urlOptIn;
+    doc.getAnonymousElementByAttribute(plugin, "anonid", "submitComment").value = aConfig.comment;
     submitButton.click();
     Assert.equal(content.getComputedStyle(pleaseSubmit).display == "block",
       aConfig.shouldSubmissionUIBeVisible, "The crash UI should be visible");
   });
 
   await crashReportStatus;
 });
 
@@ -166,17 +166,17 @@ add_task(async function() {
 
   // Wait for the plugin to crash
   await pluginCrashed;
 
   // Test that the crash submission UI is not visible and do not submit a crash report.
   await ContentTask.spawn(gTestBrowser, config, async function(aConfig) {
     let doc = content.document;
     let plugin = doc.getElementById("plugin");
-    let pleaseSubmit = plugin.openOrClosedShadowRoot.getElementById("pleaseSubmit");
+    let pleaseSubmit = doc.getAnonymousElementByAttribute(plugin, "anonid", "pleaseSubmit");
     Assert.equal(!!pleaseSubmit && content.getComputedStyle(pleaseSubmit).display == "block",
       aConfig.shouldSubmissionUIBeVisible, "Plugin crash UI should not be visible");
   });
 
   await crashDeferred.promise;
   Services.obs.removeObserver(crashObserver, "plugin-crashed");
 });
 
--- a/browser/base/content/test/plugins/browser_pluginCrashReportNonDeterminism.js
+++ b/browser/base/content/test/plugins/browser_pluginCrashReportNonDeterminism.js
@@ -54,18 +54,19 @@ function preparePlugin(browser, pluginFa
   return ContentTask.spawn(browser, pluginFallbackState, async function(contentPluginFallbackState) {
     let plugin = content.document.getElementById("plugin");
     plugin.QueryInterface(Ci.nsIObjectLoadingContent);
     // CRASH_URL will load a plugin that crashes immediately. We
     // wait until the plugin has finished being put into the crash
     // state.
     let statusDiv;
     await ContentTaskUtils.waitForCondition(() => {
-      statusDiv = plugin.openOrClosedShadowRoot.getElementById("submitStatus");
-
+      statusDiv = plugin.ownerDocument
+                        .getAnonymousElementByAttribute(plugin, "anonid",
+                                                        "submitStatus");
       return statusDiv && statusDiv.getAttribute("status") == "please";
     }, "Timed out waiting for plugin to be in crash report state");
 
     // "Rewind", by wiping out the status attribute...
     statusDiv.removeAttribute("status");
     // Somehow, I'm able to get away with overriding the getter for
     // this XPCOM object. Probably because I've got chrome privledges.
     Object.defineProperty(plugin, "pluginFallbackType", {
@@ -152,17 +153,19 @@ add_task(async function testChromeHearsP
                       { pluginName: "", runID, state: "please" });
 
   await ContentTask.spawn(browser, null, async function() {
     // At this point, the content process should have heard the
     // plugin crash message from the parent, and we are OK to emit
     // the PluginCrashed event.
     let plugin = content.document.getElementById("plugin");
     plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    let statusDiv = plugin.openOrClosedShadowRoot.getElementById("submitStatus");
+    let statusDiv = plugin.ownerDocument
+                          .getAnonymousElementByAttribute(plugin, "anonid",
+                                                          "submitStatus");
 
     if (statusDiv.getAttribute("status") == "please") {
       Assert.ok(false, "Did not expect plugin to be in crash report mode yet.");
       return;
     }
 
     // Now we need the plugin to seem crashed to PluginContent.jsm, without
     // actually crashing the plugin again. We hack around this by overriding
@@ -212,17 +215,19 @@ add_task(async function testContentHears
                                   Ci.nsIObjectLoadingContent.PLUGIN_CRASHED);
 
   await ContentTask.spawn(browser, null, async function() {
     // At this point, the content process has not yet heard from the
     // parent about the crash report. Let's ensure that by making sure
     // we're not showing the plugin crash report UI.
     let plugin = content.document.getElementById("plugin");
     plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    let statusDiv = plugin.openOrClosedShadowRoot.getElementById("submitStatus");
+    let statusDiv = plugin.ownerDocument
+                          .getAnonymousElementByAttribute(plugin, "anonid",
+                                                          "submitStatus");
 
     if (statusDiv.getAttribute("status") == "please") {
       Assert.ok(false, "Did not expect plugin to be in crash report mode yet.");
     }
 
     let event = new content.PluginCrashedEvent("PluginCrashed", {
       pluginName: "",
       pluginDumpID: "",
@@ -245,17 +250,19 @@ add_task(async function testContentHears
                       { pluginName: "", runID, state: "please"});
 
   await ContentTask.spawn(browser, null, async function() {
     // At this point, the content process will have heard the message
     // from the parent and reacted to it. We should be showing the plugin
     // crash report UI now.
     let plugin = content.document.getElementById("plugin");
     plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    let statusDiv = plugin.openOrClosedShadowRoot.getElementById("submitStatus");
+    let statusDiv = plugin.ownerDocument
+                          .getAnonymousElementByAttribute(plugin, "anonid",
+                                                          "submitStatus");
 
     Assert.equal(statusDiv.getAttribute("status"), "please",
       "Should have been showing crash report UI");
   });
 
   await BrowserTestUtils.closeWindow(win);
   await crashDeferred.promise;
 });
--- a/browser/base/content/test/plugins/browser_pluginnotification.js
+++ b/browser/base/content/test/plugins/browser_pluginnotification.js
@@ -85,17 +85,17 @@ add_task(async function() {
   gTestBrowser.reload();
   await browserLoaded;
   notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
 
   // Simulate clicking the overlay
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let bounds = plugin.openOrClosedShadowRoot.getElementById("main").getBoundingClientRect();
+    let bounds = doc.getAnonymousElementByAttribute(plugin, "anonid", "main").getBoundingClientRect();
     let left = (bounds.left + bounds.right) / 2;
     let top = (bounds.top + bounds.bottom) / 2;
     let utils = content.windowUtils;
     utils.sendMouseEvent("mousedown", left, top, 0, 1, 0, false, 0, 0);
     utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
   });
 
   ok(!notification.dismissed, "A plugin notification should be shown.");
@@ -190,17 +190,17 @@ add_task(async function() {
 add_task(async function() {
   updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
 
   await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_alternate_content.html");
 
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let mainBox = plugin.openOrClosedShadowRoot.getElementById("main");
+    let mainBox = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
     Assert.ok(!!mainBox, "Test 15, Plugin overlay should exist");
   });
 });
 
 // Tests that mContentType is used for click-to-play plugins, and not the
 // inspected type.
 add_task(async function() {
   await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_bug749455.html");
@@ -225,17 +225,17 @@ add_task(async function() {
   ok(!pluginInfo.activated, "Test 18g, Plugin should not be activated");
 
   ok(PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed,
      "Test 19a, Doorhanger should start out dismissed");
 
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let icon = plugin.openOrClosedShadowRoot.getElementById("icon");
+    let icon = doc.getAnonymousElementByAttribute(plugin, "class", "icon");
     let bounds = icon.getBoundingClientRect();
     let left = (bounds.left + bounds.right) / 2;
     let top = (bounds.top + bounds.bottom) / 2;
     let utils = content.windowUtils;
     utils.sendMouseEvent("mousedown", left, top, 0, 1, 0, false, 0, 0);
     utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
   });
 
@@ -254,17 +254,17 @@ add_task(async function() {
   ok(!pluginInfo.activated, "Test 18g, Plugin should not be activated");
 
   ok(PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed,
      "Test 19c, Doorhanger should start out dismissed");
 
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let text = plugin.openOrClosedShadowRoot.getElementById("clickToPlay");
+    let text = doc.getAnonymousElementByAttribute(plugin, "class", "msg msgClickToPlay");
     let bounds = text.getBoundingClientRect();
     let left = (bounds.left + bounds.right) / 2;
     let top = (bounds.top + bounds.bottom) / 2;
     let utils = content.windowUtils;
     utils.sendMouseEvent("mousedown", left, top, 0, 1, 0, false, 0, 0);
     utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
   });
 
@@ -314,24 +314,24 @@ add_task(async function() {
   await promiseUpdatePluginBindings(gTestBrowser);
 
   let notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
   ok(notification, "Test 20a, Should have a click-to-play notification");
 
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let overlay = plugin.openOrClosedShadowRoot.getElementById("main");
+    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
     Assert.ok(!!overlay, "Test 20a, Plugin overlay should exist");
   });
 
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let mainBox = plugin.openOrClosedShadowRoot.getElementById("main");
+    let mainBox = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
     let overlayRect = mainBox.getBoundingClientRect();
     Assert.ok(overlayRect.width == 0 && overlayRect.height == 0,
       "Test 20a, plugin should have an overlay with 0px width and height");
   });
 
   let pluginInfo = await promiseForPluginInfo("test");
   ok(!pluginInfo.activated, "Test 20b, plugin should not be activated");
 
@@ -346,17 +346,17 @@ add_task(async function() {
     let doc = content.document;
     let div = doc.getElementById("container");
     div.style.display = "block";
   });
 
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    let mainBox = plugin.openOrClosedShadowRoot.getElementById("main");
+    let mainBox = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
     let overlayRect = mainBox.getBoundingClientRect();
     Assert.ok(overlayRect.width == 200 && overlayRect.height == 200,
       "Test 20c, plugin should have overlay dims of 200px");
   });
 
   pluginInfo = await promiseForPluginInfo("test");
   ok(!pluginInfo.activated, "Test 20b, plugin should not be activated");
 
@@ -378,18 +378,19 @@ add_task(async function() {
   PopupNotifications.panel.firstElementChild.button.click();
 
   pluginInfo = await promiseForPluginInfo("test");
   ok(pluginInfo.activated, "Test 20c, plugin should be activated");
 
   await ContentTask.spawn(gTestBrowser, null, async function() {
     let doc = content.document;
     let plugin = doc.getElementById("test");
-    Assert.ok(!plugin.openOrClosedShadowRoot,
-      "Test 20c, CTP UA Widget Shadow Root is removed");
+    let overlayRect = doc.getAnonymousElementByAttribute(plugin, "anonid", "main").getBoundingClientRect();
+    Assert.ok(overlayRect.width == 0 && overlayRect.height == 0,
+      "Test 20c, plugin should have overlay dims of 0px");
   });
 
   clearAllPluginPermissions();
 });
 
 // Tests that a click-to-play plugin resets its activated state when changing types
 add_task(async function() {
   clearAllPluginPermissions();
--- a/browser/base/content/test/plugins/browser_private_clicktoplay.js
+++ b/browser/base/content/test/plugins/browser_private_clicktoplay.js
@@ -195,22 +195,23 @@ add_task(async function test3d() {
   let popupNotification = gPrivateWindow.PopupNotifications.getNotification("click-to-play-plugins", gPrivateBrowser);
   ok(popupNotification, "Test 3d, Should have a click-to-play notification");
 
   // Check the list item status
   let promiseShown = BrowserTestUtils.waitForEvent(gPrivateWindow.PopupNotifications.panel,
                                                    "Shown");
   popupNotification.reshow();
   await promiseShown;
+  let doc = gPrivateWindow.document;
   for (let item of gPrivateWindow.PopupNotifications.panel.firstElementChild.children) {
-    let allowalways = item.openOrClosedShadowRoot.getElementById("allowalways");
+    let allowalways = doc.getAnonymousElementByAttribute(item, "anonid", "allowalways");
     ok(allowalways, "Test 3d, should have list item for allow always");
-    let allownow = item.openOrClosedShadowRoot.getElementById("allownow");
+    let allownow = doc.getAnonymousElementByAttribute(item, "anonid", "allownow");
     ok(allownow, "Test 3d, should have list item for allow now");
-    let block = item.openOrClosedShadowRoot.getElementById("block");
+    let block = doc.getAnonymousElementByAttribute(item, "anonid", "block");
     ok(block, "Test 3d, should have list item for block");
 
     if (item.action.pluginName === "Test") {
       is(item.value, "allowalways", "Test 3d, Plugin should bet set to 'allow always'");
       ok(!allowalways.hidden, "Test 3d, Plugin set to 'always allow' should have a visible 'always allow' action.");
       ok(allownow.hidden, "Test 3d, Plugin set to 'always allow' should have an invisible 'allow now' action.");
       ok(block.hidden, "Test 3d, Plugin set to 'always allow' should have an invisible 'block' action.");
     } else if (item.action.pluginName === "Second Test") {
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
-  "extends": [
-    "plugin:mozilla/browser-test"
-  ]
-};
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/blockNoPlugins.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1336406310001">
-  <emItems>
-  </emItems>
-  <pluginItems>
-  </pluginItems>
-</blocklist>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/blockPluginHard.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1336406310000">
-  <emItems>
-  </emItems>
-  <pluginItems>
-    <pluginItem blockID="p9999">
-      <match name="filename" exp="libnptest\.so|nptest\.dll|Test\.plugin" />
-      <versionRange severity="2"></versionRange>
-    </pluginItem>
-  </pluginItems>
-</blocklist>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/blockPluginInfoURL.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0"?>
-<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1336406310000">
-  <emItems>
-  </emItems>
-  <pluginItems>
-    <pluginItem blockID="p9999">
-      <match name="filename" exp="libnptest\.so|nptest\.dll|Test\.plugin" />
-      <versionRange severity="2"></versionRange>
-      <infoURL>http://test.url.com/</infoURL>
-    </pluginItem>
-  </pluginItems>
-</blocklist>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/blockPluginVulnerableNoUpdate.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1336406310000">
-  <emItems>
-  </emItems>
-  <pluginItems>
-    <pluginItem blockID="p9999">
-      <match name="filename" exp="libnptest\.so|nptest\.dll|Test\.plugin" />
-      <versionRange severity="0" vulnerabilitystatus="2"></versionRange>
-    </pluginItem>
-  </pluginItems>
-</blocklist>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/blockPluginVulnerableUpdatable.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1336406310000">
-  <emItems>
-  </emItems>
-  <pluginItems>
-    <pluginItem blockID="p9999">
-      <match name="filename" exp="libnptest\.so|nptest\.dll|Test\.plugin" />
-      <versionRange severity="0" vulnerabilitystatus="1"></versionRange>
-    </pluginItem>
-  </pluginItems>
-</blocklist>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/blocklist_proxy.js
+++ /dev/null
@@ -1,69 +0,0 @@
-var Cm = Components.manager;
-
-const kBlocklistServiceUUID = "{66354bc9-7ed1-4692-ae1d-8da97d6b205e}";
-const kBlocklistServiceContractID = "@mozilla.org/extensions/blocklist;1";
-const kBlocklistServiceFactory = Cm.getClassObject(Cc[kBlocklistServiceContractID], Ci.nsIFactory);
-
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Timer.jsm");
-
-SimpleTest.requestFlakyTimeout("Need to simulate blocklist calls actually taking non-0 time to return");
-
-/*
- * A lightweight blocklist proxy for the testing purposes.
- */
-var BlocklistProxy = {
-  _uuid: null,
-
-  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
-                                          Ci.nsIBlocklistService,
-                                          Ci.nsITimerCallback]),
-
-  init() {
-    if (!this._uuid) {
-      this._uuid =
-        Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator)
-                                           .generateUUID();
-      Cm.nsIComponentRegistrar.registerFactory(this._uuid, "",
-                                               "@mozilla.org/extensions/blocklist;1",
-                                               this);
-    }
-  },
-
-  uninit() {
-    if (this._uuid) {
-      Cm.nsIComponentRegistrar.unregisterFactory(this._uuid, this);
-      Cm.nsIComponentRegistrar.registerFactory(Components.ID(kBlocklistServiceUUID),
-                                               "Blocklist Service",
-                                               "@mozilla.org/extensions/blocklist;1",
-                                               kBlocklistServiceFactory);
-      this._uuid = null;
-    }
-  },
-
-  notify(aTimer) {
-  },
-
-  observe(aSubject, aTopic, aData) {
-  },
-
-  async getAddonBlocklistState(aAddon, aAppVersion, aToolkitVersion) {
-    await new Promise(r => setTimeout(r, 150));
-    return 0; // STATE_NOT_BLOCKED
-  },
-
-  async getPluginBlocklistState(aPluginTag, aAppVersion, aToolkitVersion) {
-    await new Promise(r => setTimeout(r, 150));
-    return 0; // STATE_NOT_BLOCKED
-  },
-
-  async getPluginBlockURL(aPluginTag) {
-    await new Promise(r => setTimeout(r, 150));
-    return "";
-  },
-};
-
-BlocklistProxy.init();
-addEventListener("unload", () => {
-  BlocklistProxy.uninit();
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser.ini
+++ /dev/null
@@ -1,98 +0,0 @@
-[DEFAULT]
-prefs = dom.ua_widget.enabled=false
-support-files =
-  blocklist_proxy.js
-  blockNoPlugins.xml
-  blockPluginHard.xml
-  blockPluginInfoURL.xml
-  blockPluginVulnerableNoUpdate.xml
-  blockPluginVulnerableUpdatable.xml
-  browser_clearplugindata.html
-  browser_clearplugindata_noage.html
-  empty_file.html
-  ../head.js
-  plugin_add_dynamically.html
-  plugin_alternate_content.html
-  plugin_big.html
-  plugin_both.html
-  plugin_both2.html
-  plugin_bug744745.html
-  plugin_bug749455.html
-  plugin_bug787619.html
-  plugin_bug797677.html
-  plugin_bug820497.html
-  plugin_clickToPlayAllow.html
-  plugin_clickToPlayDeny.html
-  plugin_favorfallback.html
-  plugin_hidden_to_visible.html
-  plugin_iframe.html
-  plugin_outsideScrollArea.html
-  plugin_overlay_styles.html
-  plugin_simple_blank.swf
-  plugin_shouldShowOverlay.html
-  plugin_small.html
-  plugin_small_2.html
-  plugin_syncRemoved.html
-  plugin_test.html
-  plugin_test2.html
-  plugin_test3.html
-  plugin_two_types.html
-  plugin_unknown.html
-  plugin_crashCommentAndURL.html
-  plugin_zoom.html
-
-[browser_bug743421.js]
-tags = blocklist
-[browser_bug744745.js]
-[browser_bug787619.js]
-[browser_bug797677.js]
-[browser_bug812562.js]
-tags = blocklist
-[browser_bug818118.js]
-[browser_bug820497.js]
-[browser_clearplugindata.js]
-tags = blocklist
-[browser_CTP_context_menu.js]
-skip-if = toolkit == "gtk3"   # fails intermittently on Linux (bug 909342)
-tags = blocklist
-[browser_CTP_crashreporting.js]
-skip-if = !crashreporter || verify
-tags = blocklist
-[browser_CTP_drag_drop.js]
-tags = blocklist
-[browser_CTP_favorfallback.js]
-[browser_CTP_hide_overlay.js]
-tags = blocklist
-[browser_CTP_iframe.js]
-tags = blocklist
-[browser_CTP_nonplugins.js]
-skip-if = verify
-tags = blocklist
-[browser_CTP_outsideScrollArea.js]
-tags = blocklist
-[browser_CTP_overlay_styles.js]
-[browser_CTP_resize.js]
-tags = blocklist
-[browser_CTP_shouldShowOverlay.js]
-[browser_CTP_zoom.js]
-tags = blocklist
-[browser_blocking.js]
-tags = blocklist
-[browser_iterate_hidden_plugins.js]
-[browser_pluginnotification.js]
-tags = blocklist
-[browser_plugin_reloading.js]
-tags = blocklist
-[browser_blocklist_content.js]
-skip-if = !e10s
-tags = blocklist
-[browser_enable_DRM_prompt.js]
-[browser_private_browsing_eme_persistent_state.js]
-[browser_globalplugin_crashinfobar.js]
-skip-if = !crashreporter
-[browser_pluginCrashCommentAndURL.js]
-skip-if = !crashreporter
-[browser_pluginCrashReportNonDeterminism.js]
-skip-if = !crashreporter
-[browser_private_clicktoplay.js]
-[browser_subframe_access_hidden_plugins.js]
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_CTP_context_menu.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/* import-globals-from ../head.js */
-
-var rootDir = getRootDirectory(gTestPath);
-const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-
-add_task(async function() {
-  registerCleanupFunction(function() {
-    clearAllPluginPermissions();
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
-    gBrowser.removeCurrentTab();
-    window.focus();
-  });
-});
-
-// Test that the activate action in content menus for CTP plugins works
-add_task(async function() {
-  Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-  let bindingPromise = BrowserTestUtils.waitForContentEvent(gBrowser.selectedBrowser, "PluginBindingAttached", true, null, true);
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-  await promiseUpdatePluginBindings(gBrowser.selectedBrowser);
-  await bindingPromise;
-
-  let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gBrowser.selectedBrowser);
-  ok(popupNotification, "Test 1, Should have a click-to-play notification");
-
-  // check plugin state
-  let pluginInfo = await promiseForPluginInfo("test", gBrowser.selectedBrowser);
-  ok(!pluginInfo.activated, "plugin should not be activated");
-
-  // Display a context menu on the test plugin so we can test
-  // activation menu options.
-  await ContentTask.spawn(gBrowser.selectedBrowser, {}, async function() {
-    let plugin = content.document.getElementById("test");
-    let bounds = plugin.getBoundingClientRect();
-    let left = (bounds.left + bounds.right) / 2;
-    let top = (bounds.top + bounds.bottom) / 2;
-    let utils = content.windowUtils;
-    utils.sendMouseEvent("contextmenu", left, top, 2, 1, 0);
-  });
-
-  popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gBrowser.selectedBrowser);
-  ok(popupNotification, "Should have a click-to-play notification");
-  ok(popupNotification.dismissed, "notification should be dismissed");
-
-  // fixes a occasional test timeout on win7 opt
-  await promiseForCondition(() => document.getElementById("context-ctp-play"));
-
-  let actMenuItem = document.getElementById("context-ctp-play");
-  ok(actMenuItem, "Should have a context menu entry for activating the plugin");
-
-  // Activate the plugin via the context menu
-  EventUtils.synthesizeMouseAtCenter(actMenuItem, {});
-
-  await promiseForCondition(() => !PopupNotifications.panel.dismissed && PopupNotifications.panel.firstElementChild);
-
-  // Activate the plugin
-  PopupNotifications.panel.firstElementChild.button.click();
-
-  // check plugin state
-  pluginInfo = await promiseForPluginInfo("test", gBrowser.selectedBrowser);
-  ok(pluginInfo.activated, "plugin should not be activated");
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_CTP_crashreporting.js
+++ /dev/null
@@ -1,234 +0,0 @@
-/* import-globals-from ../head.js */
-
-var rootDir = getRootDirectory(gTestPath);
-const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-const SERVER_URL = "http://example.com/browser/toolkit/crashreporter/test/browser/crashreport.sjs";
-const PLUGIN_PAGE = gTestRoot + "plugin_big.html";
-const PLUGIN_SMALL_PAGE = gTestRoot + "plugin_small.html";
-
-/**
- * Takes an nsIPropertyBag and converts it into a JavaScript Object. It
- * will also convert any nsIPropertyBag's within the nsIPropertyBag
- * recursively.
- *
- * @param aBag
- *        The nsIPropertyBag to convert.
- * @return Object
- *        Keyed on the names of the nsIProperty's within the nsIPropertyBag,
- *        and mapping to their values.
- */
-function convertPropertyBag(aBag) {
-  let result = {};
-  for (let { name, value } of aBag.enumerator) {
-    if (value instanceof Ci.nsIPropertyBag) {
-      value = convertPropertyBag(value);
-    }
-    result[name] = value;
-  }
-  return result;
-}
-
-add_task(async function setup() {
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-
-  // The test harness sets MOZ_CRASHREPORTER_NO_REPORT, which disables plugin
-  // crash reports.  This test needs them enabled.  The test also needs a mock
-  // report server, and fortunately one is already set up by toolkit/
-  // crashreporter/test/Makefile.in.  Assign its URL to MOZ_CRASHREPORTER_URL,
-  // which CrashSubmit.jsm uses as a server override.
-  let env = Cc["@mozilla.org/process/environment;1"].
-            getService(Ci.nsIEnvironment);
-  let noReport = env.get("MOZ_CRASHREPORTER_NO_REPORT");
-  let serverURL = env.get("MOZ_CRASHREPORTER_URL");
-  env.set("MOZ_CRASHREPORTER_NO_REPORT", "");
-  env.set("MOZ_CRASHREPORTER_URL", SERVER_URL);
-
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-  Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
-
-  registerCleanupFunction(function cleanUp() {
-    clearAllPluginPermissions();
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    env.set("MOZ_CRASHREPORTER_NO_REPORT", noReport);
-    env.set("MOZ_CRASHREPORTER_URL", serverURL);
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
-    window.focus();
-  });
-});
-
-/**
- * Test that plugin crash submissions still work properly after
- * click-to-play activation.
- */
-add_task(async function() {
-  await BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: PLUGIN_PAGE,
-  }, async function(browser) {
-    // Work around for delayed PluginBindingAttached
-    await promiseUpdatePluginBindings(browser);
-
-    let pluginInfo = await promiseForPluginInfo("test", browser);
-    ok(!pluginInfo.activated, "Plugin should not be activated");
-
-    // Simulate clicking the "Allow Always" button.
-    let notification = PopupNotifications.getNotification("click-to-play-plugins", browser);
-    await promiseForNotificationShown(notification, browser);
-    PopupNotifications.panel.firstElementChild.button.click();
-
-    // Prepare a crash report topic observer that only returns when
-    // the crash report has been successfully sent.
-    let crashReportChecker = (subject, data) => {
-      return (data == "success");
-    };
-    let crashReportPromise = TestUtils.topicObserved("crash-report-status",
-                                                     crashReportChecker);
-
-    await ContentTask.spawn(browser, null, async function() {
-      let plugin = content.document.getElementById("test");
-      plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-
-      await ContentTaskUtils.waitForCondition(() => {
-        return plugin.activated;
-      }, "Waited too long for plugin to activate.");
-
-      try {
-        Cu.waiveXrays(plugin).crash();
-      } catch (e) {
-      }
-
-      let doc = plugin.ownerDocument;
-
-      let getUI = (anonid) => {
-        return doc.getAnonymousElementByAttribute(plugin, "anonid", anonid);
-      };
-
-      // Now wait until the plugin crash report UI shows itself, which is
-      // asynchronous.
-      let statusDiv;
-
-      await ContentTaskUtils.waitForCondition(() => {
-        statusDiv = getUI("submitStatus");
-        return statusDiv.getAttribute("status") == "please";
-      }, "Waited too long for plugin to show crash report UI");
-
-      // Make sure the UI matches our expectations...
-      let style = content.getComputedStyle(getUI("pleaseSubmit"));
-      if (style.display != "block") {
-        throw new Error(`Submission UI visibility is not correct. ` +
-                        `Expected block style, got ${style.display}.`);
-      }
-
-      // Fill the crash report in with some test values that we'll test for in
-      // the parent.
-      getUI("submitComment").value = "a test comment";
-      let optIn = getUI("submitURLOptIn");
-      if (!optIn.checked) {
-        throw new Error("URL opt-in should default to true.");
-      }
-
-      // Submit the report.
-      optIn.click();
-      getUI("submitButton").click();
-
-      // And wait for the parent to say that the crash report was submitted
-      // successfully. This can take time on debug builds.
-      await ContentTaskUtils.waitForCondition(() => {
-        return statusDiv.getAttribute("status") == "success";
-      }, "Timed out waiting for plugin binding to be in success state",
-      100, 200);
-    });
-
-    let [subject ] = await crashReportPromise;
-
-    ok(subject instanceof Ci.nsIPropertyBag,
-       "The crash report subject should be an nsIPropertyBag.");
-
-    let crashData = convertPropertyBag(subject);
-    ok(crashData.serverCrashID, "Should have a serverCrashID set.");
-
-    // Remove the submitted report file after ensuring it exists.
-    let file = Cc["@mozilla.org/file/local;1"]
-                 .createInstance(Ci.nsIFile);
-    file.initWithPath(Services.crashmanager._submittedDumpsDir);
-    file.append(crashData.serverCrashID + ".txt");
-    ok(file.exists(), "Submitted report file should exist");
-    file.remove(false);
-
-    ok(crashData.extra, "Extra data should exist");
-    is(crashData.extra.PluginUserComment, "a test comment",
-       "Comment in extra data should match comment in textbox");
-
-    is(crashData.extra.PluginContentURL, undefined,
-       "URL should be absent from extra data when opt-in not checked");
-  });
-});
-
-/**
- * Test that plugin crash submissions still work properly after
- * click-to-play with the notification bar.
- */
-add_task(async function() {
-  await BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: PLUGIN_SMALL_PAGE,
-  }, async function(browser) {
-    // Work around for delayed PluginBindingAttached
-    await promiseUpdatePluginBindings(browser);
-
-    let pluginInfo = await promiseForPluginInfo("test", browser);
-    ok(pluginInfo.activated, "Plugin should be activated from previous test");
-
-    // Prepare a crash report topic observer that only returns when
-    // the crash report has been successfully sent.
-    let crashReportChecker = (subject, data) => {
-      return (data == "success");
-    };
-    let crashReportPromise = TestUtils.topicObserved("crash-report-status",
-                                                     crashReportChecker);
-
-    await ContentTask.spawn(browser, null, async function() {
-      let plugin = content.document.getElementById("test");
-      plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-
-      await ContentTaskUtils.waitForCondition(() => {
-        return plugin.activated;
-      }, "Waited too long for plugin to activate.");
-
-      try {
-        Cu.waiveXrays(plugin).crash();
-      } catch (e) {}
-    });
-
-    // Wait for the notification bar to be displayed.
-    let notification = await waitForNotificationBar("plugin-crashed", browser);
-
-    // Then click the button to submit the crash report.
-    let buttons = notification.querySelectorAll(".notification-button");
-    is(buttons.length, 2, "Should have two buttons.");
-
-    // The "Submit Crash Report" button should be the second one.
-    let submitButton = buttons[1];
-    submitButton.click();
-
-    let [subject ] = await crashReportPromise;
-
-    ok(subject instanceof Ci.nsIPropertyBag,
-       "The crash report subject should be an nsIPropertyBag.");
-
-    let crashData = convertPropertyBag(subject);
-    ok(crashData.serverCrashID, "Should have a serverCrashID set.");
-
-    // Remove the submitted report file after ensuring it exists.
-    let file = Cc["@mozilla.org/file/local;1"]
-                 .createInstance(Ci.nsIFile);
-    file.initWithPath(Services.crashmanager._submittedDumpsDir);
-    file.append(crashData.serverCrashID + ".txt");
-    ok(file.exists(), "Submitted report file should exist");
-    file.remove(false);
-
-    is(crashData.extra.PluginContentURL, undefined,
-       "URL should be absent from extra data when opt-in not checked");
-  });
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_CTP_drag_drop.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/* import-globals-from ../head.js */
-
-var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gNewWindow = null;
-
-add_task(async function() {
-  registerCleanupFunction(function() {
-    clearAllPluginPermissions();
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
-    gNewWindow.close();
-    gNewWindow = null;
-    window.focus();
-  });
-});
-
-add_task(async function() {
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-  Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gBrowser.selectedBrowser);
-
-  await promisePopupNotification("click-to-play-plugins");
-});
-
-add_task(async function() {
-  gNewWindow = gBrowser.replaceTabWithWindow(gBrowser.selectedTab);
-
-  // XXX technically can't load fire before we get this call???
-  await BrowserTestUtils.waitForEvent(gNewWindow, "load", true);
-
-  await promisePopupNotification("click-to-play-plugins", gNewWindow.gBrowser.selectedBrowser);
-
-  ok(PopupNotifications.getNotification("click-to-play-plugins", gNewWindow.gBrowser.selectedBrowser), "Should have a click-to-play notification in the tab in the new window");
-  ok(!PopupNotifications.getNotification("click-to-play-plugins", gBrowser.selectedBrowser), "Should not have a click-to-play notification in the old window now");
-});
-
-add_task(async function() {
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.swapBrowsersAndCloseOther(gBrowser.selectedTab, gNewWindow.gBrowser.selectedTab);
-
-  await promisePopupNotification("click-to-play-plugins", gBrowser.selectedBrowser);
-
-  ok(PopupNotifications.getNotification("click-to-play-plugins", gBrowser.selectedBrowser), "Should have a click-to-play notification in the initial tab again");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gBrowser.selectedBrowser);
-});
-
-add_task(async function() {
-  await promisePopupNotification("click-to-play-plugins");
-
-  gNewWindow = gBrowser.replaceTabWithWindow(gBrowser.selectedTab);
-
-  await promiseWaitForFocus(gNewWindow);
-
-  await promisePopupNotification("click-to-play-plugins", gNewWindow.gBrowser.selectedBrowser);
-});
-
-add_task(async function() {
-  ok(PopupNotifications.getNotification("click-to-play-plugins", gNewWindow.gBrowser.selectedBrowser), "Should have a click-to-play notification in the tab in the new window");
-  ok(!PopupNotifications.getNotification("click-to-play-plugins", gBrowser.selectedBrowser), "Should not have a click-to-play notification in the old window now");
-
-  let pluginInfo = await promiseForPluginInfo("test", gNewWindow.gBrowser.selectedBrowser);
-  ok(!pluginInfo.activated, "plugin should not be activated");
-
-  await ContentTask.spawn(gNewWindow.gBrowser.selectedBrowser, {}, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let bounds = plugin.getBoundingClientRect();
-    let left = (bounds.left + bounds.right) / 2;
-    let top = (bounds.top + bounds.bottom) / 2;
-    let utils = content.windowUtils;
-    utils.sendMouseEvent("mousedown", left, top, 0, 1, 0, false, 0, 0);
-    utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
-  });
-
-  let condition = () => !PopupNotifications.getNotification("click-to-play-plugins", gNewWindow.gBrowser.selectedBrowser).dismissed && gNewWindow.PopupNotifications.panel.firstElementChild;
-  await promiseForCondition(condition);
-});
-
-add_task(async function() {
-  // Click the activate button on doorhanger to make sure it works
-  gNewWindow.PopupNotifications.panel.firstElementChild.button.click();
-
-  let pluginInfo = await promiseForPluginInfo("test", gNewWindow.gBrowser.selectedBrowser);
-  ok(pluginInfo.activated, "plugin should be activated");
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_CTP_favorfallback.js
+++ /dev/null
@@ -1,86 +0,0 @@
-/* import-globals-from ../head.js */
-
-var rootDir = getRootDirectory(gTestPath);
-const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gPluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
-
-add_task(async function() {
-  registerCleanupFunction(function() {
-    clearAllPluginPermissions();
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Shockwave Flash");
-    Services.prefs.clearUserPref("plugins.favorfallback.mode");
-    Services.prefs.clearUserPref("plugins.favorfallback.rules");
-  });
-});
-
-add_task(async function() {
-  Services.prefs.setCharPref("plugins.favorfallback.mode", "follow-ctp");
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Shockwave Flash");
-});
-
-/* The expected behavior of each testcase is documented with its markup
- * in plugin_favorfallback.html.
- *
- *  - "name" is the name of the testcase in the test file.
- *  - "rule" is how the plugins.favorfallback.rules must be configured
- *           for this testcase.
- */
-const testcases = [
-  {
-    name: "video",
-    rule: "video",
-  },
-
-  {
-    name: "nosrc",
-    rule: "nosrc",
-  },
-
-  {
-    name: "embed",
-    rule: "embed,true",
-  },
-
-  {
-    name: "adobelink",
-    rule: "adobelink,true",
-  },
-
-  {
-    name: "installinstructions",
-    rule: "installinstructions,true",
-  },
-
-];
-
-add_task(async function() {
-  for (let testcase of Object.values(testcases)) {
-    info(`Running testcase ${testcase.name}`);
-
-    Services.prefs.setCharPref("plugins.favorfallback.rules", testcase.rule);
-
-    let tab = await BrowserTestUtils.openNewForegroundTab(
-      gBrowser,
-      `${gTestRoot}plugin_favorfallback.html?testcase=${testcase.name}`
-    );
-
-    await ContentTask.spawn(tab.linkedBrowser, testcase.name, async function testPlugins(name) {
-      let testcaseDiv = content.document.getElementById(`testcase_${name}`);
-      let ctpPlugins = testcaseDiv.querySelectorAll(".expected_ctp");
-
-      for (let ctpPlugin of ctpPlugins) {
-        ok(ctpPlugin instanceof Ci.nsIObjectLoadingContent, "This is a plugin object");
-        is(ctpPlugin.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY, "Plugin is CTP");
-      }
-
-      let fallbackPlugins = testcaseDiv.querySelectorAll(".expected_fallback");
-
-      for (let fallbackPlugin of fallbackPlugins) {
-        ok(fallbackPlugin instanceof Ci.nsIObjectLoadingContent, "This is a plugin object");
-        is(fallbackPlugin.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_ALTERNATE, "Plugin fallback content was used");
-      }
-    });
-
-    BrowserTestUtils.removeTab(tab);
-  }
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_CTP_hide_overlay.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/* import-globals-from ../head.js */
-
-var rootDir = getRootDirectory(gTestPath);
-const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gPluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
-
-add_task(async function() {
-  registerCleanupFunction(function() {
-    clearAllPluginPermissions();
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
-    gBrowser.removeCurrentTab();
-    window.focus();
-  });
-});
-
-add_task(async function() {
-  Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Second Test Plug-in");
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gBrowser.selectedBrowser);
-
-  // Tests that the overlay can be hidden for plugins using the close icon.
-  await ContentTask.spawn(gBrowser.selectedBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    let closeIcon = doc.getAnonymousElementByAttribute(plugin, "anonid", "closeIcon");
-    let bounds = closeIcon.getBoundingClientRect();
-    let left = (bounds.left + bounds.right) / 2;
-    let top = (bounds.top + bounds.bottom) / 2;
-    let utils = content.windowUtils;
-    utils.sendMouseEvent("mousedown", left, top, 0, 1, 0, false, 0, 0);
-    utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
-
-    Assert.ok(!overlay.classList.contains("visible"), "overlay should be hidden.");
-  });
-});
-
-// Test that the overlay cannot be interacted with after the user closes the overlay
-add_task(async function() {
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Second Test Plug-in");
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gBrowser.selectedBrowser);
-
-  await ContentTask.spawn(gBrowser.selectedBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    let closeIcon = doc.getAnonymousElementByAttribute(plugin, "anonid", "closeIcon");
-    let closeIconBounds = closeIcon.getBoundingClientRect();
-    let overlayBounds = overlay.getBoundingClientRect();
-    let overlayLeft = (overlayBounds.left + overlayBounds.right) / 2;
-    let overlayTop = (overlayBounds.left + overlayBounds.right) / 2 ;
-    let closeIconLeft = (closeIconBounds.left + closeIconBounds.right) / 2;
-    let closeIconTop = (closeIconBounds.top + closeIconBounds.bottom) / 2;
-    let utils = content.windowUtils;
-    // Simulate clicking on the close icon.
-    utils.sendMouseEvent("mousedown", closeIconLeft, closeIconTop, 0, 1, 0, false, 0, 0);
-    utils.sendMouseEvent("mouseup", closeIconLeft, closeIconTop, 0, 1, 0, false, 0, 0);
-
-    // Simulate clicking on the overlay.
-    utils.sendMouseEvent("mousedown", overlayLeft, overlayTop, 0, 1, 0, false, 0, 0);
-    utils.sendMouseEvent("mouseup", overlayLeft, overlayTop, 0, 1, 0, false, 0, 0);
-
-    Assert.ok(overlay.hasAttribute("dismissed") && !overlay.classList.contains("visible"),
-      "Overlay should be hidden");
-  });
-
-  let notification = PopupNotifications.getNotification("click-to-play-plugins");
-
-  ok(notification.dismissed, "No notification should be shown");
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_CTP_iframe.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/* import-globals-from ../head.js */
-
-var rootDir = getRootDirectory(gTestPath);
-const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-
-add_task(async function() {
-  registerCleanupFunction(function() {
-    clearAllPluginPermissions();
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
-    gBrowser.removeCurrentTab();
-    window.focus();
-  });
-});
-
-add_task(async function() {
-  Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_iframe.html");
-
-  // Tests that the overlays are visible and actionable if the plugin is in an iframe.
-
-  await ContentTask.spawn(gBrowser.selectedBrowser, null, async function() {
-    let frame = content.document.getElementById("frame");
-    let doc = frame.contentDocument;
-    let plugin = doc.getElementById("test");
-    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    Assert.ok(plugin && overlay.classList.contains("visible"),
-      "Test 1, Plugin overlay should exist, not be hidden");
-
-    let closeIcon = doc.getAnonymousElementByAttribute(plugin, "anonid", "closeIcon");
-    let bounds = closeIcon.getBoundingClientRect();
-    let left = (bounds.left + bounds.right) / 2;
-    let top = (bounds.top + bounds.bottom) / 2;
-    let utils = doc.defaultView.windowUtils;
-    utils.sendMouseEvent("mousedown", left, top, 0, 1, 0, false, 0, 0);
-    utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
-    Assert.ok(!overlay.classList.contains("visible"),
-      "Test 1, Plugin overlay should exist, be hidden");
-  });
-});
-
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_CTP_nonplugins.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/* import-globals-from ../head.js */
-
-var rootDir = getRootDirectory(gTestPath);
-const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gPluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
-
-add_task(async function() {
-  registerCleanupFunction(function() {
-    clearAllPluginPermissions();
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
-    gBrowser.removeCurrentTab();
-    window.focus();
-  });
-});
-
-add_task(async function() {
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-  Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_DISABLED, "Test Plug-in");
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_two_types.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gBrowser.selectedBrowser);
-
-  // Test that the click-to-play notification is not shown for non-plugin object elements
-  let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gBrowser.selectedBrowser);
-  ok(popupNotification, "Test 1, Should have a click-to-play notification");
-
-  let pluginRemovedPromise = BrowserTestUtils.waitForContentEvent(gBrowser.selectedBrowser, "PluginRemoved", true, null, true);
-  await ContentTask.spawn(gBrowser.selectedBrowser, {}, async function() {
-    let plugin = content.document.getElementById("secondtestA");
-    plugin.remove();
-    plugin = content.document.getElementById("secondtestB");
-    plugin.remove();
-
-    let image = content.document.createElement("object");
-    image.type = "image/png";
-    image.data = "moz.png";
-    content.document.body.appendChild(image);
-  });
-  await pluginRemovedPromise;
-
-  popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gBrowser.selectedBrowser);
-  ok(popupNotification, "Test 2, Should have a click-to-play notification");
-
-  await ContentTask.spawn(gBrowser.selectedBrowser, {}, async function() {
-    let plugin = content.document.getElementById("test");
-    plugin.remove();
-  });
-
-  popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gBrowser.selectedBrowser);
-  ok(popupNotification, "Test 3, Should still have a click-to-play notification");
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_CTP_outsideScrollArea.js
+++ /dev/null
@@ -1,124 +0,0 @@
-/* import-globals-from ../head.js */
-
-var rootDir = getRootDirectory(gTestPath);
-const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gTestBrowser = null;
-var gPluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
-
-add_task(async function() {
-  registerCleanupFunction(function() {
-    clearAllPluginPermissions();
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
-    gBrowser.removeCurrentTab();
-    window.focus();
-    gTestBrowser = null;
-  });
-});
-
-add_task(async function() {
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-  Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
-
-  let newTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.selectedTab = newTab;
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-
-  let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(!popupNotification, "Test 1, Should not have a click-to-play notification");
-});
-
-// Test that the click-to-play overlay is not hidden for elements
-// partially or fully outside the viewport.
-
-add_task(async function() {
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_outsideScrollArea.html");
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let doc = content.document;
-    let p = doc.createElement("embed");
-
-    p.setAttribute("id", "test");
-    p.setAttribute("type", "application/x-test");
-    p.style.left = "0";
-    p.style.bottom = "200px";
-
-    doc.getElementById("container").appendChild(p);
-  });
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  await promisePopupNotification("click-to-play-plugins");
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let plugin = content.document.getElementById("test");
-    let doc = content.document;
-    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    Assert.ok(overlay && overlay.classList.contains("visible") &&
-              overlay.getAttribute("sizing") != "blank",
-              "Test 2, overlay should be visible.");
-  });
-});
-
-add_task(async function() {
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_outsideScrollArea.html");
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let doc = content.document;
-    let p = doc.createElement("embed");
-
-    p.setAttribute("id", "test");
-    p.setAttribute("type", "application/x-test");
-    p.style.left = "0";
-    p.style.bottom = "-410px";
-
-    doc.getElementById("container").appendChild(p);
-  });
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  await promisePopupNotification("click-to-play-plugins");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let plugin = content.document.getElementById("test");
-    let doc = content.document;
-    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    Assert.ok(overlay && overlay.classList.contains("visible") &&
-              overlay.getAttribute("sizing") != "blank",
-              "Test 3, overlay should be visible.");
-  });
-});
-
-add_task(async function() {
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_outsideScrollArea.html");
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let doc = content.document;
-    let p = doc.createElement("embed");
-
-    p.setAttribute("id", "test");
-    p.setAttribute("type", "application/x-test");
-    p.style.left = "-600px";
-    p.style.bottom = "0";
-
-    doc.getElementById("container").appendChild(p);
-  });
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  await promisePopupNotification("click-to-play-plugins");
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let plugin = content.document.getElementById("test");
-    let doc = content.document;
-    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    Assert.ok(!overlay || overlay.getAttribute("sizing") == "blank",
-      "Test 4, overlay should be blank.");
-  });
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_CTP_overlay_styles.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/* import-globals-from ../head.js */
-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-/* This test ensures that the click-to-play "Activate Plugin" overlay
- * is shown in the right style (which is dependent on its size).
- */
-
-const rootDir = getRootDirectory(gTestPath);
-const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-
-var gTestBrowser = null;
-
-const gTestcases = {
-
-  // 10x10
-  testcase1: {
-    sizing: "blank",
-    notext: null,
-  },
-
-  // 40x40
-  testcase2: {
-    sizing: "tiny",
-    notext: "notext",
-  },
-
-  // 100x70
-  testcase3: {
-    sizing: "reduced",
-    notext: "notext",
-  },
-
-  // 200x200
-  testcase4: {
-    sizing: null,
-    notext: "notext",
-  },
-
-  // 300x300
-  testcase5: {
-    sizing: null,
-    notext: null,
-  },
-};
-
-
-add_task(async function() {
-  registerCleanupFunction(function() {
-    clearAllPluginPermissions();
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    gBrowser.removeCurrentTab();
-    gTestBrowser = null;
-  });
-});
-
-add_task(async function() {
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-
-  let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(!popupNotification, "Sanity check, should not have a click-to-play notification");
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_overlay_styles.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  await ContentTask.spawn(gTestBrowser, gTestcases, async function(testcases) {
-    let doc = content.document;
-
-    for (let testcaseId of Object.keys(testcases)) {
-      let plugin = doc.querySelector(`#${testcaseId} > object`);
-      let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-      Assert.ok(overlay, `overlay exists in ${testcaseId}`);
-
-      let expectations = testcases[testcaseId];
-
-      Assert.ok(overlay.classList.contains("visible"),
-                `The expected visibility is correct in ${testcaseId}`);
-
-      Assert.ok(overlay.getAttribute("sizing") == expectations.sizing,
-                `The expected sizing is correct in ${testcaseId}`);
-
-      Assert.ok(overlay.getAttribute("notext") == expectations.notext,
-                `The expected notext is correct in ${testcaseId}`);
-    }
-  });
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_CTP_resize.js
+++ /dev/null
@@ -1,132 +0,0 @@
-/* import-globals-from ../head.js */
-
-var rootDir = getRootDirectory(gTestPath);
-const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gTestBrowser = null;
-
-add_task(async function() {
-  registerCleanupFunction(function() {
-    clearAllPluginPermissions();
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
-    gBrowser.removeCurrentTab();
-    window.focus();
-    gTestBrowser = null;
-  });
-});
-
-add_task(async function() {
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-  Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
-
-  let newTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.selectedTab = newTab;
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-
-  let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(!popupNotification, "Test 1, Should not have a click-to-play notification");
-
-  await promiseTabLoadEvent(newTab, gTestRoot + "plugin_small.html"); // 10x10 plugin
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  await promisePopupNotification("click-to-play-plugins");
-});
-
-// Test that the overlay is hidden for "small" plugin elements and is shown
-// once they are resized to a size that can hold the overlay
-add_task(async function() {
-  let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(popupNotification, "Test 2, Should have a click-to-play notification");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    Assert.ok(!overlay || overlay.getAttribute("sizing") == "blank",
-      "Test 2, overlay should be blank.");
-  });
-});
-
-add_task(async function() {
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let plugin = content.document.getElementById("test");
-    plugin.style.width = "300px";
-  });
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    Assert.ok(!overlay || overlay.getAttribute("sizing") == "blank",
-      "Test 3, overlay should be blank.");
-  });
-});
-
-
-add_task(async function() {
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let plugin = content.document.getElementById("test");
-    plugin.style.height = "300px";
-  });
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    content.document.getElementById("test").clientTop;
-  });
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    Assert.ok(overlay && overlay.getAttribute("sizing") != "blank",
-      "Test 4, overlay should be visible.");
-  });
-});
-
-add_task(async function() {
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let plugin = content.document.getElementById("test");
-    plugin.style.width = "10px";
-    plugin.style.height = "10px";
-  });
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    content.document.getElementById("test").clientTop;
-  });
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    Assert.ok(!overlay || overlay.getAttribute("sizing") == "blank",
-      "Test 5, overlay should be blank.");
-  });
-});
-
-add_task(async function() {
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let plugin = content.document.getElementById("test");
-    plugin.style.height = "300px";
-    plugin.style.width = "300px";
-  });
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    content.document.getElementById("test").clientTop;
-  });
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    Assert.ok(overlay && overlay.getAttribute("sizing") != "blank",
-      "Test 6, overlay should be visible.");
-  });
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_CTP_shouldShowOverlay.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/* import-globals-from ../head.js */
-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-/* This test ensures that the click-to-play "Activate Plugin" overlay
- * is shown when expected.
- * All testcases are in the plugin_shouldShowOverlay.html file.
- *
- * Note: Technically, the overlay is *always* shown. When this test was
- * originally written, the meaning of "shown" was "shown with the contents",
- * as opposed to "shown as blank". The behavior hasn't changed, but the naming
- * has: now, a "shown as blank" overlay no longer receives a ".hidden" class.
- * It receives a sizing="blank" attribute.
- */
-
-var rootDir = getRootDirectory(gTestPath);
-const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-
-var gTestBrowser = null;
-
-add_task(async function() {
-  registerCleanupFunction(function() {
-    clearAllPluginPermissions();
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    gBrowser.removeCurrentTab();
-    gTestBrowser = null;
-  });
-});
-
-add_task(async function() {
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-
-  let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(!popupNotification, "Sanity check, should not have a click-to-play notification");
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_shouldShowOverlay.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let testcases = doc.querySelectorAll(".testcase");
-
-    for (let testcase of testcases) {
-      let plugin = testcase.querySelector("object");
-      Assert.ok(plugin, `plugin exists in ${testcase.id}`);
-
-      let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-      Assert.ok(overlay, `overlay exists in ${testcase.id}`);
-
-      let expectedVisibility = (testcase.getAttribute("shouldshow") == "true");
-      Assert.ok((overlay.getAttribute("sizing") != "blank") == expectedVisibility,
-                `The expected visibility is correct in ${testcase.id}`);
-    }
-  });
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_CTP_zoom.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/* import-globals-from ../head.js */
-
-"use strict";
-
-var rootDir = getRootDirectory(gTestPath);
-const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-
-var gTestBrowser = null;
-
-add_task(async function() {
-  registerCleanupFunction(function() {
-    clearAllPluginPermissions();
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
-    FullZoom.reset(); // must be called before closing the tab we zoomed!
-    gBrowser.removeCurrentTab();
-    window.focus();
-    gTestBrowser = null;
-  });
-});
-
-add_task(async function() {
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-  Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-
-  let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(!popupNotification, "Test 1, Should not have a click-to-play notification");
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_zoom.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  await promisePopupNotification("click-to-play-plugins");
-});
-
-// Enlarges the zoom level 4 times and tests that the overlay is
-// visible after each enlargement.
-add_task(async function() {
-  for (let count = 0; count < 4; count++) {
-
-    FullZoom.enlarge();
-
-    // Reload the page
-    await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_zoom.html");
-    await promiseUpdatePluginBindings(gTestBrowser);
-    await ContentTask.spawn(gTestBrowser, { count }, async function(args) {
-      let doc = content.document;
-      let plugin = doc.getElementById("test");
-      let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-      Assert.ok(overlay && overlay.classList.contains("visible"),
-        "Overlay should be visible for zoom change count " + args.count);
-    });
-  }
-});
-
-
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_blocking.js
+++ /dev/null
@@ -1,309 +0,0 @@
-/* import-globals-from ../head.js */
-
-var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gTestBrowser = null;
-var gPluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
-
-function updateAllTestPlugins(aState) {
-  setTestPluginEnabledState(aState, "Test Plug-in");
-  setTestPluginEnabledState(aState, "Second Test Plug-in");
-}
-
-add_task(async function() {
-  registerCleanupFunction(async function() {
-    clearAllPluginPermissions();
-    updateAllTestPlugins(Ci.nsIPluginTag.STATE_ENABLED);
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
-    await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins.xml", gTestBrowser);
-    resetBlocklist();
-    gBrowser.removeCurrentTab();
-    window.focus();
-    gTestBrowser = null;
-  });
-});
-
-add_task(async function() {
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
-
-  Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-
-  // Prime the content process
-  await promiseTabLoadEvent(gBrowser.selectedTab, "data:text/html,<html>hi</html>");
-});
-
-// Tests a vulnerable, updatable plugin
-
-add_task(async function() {
-  // enable hard blocklisting of test
-  await asyncSetAndUpdateBlocklist(gTestRoot + "blockPluginVulnerableUpdatable.xml", gTestBrowser);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  await promisePopupNotification("click-to-play-plugins");
-
-  let pluginInfo = await promiseForPluginInfo("test");
-  is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_VULNERABLE_UPDATABLE,
-     "Test 18a, plugin fallback type should be PLUGIN_VULNERABLE_UPDATABLE");
-  ok(!pluginInfo.activated, "Test 18a, Plugin should not be activated");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    Assert.ok(overlay && overlay.classList.contains("visible"),
-      "Test 18a, Plugin overlay should exist, not be hidden");
-
-    let updateLink = doc.getAnonymousElementByAttribute(plugin, "anonid", "checkForUpdatesLink");
-    Assert.ok(updateLink.style.visibility != "hidden",
-      "Test 18a, Plugin should have an update link");
-  });
-
-  let promise = BrowserTestUtils.waitForEvent(gBrowser.tabContainer, "TabOpen", true);
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let updateLink = doc.getAnonymousElementByAttribute(plugin, "anonid", "checkForUpdatesLink");
-    let bounds = updateLink.getBoundingClientRect();
-    let left = (bounds.left + bounds.right) / 2;
-    let top = (bounds.top + bounds.bottom) / 2;
-    let utils = content.windowUtils;
-    utils.sendMouseEvent("mousedown", left, top, 0, 1, 0, false, 0, 0);
-    utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
-  });
-  await promise;
-
-  promise = BrowserTestUtils.waitForEvent(gBrowser.tabContainer, "TabClose", true);
-  gBrowser.removeCurrentTab();
-  await promise;
-});
-
-add_task(async function() {
-  // clicking the update link should not activate the plugin
-  let pluginInfo = await promiseForPluginInfo("test");
-  is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_VULNERABLE_UPDATABLE,
-     "Test 18a, plugin fallback type should be PLUGIN_VULNERABLE_UPDATABLE");
-  ok(!pluginInfo.activated, "Test 18b, Plugin should not be activated");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    Assert.ok(overlay && overlay.classList.contains("visible"),
-      "Test 18b, Plugin overlay should exist, not be hidden");
-  });
-});
-
-// Tests a vulnerable plugin with no update
-add_task(async function() {
-  updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
-
-  await asyncSetAndUpdateBlocklist(gTestRoot + "blockPluginVulnerableNoUpdate.xml", gTestBrowser);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(notification, "Test 18c, Should have a click-to-play notification");
-
-  let pluginInfo = await promiseForPluginInfo("test");
-  is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_VULNERABLE_NO_UPDATE,
-     "Test 18c, plugin fallback type should be PLUGIN_VULNERABLE_NO_UPDATE");
-  ok(!pluginInfo.activated, "Test 18c, Plugin should not be activated");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    Assert.ok(overlay && overlay.classList.contains("visible"),
-      "Test 18c, Plugin overlay should exist, not be hidden");
-
-    let updateLink = doc.getAnonymousElementByAttribute(plugin, "anonid", "checkForUpdatesLink");
-    Assert.ok(updateLink && updateLink.style.display != "block",
-      "Test 18c, Plugin should not have an update link");
-  });
-
-  // check that click "Allow" works with blocked plugins
-  await promiseForNotificationShown(notification);
-
-  PopupNotifications.panel.firstElementChild.button.click();
-
-  pluginInfo = await promiseForPluginInfo("test");
-  is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_VULNERABLE_NO_UPDATE,
-     "Test 18c, plugin fallback type should be PLUGIN_VULNERABLE_NO_UPDATE");
-  ok(pluginInfo.activated, "Test 18c, Plugin should be activated");
-  let enabledState = getTestPluginEnabledState();
-  ok(enabledState, "Test 18c, Plugin enabled state should be STATE_CLICKTOPLAY");
-});
-
-// continue testing "Always allow", make sure it sticks.
-add_task(async function() {
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let pluginInfo = await promiseForPluginInfo("test");
-  ok(pluginInfo.activated, "Test 18d, Waited too long for plugin to activate");
-
-  clearAllPluginPermissions();
-});
-
-// clicking the in-content overlay of a vulnerable plugin should bring
-// up the notification and not directly activate the plugin
-add_task(async function() {
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(notification, "Test 18f, Should have a click-to-play notification");
-  ok(notification.dismissed, "Test 18f, notification should start dismissed");
-
-  let pluginInfo = await promiseForPluginInfo("test");
-  ok(!pluginInfo.activated, "Test 18f, Waited too long for plugin to activate");
-
-  var oldEventCallback = notification.options.eventCallback;
-  let promise = promiseForCondition(() => oldEventCallback == null);
-  notification.options.eventCallback = function() {
-    if (oldEventCallback) {
-      oldEventCallback();
-    }
-    oldEventCallback = null;
-  };
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let bounds = plugin.getBoundingClientRect();
-    let left = (bounds.left + bounds.right) / 2;
-    let top = (bounds.top + bounds.bottom) / 2;
-    let utils = content.windowUtils;
-    utils.sendMouseEvent("mousedown", left, top, 0, 1, 0, false, 0, 0);
-    utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
-  });
-  await promise;
-
-  ok(notification, "Test 18g, Should have a click-to-play notification");
-  ok(!notification.dismissed, "Test 18g, notification should be open");
-
-  pluginInfo = await promiseForPluginInfo("test");
-  ok(!pluginInfo.activated, "Test 18g, Plugin should not be activated");
-});
-
-// Test that "always allow"-ing a plugin will not allow it when it becomes
-// blocklisted.
-add_task(async function() {
-  await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins.xml", gTestBrowser);
-
-  updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(notification, "Test 24a, Should have a click-to-play notification");
-
-  // Plugin should start as CTP
-  let pluginInfo = await promiseForPluginInfo("test");
-  is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY,
-     "Test 24a, plugin fallback type should be PLUGIN_CLICK_TO_PLAY");
-  ok(!pluginInfo.activated, "Test 24a, Plugin should not be active.");
-
-  // simulate "allow"
-  await promiseForNotificationShown(notification);
-
-  PopupNotifications.panel.firstElementChild.button.click();
-
-  pluginInfo = await promiseForPluginInfo("test");
-  ok(pluginInfo.activated, "Test 24a, Plugin should be active.");
-
-  await asyncSetAndUpdateBlocklist(gTestRoot + "blockPluginVulnerableUpdatable.xml", gTestBrowser);
-});
-
-// the plugin is now blocklisted, so it should not automatically load
-add_task(async function() {
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(notification, "Test 24b, Should have a click-to-play notification");
-
-  let pluginInfo = await promiseForPluginInfo("test");
-  is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_VULNERABLE_UPDATABLE,
-     "Test 24b, plugin fallback type should be PLUGIN_VULNERABLE_UPDATABLE");
-  ok(!pluginInfo.activated, "Test 24b, Plugin should not be active.");
-
-  // simulate "allow"
-  await promiseForNotificationShown(notification);
-
-  PopupNotifications.panel.firstElementChild.button.click();
-
-  pluginInfo = await promiseForPluginInfo("test");
-  ok(pluginInfo.activated, "Test 24b, Plugin should be active.");
-
-  clearAllPluginPermissions();
-
-  await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins.xml", gTestBrowser);
-});
-
-// Plugin sync removal test. Note this test produces a notification drop down since
-// the plugin we add has zero dims.
-add_task(async function() {
-  updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_syncRemoved.html");
-
-  // Maybe there some better trick here, we need to wait for the page load, then
-  // wait for the js to execute in the page.
-  await waitForMs(500);
-
-  let notification = PopupNotifications.getNotification("click-to-play-plugins");
-  ok(notification, "Test 25: There should be a plugin notification even if the plugin was immediately removed");
-  ok(notification.dismissed, "Test 25: The notification should be dismissed by default");
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, "data:text/html,<html>hi</html>");
-});
-
-// Tests a page with a blocked plugin in it and make sure the infoURL property
-// the blocklist file gets used.
-add_task(async function() {
-  clearAllPluginPermissions();
-
-  await asyncSetAndUpdateBlocklist(gTestRoot + "blockPluginInfoURL.xml", gTestBrowser);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let notification = PopupNotifications.getNotification("click-to-play-plugins");
-
-  // Since the plugin notification is dismissed by default, reshow it.
-  await promiseForNotificationShown(notification);
-
-  let pluginInfo = await promiseForPluginInfo("test");
-  is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_BLOCKLISTED,
-     "Test 26, plugin fallback type should be PLUGIN_BLOCKLISTED");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let plugin = content.document.getElementById("test");
-    let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    Assert.ok(!objLoadingContent.activated, "Plugin should not be activated.");
-  });
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_blocklist_content.js
+++ /dev/null
@@ -1,104 +0,0 @@
-/* import-globals-from ../head.js */
-
-var gTestBrowser = null;
-var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gChromeRoot = getRootDirectory(gTestPath);
-
-add_task(async function() {
-  registerCleanupFunction(async function() {
-    clearAllPluginPermissions();
-    Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins.xml", gTestBrowser);
-    resetBlocklist();
-    gBrowser.removeCurrentTab();
-    window.focus();
-    gTestBrowser = null;
-  });
-});
-
-add_task(async function() {
-  Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-
-  // Prime the blocklist service, the remote service doesn't launch on startup.
-  await promiseTabLoadEvent(gBrowser.selectedTab, "data:text/html,<html></html>");
-});
-
-add_task(async function() {
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins.xml", gTestBrowser);
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let test = content.document.getElementById("test");
-    Assert.ok(test.activated, "task 1a: test plugin should be activated!");
-  });
-});
-
-// Load a fresh page, load a new plugin blocklist, then load the same page again.
-add_task(async function() {
-  await promiseTabLoadEvent(gBrowser.selectedTab, "data:text/html,<html>GO!</html>");
-  await asyncSetAndUpdateBlocklist(gTestRoot + "blockPluginHard.xml", gTestBrowser);
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let test = content.document.getElementById("test");
-    ok(!test.activated, "task 2a: test plugin shouldn't activate!");
-  });
-});
-
-// Unload the block list and lets do this again, only this time lets
-// hack around in the content blocklist service maliciously.
-add_task(async function() {
-  await promiseTabLoadEvent(gBrowser.selectedTab, "data:text/html,<html>GO!</html>");
-
-  await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins.xml", gTestBrowser);
-
-  // Hack the planet! Load our blocklist shim, so we can mess with blocklist
-  // return results in the content process. Active until we close our tab.
-  let mm = gTestBrowser.messageManager;
-  info("test 3a: loading " + gChromeRoot + "blocklist_proxy.js\n");
-  mm.loadFrameScript(gChromeRoot + "blocklist_proxy.js", true);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let test = content.document.getElementById("test");
-    Assert.ok(test.activated, "task 3a: test plugin should be activated!");
-  });
-});
-
-// Load a fresh page, load a new plugin blocklist, then load the same page again.
-add_task(async function() {
-  await promiseTabLoadEvent(gBrowser.selectedTab, "data:text/html,<html>GO!</html>");
-  await asyncSetAndUpdateBlocklist(gTestRoot + "blockPluginHard.xml", gTestBrowser);
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let test = content.document.getElementById("test");
-    Assert.ok(!test.activated, "task 4a: test plugin shouldn't activate!");
-  });
-
-  await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins.xml", gTestBrowser);
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_bug743421.js
+++ /dev/null
@@ -1,118 +0,0 @@
-/* import-globals-from ../head.js */
-
-var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gTestBrowser = null;
-
-add_task(async function() {
-  registerCleanupFunction(async function() {
-    clearAllPluginPermissions();
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins.xml", gTestBrowser);
-    resetBlocklist();
-    gBrowser.removeCurrentTab();
-    window.focus();
-    gTestBrowser = null;
-  });
-});
-
-add_task(async function() {
-  let newTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.selectedTab = newTab;
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Second Test Plug-in");
-
-  // Prime the blocklist service, the remote service doesn't launch on startup.
-  await promiseTabLoadEvent(gBrowser.selectedTab, "data:text/html,<html></html>");
-
-  await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins.xml", gTestBrowser);
-});
-
-// Tests that navigation within the page and the window.history API doesn't break click-to-play state.
-add_task(async function() {
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_add_dynamically.html");
-
-  let notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(!notification, "Test 1a, Should not have a click-to-play notification");
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    new XPCNativeWrapper(XPCNativeWrapper.unwrap(content).addPlugin());
-  });
-
-  await promisePopupNotification("click-to-play-plugins");
-});
-
-add_task(async function() {
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let plugin = content.document.getElementsByTagName("embed")[0];
-    let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    Assert.ok(!objLoadingContent.activated, "Test 1b, Plugin should not be activated");
-  });
-
-  // Click the activate button on doorhanger to make sure it works
-  let notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-
-  await promiseForNotificationShown(notification);
-
-  PopupNotifications.panel.firstElementChild.button.click();
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let plugin = content.document.getElementsByTagName("embed")[0];
-    let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    Assert.ok(objLoadingContent.activated, "Test 1b, Plugin should be activated");
-  });
-});
-
-add_task(async function() {
-  let notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(notification, "Test 1c, Should still have a click-to-play notification");
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    new XPCNativeWrapper(XPCNativeWrapper.unwrap(content).addPlugin());
-    let plugin = content.document.getElementsByTagName("embed")[1];
-    let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    Assert.ok(objLoadingContent.activated,
-      "Test 1c, Newly inserted plugin in activated page should be activated");
-  });
-});
-
-add_task(async function() {
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let plugin = content.document.getElementsByTagName("embed")[1];
-    let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    Assert.ok(objLoadingContent.activated, "Test 1d, Plugin should be activated");
-
-    let promise = ContentTaskUtils.waitForEvent(content, "hashchange");
-    content.location += "#anchorNavigation";
-    await promise;
-  });
-});
-
-add_task(async function() {
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    new XPCNativeWrapper(XPCNativeWrapper.unwrap(content).addPlugin());
-    let plugin = content.document.getElementsByTagName("embed")[2];
-    let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    Assert.ok(objLoadingContent.activated, "Test 1e, Plugin should be activated");
-  });
-});
-
-add_task(async function() {
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let plugin = content.document.getElementsByTagName("embed")[2];
-    let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    Assert.ok(objLoadingContent.activated, "Test 1f, Plugin should be activated");
-
-    content.history.replaceState({}, "", "replacedState");
-    new XPCNativeWrapper(XPCNativeWrapper.unwrap(content).addPlugin());
-    plugin = content.document.getElementsByTagName("embed")[3];
-    objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    Assert.ok(objLoadingContent.activated, "Test 1g, Plugin should be activated");
-  });
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_bug744745.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/* import-globals-from ../head.js */
-
-var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gTestBrowser = null;
-var gNumPluginBindingsAttached = 0;
-
-function pluginBindingAttached() {
-  gNumPluginBindingsAttached++;
-  if (gNumPluginBindingsAttached != 1) {
-    ok(false, "if we've gotten here, something is quite wrong");
-  }
-}
-
-add_task(async function() {
-  registerCleanupFunction(function() {
-    gTestBrowser.removeEventListener("PluginBindingAttached", pluginBindingAttached, true, true);
-    clearAllPluginPermissions();
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    gBrowser.removeCurrentTab();
-    window.focus();
-    gTestBrowser = null;
-  });
-});
-
-add_task(async function() {
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-
-  BrowserTestUtils.addContentEventListener(gTestBrowser, "PluginBindingAttached", pluginBindingAttached, true, null, true);
-
-  let testRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-  await promiseTabLoadEvent(gBrowser.selectedTab, testRoot + "plugin_bug744745.html");
-
-  await promiseForCondition(function() { return gNumPluginBindingsAttached == 1; });
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let plugin = content.document.getElementById("test");
-    if (!plugin) {
-      Assert.ok(false, "plugin element not available.");
-      return;
-    }
-    // We can't use MochiKit's routine
-    let style = content.getComputedStyle(plugin);
-    Assert.ok(("opacity" in style) && style.opacity == 1, "plugin style properly configured.");
-  });
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_bug787619.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/* import-globals-from ../head.js */
-
-var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gTestBrowser = null;
-var gWrapperClickCount = 0;
-
-add_task(async function() {
-  registerCleanupFunction(function() {
-    clearAllPluginPermissions();
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    gBrowser.removeCurrentTab();
-    window.focus();
-    gTestBrowser = null;
-  });
-});
-
-add_task(async function() {
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-
-  let testRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-  await promiseTabLoadEvent(gBrowser.selectedTab, testRoot + "plugin_bug787619.html");
-
-  // Due to layout being async, "PluginBindAttached" may trigger later.
-  // This forces a layout flush, thus triggering it, and schedules the
-  // test so it is definitely executed afterwards.
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  // check plugin state
-  let pluginInfo = await promiseForPluginInfo("plugin");
-  ok(!pluginInfo.activated, "1a plugin should not be activated");
-
-  // click the overlay to prompt
-  let promise = promisePopupNotification("click-to-play-plugins");
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    let plugin = content.document.getElementById("plugin");
-    let bounds = plugin.getBoundingClientRect();
-    let left = (bounds.left + bounds.right) / 2;
-    let top = (bounds.top + bounds.bottom) / 2;
-    let utils = content.windowUtils;
-    utils.sendMouseEvent("mousedown", left, top, 0, 1, 0, false, 0, 0);
-    utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
-  });
-  await promise;
-
-  // check plugin state
-  pluginInfo = await promiseForPluginInfo("plugin");
-  ok(!pluginInfo.activated, "1b plugin should not be activated");
-
-  let condition = () => !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed &&
-    PopupNotifications.panel.firstElementChild;
-  await promiseForCondition(condition);
-  PopupNotifications.panel.firstElementChild.button.click();
-
-  // check plugin state
-  pluginInfo = await promiseForPluginInfo("plugin");
-  ok(pluginInfo.activated, "plugin should be activated");
-
-  is(gWrapperClickCount, 0, "wrapper should not have received any clicks");
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_bug797677.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/* import-globals-from ../head.js */
-
-var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gTestBrowser = null;
-var gConsoleErrors = 0;
-
-add_task(async function() {
-  registerCleanupFunction(function() {
-    clearAllPluginPermissions();
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    Services.console.unregisterListener(errorListener);
-    gBrowser.removeCurrentTab();
-    window.focus();
-    gTestBrowser = null;
-  });
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  let errorListener = {
-    observe(aMessage) {
-      if (aMessage.message.includes("NS_ERROR_FAILURE"))
-        gConsoleErrors++;
-    },
-  };
-  Services.console.registerListener(errorListener);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_bug797677.html");
-
-  let pluginInfo = await promiseForPluginInfo("plugin");
-  is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_UNSUPPORTED, "plugin should not have been found.");
-
-  // simple cpows
-  await ContentTask.spawn(gTestBrowser, null, function() {
-    let plugin = content.document.getElementById("plugin");
-    ok(plugin, "plugin should be in the page");
-  });
-  is(gConsoleErrors, 0, "should have no console errors");
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_bug812562.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/* import-globals-from ../head.js */
-
-var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gTestBrowser = null;
-
-add_task(async function() {
-  registerCleanupFunction(async function() {
-    clearAllPluginPermissions();
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins.xml", gTestBrowser);
-    resetBlocklist();
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    gBrowser.removeCurrentTab();
-    window.focus();
-    gTestBrowser = null;
-  });
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-
-  // Prime the blocklist service, the remote service doesn't launch on startup.
-  await promiseTabLoadEvent(gBrowser.selectedTab, "data:text/html,<html></html>");
-});
-
-// Tests that the going back will reshow the notification for click-to-play
-// blocklisted plugins
-add_task(async function() {
-  await asyncSetAndUpdateBlocklist(gTestRoot + "blockPluginVulnerableUpdatable.xml", gTestBrowser);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(popupNotification, "test part 1: Should have a click-to-play notification");
-
-  let pluginInfo = await promiseForPluginInfo("test");
-  is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_VULNERABLE_UPDATABLE, "plugin should be marked as VULNERABLE");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    Assert.ok(!!content.document.getElementById("test"),
-      "test part 1: plugin should not be activated");
-  });
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, "data:text/html,<html></html>");
-});
-
-add_task(async function() {
-  let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(!popupNotification, "test part 2: Should not have a click-to-play notification");
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    Assert.ok(!content.document.getElementById("test"),
-      "test part 2: plugin should not be activated");
-  });
-
-  let obsPromise = TestUtils.topicObserved("PopupNotifications-updateNotShowing");
-  let overlayPromise = promisePopupNotification("click-to-play-plugins");
-  gTestBrowser.goBack();
-  await obsPromise;
-  await overlayPromise;
-});
-
-add_task(async function() {
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(popupNotification, "test part 3: Should have a click-to-play notification");
-
-  let pluginInfo = await promiseForPluginInfo("test");
-  is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_VULNERABLE_UPDATABLE, "plugin should be marked as VULNERABLE");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    Assert.ok(!!content.document.getElementById("test"),
-      "test part 3: plugin should not be activated");
-  });
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_bug818118.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/* import-globals-from ../head.js */
-
-var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gTestBrowser = null;
-
-add_task(async function() {
-  registerCleanupFunction(function() {
-    clearAllPluginPermissions();
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    gBrowser.removeCurrentTab();
-    window.focus();
-    gTestBrowser = null;
-  });
-});
-
-add_task(async function() {
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_both.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(popupNotification, "should have a click-to-play notification");
-
-  let pluginInfo = await promiseForPluginInfo("test");
-  is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY, "plugin should be click to play");
-  ok(!pluginInfo.activated, "plugin should not be activated");
-
-  await ContentTask.spawn(gTestBrowser, null, () => {
-    let unknown = content.document.getElementById("unknown");
-    ok(unknown, "should have unknown plugin in page");
-  });
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_bug820497.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/* import-globals-from ../head.js */
-
-var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gTestBrowser = null;
-var gNumPluginBindingsAttached = 0;
-
-add_task(async function() {
-  registerCleanupFunction(function() {
-    clearAllPluginPermissions();
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    gBrowser.removeCurrentTab();
-    window.focus();
-    gTestBrowser = null;
-  });
-});
-
-add_task(async function() {
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Second Test Plug-in");
-
-  BrowserTestUtils.addContentEventListener(gTestBrowser, "PluginBindingAttached", function() { gNumPluginBindingsAttached++; }, true, null, true);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_bug820497.html");
-
-  await promiseForCondition(function() { return gNumPluginBindingsAttached == 1; });
-
-  await ContentTask.spawn(gTestBrowser, null, () => {
-    // Note we add the second plugin in the code farther down, so there's
-    // no way we got here with anything but one plugin loaded.
-    let doc = content.document;
-    let testplugin = doc.getElementById("test");
-    ok(testplugin, "should have test plugin");
-    let secondtestplugin = doc.getElementById("secondtest");
-    ok(!secondtestplugin, "should not yet have second test plugin");
-  });
-
-  await promisePopupNotification("click-to-play-plugins");
-  let notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(notification, "should have a click-to-play notification");
-
-  await promiseForNotificationShown(notification);
-
-  is(notification.options.pluginData.size, 1, "should be 1 type of plugin in the popup notification");
-
-  await ContentTask.spawn(gTestBrowser, {}, async function() {
-    XPCNativeWrapper.unwrap(content).addSecondPlugin();
-  });
-
-  await promiseForCondition(function() { return gNumPluginBindingsAttached == 2; });
-
-  await ContentTask.spawn(gTestBrowser, null, () => {
-    let doc = content.document;
-    let testplugin = doc.getElementById("test");
-    ok(testplugin, "should have test plugin");
-    let secondtestplugin = doc.getElementById("secondtest");
-    ok(secondtestplugin, "should have second test plugin");
-  });
-
-  notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-
-  ok(notification, "should have popup notification");
-
-  await promiseForNotificationShown(notification);
-
-  is(notification.options.pluginData.size, 2, "aited too long for 2 types of plugins in popup notification");
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_clearplugindata.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!--
-  Any copyright is dedicated to the Public Domain.
-  http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html>
-  <head>
-    <title>Plugin Clear Site Data sanitize test</title>
-
-    <embed id="plugin1" type="application/x-test" width="200" height="200"></embed>
-
-    <script type="application/javascript">
-      function testSteps() {
-        // Make sure clearing by timerange is supported.
-        var p = document.getElementById("plugin1");
-        p.setSitesWithDataCapabilities(true);
-
-        p.setSitesWithData(
-          "foo.com:0:5," +
-          "bar.com:0:100," +
-          "baz.com:1:5," +
-          "qux.com:1:100"
-        );
-      }
-    </script>
-  </head>
-
-  <body onload="testSteps();"></body>
-
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_clearplugindata.js
+++ /dev/null
@@ -1,113 +0,0 @@
-/* import-globals-from ../head.js */
-
-var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gPluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
-var gTestBrowser = null;
-
-// Test clearing plugin data using Sanitizer.jsm.
-const testURL1 = gTestRoot + "browser_clearplugindata.html";
-const testURL2 = gTestRoot + "browser_clearplugindata_noage.html";
-
-const {Sanitizer} = ChromeUtils.import("resource:///modules/Sanitizer.jsm", {});
-
-const pluginHostIface = Ci.nsIPluginHost;
-var pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
-pluginHost.QueryInterface(pluginHostIface);
-
-var pluginTag = getTestPlugin();
-
-function stored(needles) {
-  let something = pluginHost.siteHasData(this.pluginTag, null);
-  if (!needles)
-    return something;
-
-  if (!something)
-    return false;
-
-  for (let i = 0; i < needles.length; ++i) {
-    if (!pluginHost.siteHasData(this.pluginTag, needles[i]))
-      return false;
-  }
-  return true;
-}
-
-add_task(async function() {
-  registerCleanupFunction(function() {
-    clearAllPluginPermissions();
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    if (gTestBrowser) {
-      gBrowser.removeCurrentTab();
-    }
-    window.focus();
-    gTestBrowser = null;
-  });
-
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-});
-
-function setPrefs(cookies, pluginData) {
-  let itemPrefs = Services.prefs.getBranch("privacy.cpd.");
-  itemPrefs.setBoolPref("history", false);
-  itemPrefs.setBoolPref("downloads", false);
-  itemPrefs.setBoolPref("cache", false);
-  itemPrefs.setBoolPref("cookies", cookies);
-  itemPrefs.setBoolPref("formdata", false);
-  itemPrefs.setBoolPref("offlineApps", false);
-  itemPrefs.setBoolPref("passwords", false);
-  itemPrefs.setBoolPref("sessions", false);
-  itemPrefs.setBoolPref("siteSettings", false);
-  itemPrefs.setBoolPref("pluginData", pluginData);
-}
-
-async function testClearingData(url) {
-  // Load page to set data for the plugin.
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, url);
-
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  ok(stored(["foo.com", "bar.com", "baz.com", "qux.com"]),
-    "Data stored for sites");
-
-  // Clear 20 seconds ago.
-  // In the case of testURL2 the plugin will throw
-  // NS_ERROR_PLUGIN_TIME_RANGE_NOT_SUPPORTED, which should result in us
-  // clearing all data regardless of age.
-  let now_uSec = Date.now() * 1000;
-  let range = [now_uSec - 20 * 1000000, now_uSec];
-  await Sanitizer.sanitize(null, {range, ignoreTimespan: false});
-
-  if (url == testURL1) {
-    ok(stored(["bar.com", "qux.com"]), "Data stored for sites");
-    ok(!stored(["foo.com"]), "Data cleared for foo.com");
-    ok(!stored(["baz.com"]), "Data cleared for baz.com");
-
-    // Clear everything.
-    await Sanitizer.sanitize(null, {ignoreTimespan: false});
-  }
-
-  ok(!stored(null), "All data cleared");
-
-  gBrowser.removeCurrentTab();
-  gTestBrowser = null;
-}
-
-add_task(async function() {
-  // Test when sanitizing cookies.
-  await setPrefs(true, false);
-  await testClearingData(testURL1);
-  await testClearingData(testURL2);
-
-  // Test when sanitizing pluginData.
-  await setPrefs(false, true);
-  await testClearingData(testURL1);
-  await testClearingData(testURL2);
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_clearplugindata_noage.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!--
-  Any copyright is dedicated to the Public Domain.
-  http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html>
-  <head>
-    <title>Plugin Clear Site Data sanitize test without age</title>
-
-    <embed id="plugin1" type="application/x-test" width="200" height="200"></embed>
-
-    <script type="application/javascript">
-      function testSteps() {
-        // Make sure clearing by timerange is disabled.
-        var p = document.getElementById("plugin1");
-        p.setSitesWithDataCapabilities(false);
-
-        p.setSitesWithData(
-          "foo.com:0:5," +
-          "bar.com:0:100," +
-          "baz.com:1:5," +
-          "qux.com:1:100"
-        );
-      }
-    </script>
-  </head>
-
-  <body onload="testSteps();"></body>
-
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_enable_DRM_prompt.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Bug 1366167 - Tests that the "Enable DRM" prompt shows if EME is requested while EME is disabled.
- */
-
-const TEST_URL =
-  getRootDirectory(gTestPath).replace("chrome://mochitests/content",
-  "https://example.com") + "empty_file.html";
-
-add_task(async function() {
-  await BrowserTestUtils.withNewTab(TEST_URL, async function(browser) {
-    // Note: SpecialPowers.pushPrefEnv has problems with the "Enable DRM"
-    // button on the notification box toggling the prefs. So manually
-    // set/unset the prefs the UI we're testing toggles.
-    let emeWasEnabled = Services.prefs.getBoolPref("media.eme.enabled", false);
-    let cdmWasEnabled = Services.prefs.getBoolPref("media.gmp-widevinecdm.enabled", false);
-
-    // Restore the preferences to their pre-test state on test finish.
-    registerCleanupFunction(function() {
-        Services.prefs.setBoolPref("media.eme.enabled", emeWasEnabled);
-        Services.prefs.setBoolPref("media.gmp-widevinecdm.enabled", cdmWasEnabled);
-    });
-
-    // Turn off EME and Widevine CDM.
-    Services.prefs.setBoolPref("media.eme.enabled", false);
-    Services.prefs.setBoolPref("media.gmp-widevinecdm.enabled", false);
-
-    // Have content request access to Widevine, UI should drop down to
-    // prompt user to enable DRM.
-    let result = await ContentTask.spawn(browser, {}, async function() {
-      try {
-        let config = [{
-          initDataTypes: ["webm"],
-          videoCapabilities: [{contentType: 'video/webm; codecs="vp9"'}],
-        }];
-        await content.navigator.requestMediaKeySystemAccess("com.widevine.alpha", config);
-      } catch (ex) {
-        return {rejected: true};
-      }
-      return {rejected: false};
-    });
-    is(result.rejected, true, "EME request should be denied because EME disabled.");
-
-    // Verify the UI prompt showed.
-    let box = gBrowser.getNotificationBox(browser);
-    let notification = box.currentNotification;
-
-    ok(notification, "Notification should be visible");
-    is(notification.getAttribute("value"), "drmContentDisabled",
-       "Should be showing the right notification");
-
-    // Verify the "Enable DRM" button is there.
-    let buttons = notification.querySelectorAll(".notification-button");
-    is(buttons.length, 1, "Should have one button.");
-
-    // Prepare a Promise that should resolve when the "Enable DRM" button's
-    // page reload completes.
-    let refreshPromise = BrowserTestUtils.browserLoaded(browser);
-    buttons[0].click();
-
-    // Wait for the reload to complete.
-    await refreshPromise;
-
-    // Verify clicking the "Enable DRM" button enabled DRM.
-    let enabled = Services.prefs.getBoolPref("media.eme.enabled", true);
-    is(enabled, true, "EME should be enabled after click on 'Enable DRM' button");
-  });
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_globalplugin_crashinfobar.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/* import-globals-from ../head.js */
-
-/**
- * Test that the notification bar for crashed GMPs works.
- */
-add_task(async function() {
-  await BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: "about:blank",
-  }, async function(browser) {
-    await ContentTask.spawn(browser, null, async function() {
-      const GMP_CRASH_EVENT = {
-        pluginID: 1,
-        pluginName: "GlobalTestPlugin",
-        submittedCrashReport: false,
-        bubbles: true,
-        cancelable: true,
-        gmpPlugin: true,
-      };
-
-      let crashEvent = new content.PluginCrashedEvent("PluginCrashed",
-                                                      GMP_CRASH_EVENT);
-      content.dispatchEvent(crashEvent);
-    });
-
-    let notification = await waitForNotificationBar("plugin-crashed", browser);
-
-    let notificationBox = gBrowser.getNotificationBox(browser);
-    ok(notification, "Infobar was shown.");
-    is(notification.priority, notificationBox.PRIORITY_WARNING_MEDIUM,
-       "Correct priority.");
-    is(notification.messageText.textContent,
-       "The GlobalTestPlugin plugin has crashed.",
-       "Correct message.");
-  });
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_iterate_hidden_plugins.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/* import-globals-from ../head.js */
-
-"use strict";
-
-const TEST_PLUGIN_NAME = "Test Plug-in";
-const HIDDEN_CTP_PLUGIN_PREF = "plugins.navigator.hidden_ctp_plugin";
-
-/**
- * If a plugin is click-to-play and named in HIDDEN_CTP_PLUGIN_PREF,
- * then the plugin should be hidden in the navigator.plugins list by default
- * when iterating.
- */
-
-add_task(async function setup() {
-  // We'll make the Test Plugin click-to-play.
-  let originalPluginState = getTestPluginEnabledState();
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
-  registerCleanupFunction(() => {
-    setTestPluginEnabledState(originalPluginState);
-  });
-
-  // And then make the plugin hidden.
-  await SpecialPowers.pushPrefEnv({
-    set: [
-      [HIDDEN_CTP_PLUGIN_PREF, TEST_PLUGIN_NAME],
-      ["plugins.show_infobar", true],
-    ],
-  });
-});
-
-/**
- * Tests that if a plugin is click-to-play and in the
- * HIDDEN_CTP_PLUGIN_PREF list, then it shouldn't be visible
- * when iterating navigator.plugins.
- */
-add_task(async function test_plugin_is_hidden_on_iteration() {
-  // The plugin should not be visible when we iterate
-  // navigator.plugins.
-  await BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: "http://example.com",
-  }, async function(browser) {
-    await ContentTask.spawn(browser, TEST_PLUGIN_NAME, async function(pluginName) {
-      let plugins = Array.from(content.navigator.plugins);
-      Assert.ok(plugins.every(p => p.name != pluginName),
-                "Should not find Test Plugin");
-    });
-  });
-
-  // Now clear the HIDDEN_CTP_PLUGIN_PREF temporarily and
-  // make sure we can see the plugin again.
-  await SpecialPowers.pushPrefEnv({
-    set: [[HIDDEN_CTP_PLUGIN_PREF, ""]],
-  });
-
-  // Note that I have to do this in a new tab since navigator
-  // caches navigator.plugins after an initial read.
-  await BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: "http://example.com",
-  }, async function(browser) {
-    await ContentTask.spawn(browser, TEST_PLUGIN_NAME, async function(pluginName) {
-      let plugins = Array.from(content.navigator.plugins);
-      Assert.ok(plugins.some(p => p.name == pluginName),
-                "Should have found the Test Plugin");
-    });
-  });
-
-  await SpecialPowers.popPrefEnv();
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_pluginCrashCommentAndURL.js
+++ /dev/null
@@ -1,249 +0,0 @@
-/* import-globals-from ../head.js */
-
-/* global gBrowser */
-ChromeUtils.import("resource://gre/modules/CrashSubmit.jsm", this);
-
-const SERVER_URL = "http://example.com/browser/toolkit/crashreporter/test/browser/crashreport.sjs";
-
-var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gTestBrowser = null;
-var config = {};
-
-add_task(async function() {
-  // The test harness sets MOZ_CRASHREPORTER_NO_REPORT, which disables plugin
-  // crash reports.  This test needs them enabled.  The test also needs a mock
-  // report server, and fortunately one is already set up by toolkit/
-  // crashreporter/test/Makefile.in.  Assign its URL to MOZ_CRASHREPORTER_URL,
-  // which CrashSubmit.jsm uses as a server override.
-  let env = Cc["@mozilla.org/process/environment;1"]
-              .getService(Ci.nsIEnvironment);
-  let noReport = env.get("MOZ_CRASHREPORTER_NO_REPORT");
-  let serverUrl = env.get("MOZ_CRASHREPORTER_URL");
-  env.set("MOZ_CRASHREPORTER_NO_REPORT", "");
-  env.set("MOZ_CRASHREPORTER_URL", SERVER_URL);
-
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  // Crash immediately
-  Services.prefs.setIntPref("dom.ipc.plugins.timeoutSecs", 0);
-
-  registerCleanupFunction(async function() {
-    Services.prefs.clearUserPref("dom.ipc.plugins.timeoutSecs");
-    env.set("MOZ_CRASHREPORTER_NO_REPORT", noReport);
-    env.set("MOZ_CRASHREPORTER_URL", serverUrl);
-    env = null;
-    config = null;
-    gTestBrowser = null;
-    gBrowser.removeCurrentTab();
-    window.focus();
-  });
-});
-
-add_task(async function() {
-  config = {
-    shouldSubmissionUIBeVisible: true,
-    comment: "",
-    urlOptIn: false,
-  };
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED);
-
-  let pluginCrashed = promisePluginCrashed();
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_crashCommentAndURL.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  // Wait for the plugin to crash
-  await pluginCrashed;
-
-  let crashReportStatus = TestUtils.topicObserved("crash-report-status", onSubmitStatus);
-
-  // Test that the crash submission UI is actually visible and submit the crash report.
-  await ContentTask.spawn(gTestBrowser, config, async function(aConfig) {
-    let doc = content.document;
-    let plugin = doc.getElementById("plugin");
-    let pleaseSubmit = doc.getAnonymousElementByAttribute(plugin, "anonid", "pleaseSubmit");
-    let submitButton = doc.getAnonymousElementByAttribute(plugin, "anonid", "submitButton");
-    // Test that we don't send the URL when urlOptIn is false.
-    doc.getAnonymousElementByAttribute(plugin, "anonid", "submitURLOptIn").checked = aConfig.urlOptIn;
-    submitButton.click();
-    Assert.equal(content.getComputedStyle(pleaseSubmit).display == "block",
-      aConfig.shouldSubmissionUIBeVisible, "The crash UI should be visible");
-  });
-
-  await crashReportStatus;
-});
-
-add_task(async function() {
-  config = {
-    shouldSubmissionUIBeVisible: true,
-    comment: "a test comment",
-    urlOptIn: true,
-  };
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED);
-
-  let pluginCrashed = promisePluginCrashed();
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_crashCommentAndURL.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  // Wait for the plugin to crash
-  await pluginCrashed;
-
-  let crashReportStatus = TestUtils.topicObserved("crash-report-status", onSubmitStatus);
-
-  // Test that the crash submission UI is actually visible and submit the crash report.
-  await ContentTask.spawn(gTestBrowser, config, async function(aConfig) {
-    let doc = content.document;
-    let plugin = doc.getElementById("plugin");
-    let pleaseSubmit = doc.getAnonymousElementByAttribute(plugin, "anonid", "pleaseSubmit");
-    let submitButton = doc.getAnonymousElementByAttribute(plugin, "anonid", "submitButton");
-    // Test that we send the URL when urlOptIn is true.
-    doc.getAnonymousElementByAttribute(plugin, "anonid", "submitURLOptIn").checked = aConfig.urlOptIn;
-    doc.getAnonymousElementByAttribute(plugin, "anonid", "submitComment").value = aConfig.comment;
-    submitButton.click();
-    Assert.equal(content.getComputedStyle(pleaseSubmit).display == "block",
-      aConfig.shouldSubmissionUIBeVisible, "The crash UI should be visible");
-  });
-
-  await crashReportStatus;
-});
-
-add_task(async function() {
-  config = {
-    shouldSubmissionUIBeVisible: false,
-    comment: "",
-    urlOptIn: true,
-  };
-
-  // Deferred promise object used by the test to wait for the crash handler
-  let crashDeferred = PromiseUtils.defer();
-
-  // Clear out any minidumps we create from plugin crashes, this is needed
-  // because we do not submit the crash otherwise the submission process would
-  // have deleted the crash dump files for us.
-  let crashObserver = (subject, topic, data) => {
-    if (topic != "plugin-crashed") {
-      return;
-    }
-
-    let propBag = subject.QueryInterface(Ci.nsIPropertyBag2);
-    let minidumpID = propBag.getPropertyAsAString("pluginDumpID");
-
-    Services.crashmanager.ensureCrashIsPresent(minidumpID).then(() => {
-      let minidumpDir = Services.dirsvc.get("UAppData", Ci.nsIFile);
-      minidumpDir.append("Crash Reports");
-      minidumpDir.append("pending");
-
-      let pluginDumpFile = minidumpDir.clone();
-      pluginDumpFile.append(minidumpID + ".dmp");
-
-      let extraFile = minidumpDir.clone();
-      extraFile.append(minidumpID + ".extra");
-
-      pluginDumpFile.remove(false);
-      extraFile.remove(false);
-      crashDeferred.resolve();
-    });
-  };
-
-  Services.obs.addObserver(crashObserver, "plugin-crashed");
-
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED);
-
-  let pluginCrashed = promisePluginCrashed();
-
-  // Make sure that the plugin container is too small to display the crash submission UI
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_crashCommentAndURL.html?" +
-                            encodeURIComponent(JSON.stringify({width: 300, height: 300})));
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  // Wait for the plugin to crash
-  await pluginCrashed;
-
-  // Test that the crash submission UI is not visible and do not submit a crash report.
-  await ContentTask.spawn(gTestBrowser, config, async function(aConfig) {
-    let doc = content.document;
-    let plugin = doc.getElementById("plugin");
-    let pleaseSubmit = doc.getAnonymousElementByAttribute(plugin, "anonid", "pleaseSubmit");
-    Assert.equal(!!pleaseSubmit && content.getComputedStyle(pleaseSubmit).display == "block",
-      aConfig.shouldSubmissionUIBeVisible, "Plugin crash UI should not be visible");
-  });
-
-  await crashDeferred.promise;
-  Services.obs.removeObserver(crashObserver, "plugin-crashed");
-});
-
-function promisePluginCrashed() {
-  return new ContentTask.spawn(gTestBrowser, {}, async function() {
-    await new Promise((resolve) => {
-      addEventListener("PluginCrashReporterDisplayed", function onPluginCrashed() {
-        removeEventListener("PluginCrashReporterDisplayed", onPluginCrashed);
-        resolve();
-      });
-    });
-  });
-}
-
-function onSubmitStatus(aSubject, aData) {
-  if (aData === "submitting") {
-    return false;
-  }
-
-  is(aData, "success", "The crash report should be submitted successfully");
-
-  let propBag = aSubject.QueryInterface(Ci.nsIPropertyBag);
-  if (aData == "success") {
-    let remoteID = getPropertyBagValue(propBag, "serverCrashID");
-    ok(!!remoteID, "serverCrashID should be set");
-
-    // Remove the submitted report file.
-    let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
-    file.initWithPath(Services.crashmanager._submittedDumpsDir);
-    file.append(remoteID + ".txt");
-    ok(file.exists(), "Submitted report file should exist");
-    file.remove(false);
-  }
-
-  let extra = getPropertyBagValue(propBag, "extra");
-  ok(extra instanceof Ci.nsIPropertyBag, "Extra data should be property bag");
-
-  let val = getPropertyBagValue(extra, "PluginUserComment");
-  if (config.comment) {
-    is(val, config.comment,
-       "Comment in extra data should match comment in textbox");
-  } else {
-    ok(val === undefined,
-       "Comment should be absent from extra data when textbox is empty");
-  }
-
-  val = getPropertyBagValue(extra, "PluginContentURL");
-  if (config.urlOptIn) {
-    is(val, gBrowser.currentURI.spec,
-       "URL in extra data should match browser URL when opt-in checked");
-  } else {
-    ok(val === undefined,
-       "URL should be absent from extra data when opt-in not checked");
-  }
-
-  return true;
-}
-
-function getPropertyBagValue(bag, key) {
-  try {
-    var val = bag.getProperty(key);
-  } catch (e) {
-    if (e.result != Cr.NS_ERROR_FAILURE) {
-      throw e;
-    }
-  }
-  return val;
-}
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_pluginCrashReportNonDeterminism.js
+++ /dev/null
@@ -1,270 +0,0 @@
-/* import-globals-from ../head.js */
-
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
-
-/**
- * With e10s, plugins must run in their own process. This means we have
- * three processes at a minimum when we're running a plugin:
- *
- * 1) The main browser, or "chrome" process
- * 2) The content process hosting the plugin instance
- * 3) The plugin process
- *
- * If the plugin process crashes, we cannot be sure if the chrome process
- * will hear about it first, or the content process will hear about it
- * first. Because of how IPC works, that's really up to the operating system,
- * and we assume any guarantees about it, so we have to account for both
- * possibilities.
- *
- * This test exercises the browser's reaction to both possibilities.
- */
-
-const CRASH_URL = "http://example.com/browser/browser/base/content/test/plugins/plugin_crashCommentAndURL.html";
-const CRASHED_MESSAGE = "BrowserPlugins:NPAPIPluginProcessCrashed";
-
-/**
- * In order for our test to work, we need to be able to put a plugin
- * in a very specific state. Specifically, we need it to match the
- * :-moz-handler-crashed pseudoselector. The only way I can find to
- * do that is by actually crashing the plugin. So we wait for the
- * plugin to crash and show the "please" state (since that will
- * only show if both the message from the parent has been received
- * AND the PluginCrashed event has fired).
- *
- * Once in that state, we try to rewind the clock a little bit - we clear
- * out the crashData cache in the PluginContent with a message, and we also
- * override the pluginFallbackState of the <object> to fool PluginContent
- * into believing that the plugin is in a particular state.
- *
- * @param browser
- *        The browser that has loaded the CRASH_URL that we need to
- *        prepare to be in the special state.
- * @param pluginFallbackState
- *        The value we should override the <object>'s pluginFallbackState
- *        with.
- * @return Promise
- *        The Promise resolves when the plugin has officially been put into
- *        the crash reporter state, and then "rewound" to have the "status"
- *        attribute of the statusDiv removed. The resolved Promise returns
- *        the run ID for the crashed plugin. It rejects if we never get into
- *        the crash reporter state.
- */
-function preparePlugin(browser, pluginFallbackState) {
-  return ContentTask.spawn(browser, pluginFallbackState, async function(contentPluginFallbackState) {
-    let plugin = content.document.getElementById("plugin");
-    plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    // CRASH_URL will load a plugin that crashes immediately. We
-    // wait until the plugin has finished being put into the crash
-    // state.
-    let statusDiv;
-    await ContentTaskUtils.waitForCondition(() => {
-      statusDiv = plugin.ownerDocument
-                        .getAnonymousElementByAttribute(plugin, "anonid",
-                                                        "submitStatus");
-      return statusDiv && statusDiv.getAttribute("status") == "please";
-    }, "Timed out waiting for plugin to be in crash report state");
-
-    // "Rewind", by wiping out the status attribute...
-    statusDiv.removeAttribute("status");
-    // Somehow, I'm able to get away with overriding the getter for
-    // this XPCOM object. Probably because I've got chrome privledges.
-    Object.defineProperty(plugin, "pluginFallbackType", {
-      get() {
-        return contentPluginFallbackState;
-      },
-    });
-    return plugin.runID;
-  }).then((runID) => {
-    browser.messageManager.sendAsyncMessage("BrowserPlugins:Test:ClearCrashData");
-    return runID;
-  });
-}
-
-// Bypass click-to-play
-setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED);
-
-// Deferred promise object used by the test to wait for the crash handler
-let crashDeferred = null;
-
-// Clear out any minidumps we create from plugins - we really don't care
-// about them.
-let crashObserver = (subject, topic, data) => {
-  if (topic != "plugin-crashed") {
-    return;
-  }
-
-  let propBag = subject.QueryInterface(Ci.nsIPropertyBag2);
-  let minidumpID = propBag.getPropertyAsAString("pluginDumpID");
-
-  Services.crashmanager.ensureCrashIsPresent(minidumpID).then(() => {
-    let minidumpDir = Services.dirsvc.get("ProfD", Ci.nsIFile);
-    minidumpDir.append("minidumps");
-
-    let pluginDumpFile = minidumpDir.clone();
-    pluginDumpFile.append(minidumpID + ".dmp");
-
-    let extraFile = minidumpDir.clone();
-    extraFile.append(minidumpID + ".extra");
-
-    ok(pluginDumpFile.exists(), "Found minidump");
-    ok(extraFile.exists(), "Found extra file");
-
-    pluginDumpFile.remove(false);
-    extraFile.remove(false);
-    crashDeferred.resolve();
-  });
-};
-
-Services.obs.addObserver(crashObserver, "plugin-crashed");
-// plugins.testmode will make BrowserPlugins:Test:ClearCrashData work.
-Services.prefs.setBoolPref("plugins.testmode", true);
-registerCleanupFunction(() => {
-  Services.prefs.clearUserPref("plugins.testmode");
-  Services.obs.removeObserver(crashObserver, "plugin-crashed");
-});
-
-/**
- * In this case, the chrome process hears about the crash first.
- */
-add_task(async function testChromeHearsPluginCrashFirst() {
-  // Setup the crash observer promise
-  crashDeferred = PromiseUtils.defer();
-
-  // Open a remote window so that we can run this test even if e10s is not
-  // enabled by default.
-  let win = await BrowserTestUtils.openNewBrowserWindow({remote: true});
-  let browser = win.gBrowser.selectedBrowser;
-
-  BrowserTestUtils.loadURI(browser, CRASH_URL);
-  await BrowserTestUtils.browserLoaded(browser);
-
-  // In this case, we want the <object> to match the -moz-handler-crashed
-  // pseudoselector, but we want it to seem still active, because the
-  // content process is not yet supposed to know that the plugin has
-  // crashed.
-  let runID = await preparePlugin(browser,
-                                  Ci.nsIObjectLoadingContent.PLUGIN_ACTIVE);
-
-  // Send the message down to PluginContent.jsm saying that the plugin has
-  // crashed, and that we have a crash report.
-  let mm = browser.messageManager;
-  mm.sendAsyncMessage(CRASHED_MESSAGE,
-                      { pluginName: "", runID, state: "please" });
-
-  await ContentTask.spawn(browser, null, async function() {
-    // At this point, the content process should have heard the
-    // plugin crash message from the parent, and we are OK to emit
-    // the PluginCrashed event.
-    let plugin = content.document.getElementById("plugin");
-    plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    let statusDiv = plugin.ownerDocument
-                          .getAnonymousElementByAttribute(plugin, "anonid",
-                                                          "submitStatus");
-
-    if (statusDiv.getAttribute("status") == "please") {
-      Assert.ok(false, "Did not expect plugin to be in crash report mode yet.");
-      return;
-    }
-
-    // Now we need the plugin to seem crashed to PluginContent.jsm, without
-    // actually crashing the plugin again. We hack around this by overriding
-    // the pluginFallbackType again.
-    Object.defineProperty(plugin, "pluginFallbackType", {
-      get() {
-        return Ci.nsIObjectLoadingContent.PLUGIN_CRASHED;
-      },
-    });
-
-    let event = new content.PluginCrashedEvent("PluginCrashed", {
-      pluginName: "",
-      pluginDumpID: "",
-      browserDumpID: "",
-      submittedCrashReport: false,
-      bubbles: true,
-      cancelable: true,
-    });
-
-    plugin.dispatchEvent(event);
-    Assert.equal(statusDiv.getAttribute("status"), "please",
-      "Should have been showing crash report UI");
-  });
-  await BrowserTestUtils.closeWindow(win);
-  await crashDeferred.promise;
-});
-
-/**
- * In this case, the content process hears about the crash first.
- */
-add_task(async function testContentHearsCrashFirst() {
-  // Setup the crash observer promise
-  crashDeferred = PromiseUtils.defer();
-
-  // Open a remote window so that we can run this test even if e10s is not
-  // enabled by default.
-  let win = await BrowserTestUtils.openNewBrowserWindow({remote: true});
-  let browser = win.gBrowser.selectedBrowser;
-
-  BrowserTestUtils.loadURI(browser, CRASH_URL);
-  await BrowserTestUtils.browserLoaded(browser);
-
-  // In this case, we want the <object> to match the -moz-handler-crashed
-  // pseudoselector, and we want the plugin to seem crashed, since the
-  // content process in this case has heard about the crash first.
-  let runID = await preparePlugin(browser,
-                                  Ci.nsIObjectLoadingContent.PLUGIN_CRASHED);
-
-  await ContentTask.spawn(browser, null, async function() {
-    // At this point, the content process has not yet heard from the
-    // parent about the crash report. Let's ensure that by making sure
-    // we're not showing the plugin crash report UI.
-    let plugin = content.document.getElementById("plugin");
-    plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    let statusDiv = plugin.ownerDocument
-                          .getAnonymousElementByAttribute(plugin, "anonid",
-                                                          "submitStatus");
-
-    if (statusDiv.getAttribute("status") == "please") {
-      Assert.ok(false, "Did not expect plugin to be in crash report mode yet.");
-    }
-
-    let event = new content.PluginCrashedEvent("PluginCrashed", {
-      pluginName: "",
-      pluginDumpID: "",
-      browserDumpID: "",
-      submittedCrashReport: false,
-      bubbles: true,
-      cancelable: true,
-    });
-
-    plugin.dispatchEvent(event);
-
-    Assert.notEqual(statusDiv.getAttribute("status"), "please",
-      "Should not yet be showing crash report UI");
-  });
-
-  // Now send the message down to PluginContent.jsm that the plugin has
-  // crashed...
-  let mm = browser.messageManager;
-  mm.sendAsyncMessage(CRASHED_MESSAGE,
-                      { pluginName: "", runID, state: "please"});
-
-  await ContentTask.spawn(browser, null, async function() {
-    // At this point, the content process will have heard the message
-    // from the parent and reacted to it. We should be showing the plugin
-    // crash report UI now.
-    let plugin = content.document.getElementById("plugin");
-    plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    let statusDiv = plugin.ownerDocument
-                          .getAnonymousElementByAttribute(plugin, "anonid",
-                                                          "submitStatus");
-
-    Assert.equal(statusDiv.getAttribute("status"), "please",
-      "Should have been showing crash report UI");
-  });
-
-  await BrowserTestUtils.closeWindow(win);
-  await crashDeferred.promise;
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_plugin_reloading.js
+++ /dev/null
@@ -1,86 +0,0 @@
-/* import-globals-from ../head.js */
-
-var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gPluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
-var gTestBrowser = null;
-
-function updateAllTestPlugins(aState) {
-  setTestPluginEnabledState(aState, "Test Plug-in");
-  setTestPluginEnabledState(aState, "Second Test Plug-in");
-}
-
-add_task(async function() {
-  registerCleanupFunction(async function() {
-    clearAllPluginPermissions();
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins.xml", gTestBrowser);
-    resetBlocklist();
-    gTestBrowser = null;
-    gBrowser.removeCurrentTab();
-    window.focus();
-  });
-});
-
-add_task(async function() {
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-
-  updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
-
-  // Prime the blocklist service, the remote service doesn't launch on startup.
-  await promiseTabLoadEvent(gBrowser.selectedTab, "data:text/html,<html></html>");
-
-  await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins.xml", gTestBrowser);
-});
-
-// Tests that a click-to-play plugin retains its activated state upon reloading
-add_task(async function() {
-  clearAllPluginPermissions();
-
-  updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(notification, "Test 1, Should have a click-to-play notification");
-
-  let pluginInfo = await promiseForPluginInfo("test");
-  is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY,
-     "Test 2, plugin fallback type should be PLUGIN_CLICK_TO_PLAY");
-
-  // run the plugin
-  await promisePlayObject("test");
-
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  pluginInfo = await promiseForPluginInfo("test");
-  is(pluginInfo.displayedType, Ci.nsIObjectLoadingContent.TYPE_PLUGIN, "Test 3, plugin should have started");
-  ok(pluginInfo.activated, "Test 4, plugin node should not be activated");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let plugin = content.document.getElementById("test");
-    let npobj1 = Cu.waiveXrays(plugin).getObjectValue();
-    // eslint-disable-next-line no-self-assign
-    plugin.src = plugin.src;
-    let pluginsDiffer = false;
-    try {
-      Cu.waiveXrays(plugin).checkObjectValue(npobj1);
-    } catch (e) {
-      pluginsDiffer = true;
-    }
-
-     Assert.ok(pluginsDiffer, "Test 5, plugins differ.");
-  });
-
-  pluginInfo = await promiseForPluginInfo("test");
-  ok(pluginInfo.activated, "Test 6, Plugin should have retained activated state.");
-  is(pluginInfo.displayedType, Ci.nsIObjectLoadingContent.TYPE_PLUGIN, "Test 7, plugin should have started");
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_pluginnotification.js
+++ /dev/null
@@ -1,480 +0,0 @@
-/* import-globals-from ../head.js */
-
-var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-var gPluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
-var gTestBrowser = null;
-
-function updateAllTestPlugins(aState) {
-  setTestPluginEnabledState(aState, "Test Plug-in");
-  setTestPluginEnabledState(aState, "Second Test Plug-in");
-}
-
-add_task(async function() {
-  registerCleanupFunction(async function() {
-    clearAllPluginPermissions();
-    Services.prefs.clearUserPref("plugins.click_to_play");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
-    setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
-    await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins.xml", gTestBrowser);
-    resetBlocklist();
-    gTestBrowser = null;
-    gBrowser.removeCurrentTab();
-    window.focus();
-  });
-});
-
-add_task(async function() {
-  gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gTestBrowser = gBrowser.selectedBrowser;
-
-  Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-
-  updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
-
-  // Prime the blocklist service, the remote service doesn't launch on startup.
-  await promiseTabLoadEvent(gBrowser.selectedTab, "data:text/html,<html></html>");
-
-  await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins.xml", gTestBrowser);
-});
-
-// Tests a page with an unknown plugin in it.
-add_task(async function() {
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_unknown.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let pluginInfo = await promiseForPluginInfo("unknown");
-  is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_UNSUPPORTED,
-     "Test 1a, plugin fallback type should be PLUGIN_UNSUPPORTED");
-});
-
-// Test that the doorhanger is shown when the user clicks on the overlay
-// after having previously blocked the plugin.
-add_task(async function() {
-  updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  await promisePopupNotification("click-to-play-plugins");
-
-  let pluginInfo = await promiseForPluginInfo("test");
-  ok(!pluginInfo.activated, "Plugin should not be activated");
-
-  // Simulate clicking the "Allow" button.
-  let notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-
-  await promiseForNotificationShown(notification);
-
-  PopupNotifications.panel.firstElementChild.button.click();
-
-  pluginInfo = await promiseForPluginInfo("test");
-  ok(pluginInfo.activated, "Plugin should be activated");
-
-  // Simulate clicking the "Block" button.
-  await promiseForNotificationShown(notification);
-
-  PopupNotifications.panel.firstElementChild.secondaryButton.click();
-
-  pluginInfo = await promiseForPluginInfo("test");
-  ok(!pluginInfo.activated, "Plugin should not be activated");
-
-  let browserLoaded = BrowserTestUtils.browserLoaded(gTestBrowser);
-  gTestBrowser.reload();
-  await browserLoaded;
-  notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-
-  // Simulate clicking the overlay
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let bounds = doc.getAnonymousElementByAttribute(plugin, "anonid", "main").getBoundingClientRect();
-    let left = (bounds.left + bounds.right) / 2;
-    let top = (bounds.top + bounds.bottom) / 2;
-    let utils = content.windowUtils;
-    utils.sendMouseEvent("mousedown", left, top, 0, 1, 0, false, 0, 0);
-    utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
-  });
-
-  ok(!notification.dismissed, "A plugin notification should be shown.");
-
-  clearAllPluginPermissions();
-});
-
-// Tests that going back will reshow the notification for click-to-play plugins
-add_task(async function() {
-  updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  await promisePopupNotification("click-to-play-plugins");
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, "data:text/html,<html>hi</html>");
-
-  // make sure the notification is gone
-  let notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(!notification, "Test 11b, Should not have a click-to-play notification");
-
-  gTestBrowser.webNavigation.goBack();
-
-  await promisePopupNotification("click-to-play-plugins");
-});
-
-// Tests that the "Allow Always" permission works for click-to-play plugins
-add_task(async function() {
-  updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  await promisePopupNotification("click-to-play-plugins");
-
-  let pluginInfo = await promiseForPluginInfo("test");
-  ok(!pluginInfo.activated, "Test 12a, Plugin should not be activated");
-
-  // Simulate clicking the "Allow" button.
-  let notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-
-  await promiseForNotificationShown(notification);
-
-  PopupNotifications.panel.firstElementChild.button.click();
-
-  pluginInfo = await promiseForPluginInfo("test");
-  ok(pluginInfo.activated, "Test 12a, Plugin should be activated");
-});
-
-// Test that the "Always" permission, when set for just the Test plugin,
-// does not also allow the Second Test plugin.
-add_task(async function() {
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_two_types.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  await promisePopupNotification("click-to-play-plugins");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let test = content.document.getElementById("test");
-    let secondtestA = content.document.getElementById("secondtestA");
-    let secondtestB = content.document.getElementById("secondtestB");
-    Assert.ok(test.activated && !secondtestA.activated && !secondtestB.activated,
-      "Content plugins are set up");
-  });
-
-  clearAllPluginPermissions();
-});
-
-// Tests that the plugin's "activated" property is true for working plugins
-// with click-to-play disabled.
-add_task(async function() {
-  updateAllTestPlugins(Ci.nsIPluginTag.STATE_ENABLED);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test2.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let pluginInfo = await promiseForPluginInfo("test1");
-  ok(pluginInfo.activated, "Test 14, Plugin should be activated");
-});
-
-// Tests that the overlay is shown instead of alternate content when
-// plugins are click to play.
-add_task(async function() {
-  updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_alternate_content.html");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let mainBox = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    Assert.ok(!!mainBox, "Test 15, Plugin overlay should exist");
-  });
-});
-
-// Tests that mContentType is used for click-to-play plugins, and not the
-// inspected type.
-add_task(async function() {
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_bug749455.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(notification, "Test 17, Should have a click-to-play notification");
-});
-
-// Tests that clicking the icon of the overlay activates the doorhanger
-add_task(async function() {
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  await asyncSetAndUpdateBlocklist(gTestRoot + "blockNoPlugins.xml", gTestBrowser);
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let pluginInfo = await promiseForPluginInfo("test");
-  ok(!pluginInfo.activated, "Test 18g, Plugin should not be activated");
-
-  ok(PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed,
-     "Test 19a, Doorhanger should start out dismissed");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let icon = doc.getAnonymousElementByAttribute(plugin, "class", "icon");
-    let bounds = icon.getBoundingClientRect();
-    let left = (bounds.left + bounds.right) / 2;
-    let top = (bounds.top + bounds.bottom) / 2;
-    let utils = content.windowUtils;
-    utils.sendMouseEvent("mousedown", left, top, 0, 1, 0, false, 0, 0);
-    utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
-  });
-
-  let condition = () => !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed;
-  await promiseForCondition(condition);
-});
-
-// Tests that clicking the text of the overlay activates the plugin
-add_task(async function() {
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let pluginInfo = await promiseForPluginInfo("test");
-  ok(!pluginInfo.activated, "Test 18g, Plugin should not be activated");
-
-  ok(PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed,
-     "Test 19c, Doorhanger should start out dismissed");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let text = doc.getAnonymousElementByAttribute(plugin, "class", "msg msgClickToPlay");
-    let bounds = text.getBoundingClientRect();
-    let left = (bounds.left + bounds.right) / 2;
-    let top = (bounds.top + bounds.bottom) / 2;
-    let utils = content.windowUtils;
-    utils.sendMouseEvent("mousedown", left, top, 0, 1, 0, false, 0, 0);
-    utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
-  });
-
-  let condition = () => !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed;
-  await promiseForCondition(condition);
-});
-
-// Tests that clicking the box of the overlay activates the doorhanger
-// (just to be thorough)
-add_task(async function() {
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let pluginInfo = await promiseForPluginInfo("test");
-  ok(!pluginInfo.activated, "Test 18g, Plugin should not be activated");
-
-  ok(PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed,
-     "Test 19e, Doorhanger should start out dismissed");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let utils = content.windowUtils;
-    utils.sendMouseEvent("mousedown", 50, 50, 0, 1, 0, false, 0, 0);
-    utils.sendMouseEvent("mouseup", 50, 50, 0, 1, 0, false, 0, 0);
-  });
-
-  let condition = () => !PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser).dismissed &&
-    PopupNotifications.panel.firstElementChild;
-  await promiseForCondition(condition);
-  PopupNotifications.panel.firstElementChild.button.click();
-
-  pluginInfo = await promiseForPluginInfo("test");
-  ok(pluginInfo.activated, "Test 19e, Plugin should not be activated");
-
-  clearAllPluginPermissions();
-});
-
-// Tests that a plugin in a div that goes from style="display: none" to
-// "display: block" can be clicked to activate.
-add_task(async function() {
-  updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_hidden_to_visible.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(notification, "Test 20a, Should have a click-to-play notification");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    Assert.ok(!!overlay, "Test 20a, Plugin overlay should exist");
-  });
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let mainBox = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    let overlayRect = mainBox.getBoundingClientRect();
-    Assert.ok(overlayRect.width == 0 && overlayRect.height == 0,
-      "Test 20a, plugin should have an overlay with 0px width and height");
-  });
-
-  let pluginInfo = await promiseForPluginInfo("test");
-  ok(!pluginInfo.activated, "Test 20b, plugin should not be activated");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let div = doc.getElementById("container");
-    Assert.equal(div.style.display, "none",
-      "Test 20b, container div should be display: none");
-  });
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let div = doc.getElementById("container");
-    div.style.display = "block";
-  });
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let mainBox = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
-    let overlayRect = mainBox.getBoundingClientRect();
-    Assert.ok(overlayRect.width == 200 && overlayRect.height == 200,
-      "Test 20c, plugin should have overlay dims of 200px");
-  });
-
-  pluginInfo = await promiseForPluginInfo("test");
-  ok(!pluginInfo.activated, "Test 20b, plugin should not be activated");
-
-  ok(notification.dismissed, "Test 20c, Doorhanger should start out dismissed");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let bounds = plugin.getBoundingClientRect();
-    let left = (bounds.left + bounds.right) / 2;
-    let top = (bounds.top + bounds.bottom) / 2;
-    let utils = content.windowUtils;
-    utils.sendMouseEvent("mousedown", left, top, 0, 1, 0, false, 0, 0);
-    utils.sendMouseEvent("mouseup", left, top, 0, 1, 0, false, 0, 0);
-  });
-
-  let condition = () => !notification.dismissed && !!PopupNotifications.panel.firstElementChild;
-  await promiseForCondition(condition);
-  PopupNotifications.panel.firstElementChild.button.click();
-
-  pluginInfo = await promiseForPluginInfo("test");
-  ok(pluginInfo.activated, "Test 20c, plugin should be activated");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    let overlayRect = doc.getAnonymousElementByAttribute(plugin, "anonid", "main").getBoundingClientRect();
-    Assert.ok(overlayRect.width == 0 && overlayRect.height == 0,
-      "Test 20c, plugin should have overlay dims of 0px");
-  });
-
-  clearAllPluginPermissions();
-});
-
-// Tests that a click-to-play plugin resets its activated state when changing types
-add_task(async function() {
-  clearAllPluginPermissions();
-
-  updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let notification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(notification, "Test 22, Should have a click-to-play notification");
-
-  // Plugin should start as CTP
-  let pluginInfo = await promiseForPluginInfo("test");
-  is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY,
-     "Test 23, plugin fallback type should be PLUGIN_CLICK_TO_PLAY");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    plugin.type = null;
-    // We currently don't properly change state just on type change,
-    // so rebind the plugin to tree. bug 767631
-    plugin.parentNode.appendChild(plugin);
-  });
-
-  pluginInfo = await promiseForPluginInfo("test");
-  is(pluginInfo.displayedType, Ci.nsIObjectLoadingContent.TYPE_NULL, "Test 23, plugin should be TYPE_NULL");
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let doc = content.document;
-    let plugin = doc.getElementById("test");
-    plugin.type = "application/x-test";
-    plugin.parentNode.appendChild(plugin);
-  });
-
-  pluginInfo = await promiseForPluginInfo("test");
-  is(pluginInfo.displayedType, Ci.nsIObjectLoadingContent.TYPE_NULL, "Test 23, plugin should be TYPE_NULL");
-  is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY,
-     "Test 23, plugin fallback type should be PLUGIN_CLICK_TO_PLAY");
-  ok(!pluginInfo.activated, "Test 23, plugin node should not be activated");
-});
-
-// Plugin sync removal test. Note this test produces a notification drop down since
-// the plugin we add has zero dims.
-add_task(async function() {
-  updateAllTestPlugins(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_syncRemoved.html");
-
-  // Maybe there some better trick here, we need to wait for the page load, then
-  // wait for the js to execute in the page.
-  await waitForMs(500);
-
-  let notification = PopupNotifications.getNotification("click-to-play-plugins");
-  ok(notification, "Test 25: There should be a plugin notification even if the plugin was immediately removed");
-  ok(notification.dismissed, "Test 25: The notification should be dismissed by default");
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, "data:text/html,<html>hi</html>");
-});
-
-// Tests a page with a blocked plugin in it and make sure the infoURL property
-// the blocklist file gets used.
-add_task(async function() {
-  clearAllPluginPermissions();
-
-  await asyncSetAndUpdateBlocklist(gTestRoot + "blockPluginInfoURL.xml", gTestBrowser);
-
-  await promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_test.html");
-
-  // Work around for delayed PluginBindingAttached
-  await promiseUpdatePluginBindings(gTestBrowser);
-
-  let notification = PopupNotifications.getNotification("click-to-play-plugins");
-
-  // Since the plugin notification is dismissed by default, reshow it.
-  await promiseForNotificationShown(notification);
-
-  let pluginInfo = await promiseForPluginInfo("test");
-  is(pluginInfo.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_BLOCKLISTED,
-     "Test 26, plugin fallback type should be PLUGIN_BLOCKLISTED");
-  ok(!pluginInfo.activated, "Plugin should be activated.");
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_private_browsing_eme_persistent_state.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/*
- * This test ensures that navigator.requestMediaKeySystemAccess() requests
- * to run EME with persistent state are rejected in private browsing windows.
- * Bug 1334111.
- */
-
-const TEST_URL =
-  getRootDirectory(gTestPath).replace("chrome://mochitests/content",
-  "https://example.com") + "empty_file.html";
-
-async function isEmePersistentStateSupported(mode) {
-  let win = await BrowserTestUtils.openNewBrowserWindow(mode);
-  let tab = await BrowserTestUtils.openNewForegroundTab(win.gBrowser, TEST_URL);
-  let persistentStateSupported = await ContentTask.spawn(tab.linkedBrowser, {}, async function() {
-    try {
-      let config = [{
-        initDataTypes: ["webm"],
-        videoCapabilities: [{contentType: 'video/webm; codecs="vp9"'}],
-        persistentState: "required",
-      }];
-      await content.navigator.requestMediaKeySystemAccess("org.w3.clearkey", config);
-    } catch (ex) {
-      return false;
-    }
-    return true;
-  });
-
-  await BrowserTestUtils.closeWindow(win);
-
-  return persistentStateSupported;
-}
-
-add_task(async function test() {
-  is(await isEmePersistentStateSupported({private: true}),
-     false,
-     "EME persistentState should *NOT* be supported in private browsing window.");
-  is(await isEmePersistentStateSupported({private: false}),
-     true,
-     "EME persistentState *SHOULD* be supported in non private browsing window.");
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_private_clicktoplay.js
+++ /dev/null
@@ -1,230 +0,0 @@
-/* import-globals-from ../head.js */
-
-var rootDir = getRootDirectory(gTestPath);
-const gTestRoot = rootDir;
-const gHttpTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-
-var gTestBrowser = null;
-var gNextTest = null;
-var gPluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
-
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-var gPrivateWindow = null;
-var gPrivateBrowser = null;
-
-function finishTest() {
-  clearAllPluginPermissions();
-  gBrowser.removeCurrentTab();
-  if (gPrivateWindow) {
-    gPrivateWindow.close();
-  }
-  window.focus();
-}
-
-let createPrivateWindow = async function createPrivateWindow(url) {
-  gPrivateWindow = await BrowserTestUtils.openNewBrowserWindow({private: true});
-  ok(!!gPrivateWindow, "should have created a private window.");
-  gPrivateBrowser = gPrivateWindow.getBrowser().selectedBrowser;
-
-  BrowserTestUtils.loadURI(gPrivateBrowser, url);
-  await BrowserTestUtils.browserLoaded(gPrivateBrowser, false, url);
-  info("loaded " + url);
-};
-
-add_task(async function test() {
-  registerCleanupFunction(function() {
-    clearAllPluginPermissions();
-    getTestPlugin().enabledState = Ci.nsIPluginTag.STATE_ENABLED;
-    getTestPlugin("Second Test Plug-in").enabledState = Ci.nsIPluginTag.STATE_ENABLED;
-  });
-
-  let newTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.selectedTab = newTab;
-  gTestBrowser = gBrowser.selectedBrowser;
-  let promise = BrowserTestUtils.browserLoaded(gTestBrowser);
-
-  Services.prefs.setBoolPref("plugins.click_to_play", true);
-  getTestPlugin().enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY;
-  getTestPlugin("Second Test Plug-in").enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY;
-  await promise;
-});
-
-add_task(async function test1a() {
-  await createPrivateWindow(gHttpTestRoot + "plugin_test.html");
-});
-
-add_task(async function test1b() {
-  let popupNotification = gPrivateWindow.PopupNotifications.getNotification("click-to-play-plugins", gPrivateBrowser);
-  ok(popupNotification, "Test 1b, Should have a click-to-play notification");
-
-  await ContentTask.spawn(gPrivateBrowser, null, function() {
-    let plugin = content.document.getElementById("test");
-    let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    ok(!objLoadingContent.activated, "Test 1b, Plugin should not be activated");
-  });
-
-  // Check the button status
-  let promiseShown = BrowserTestUtils.waitForEvent(gPrivateWindow.PopupNotifications.panel,
-                                                   "Shown");
-  popupNotification.reshow();
-
-  await promiseShown;
-  is(gPrivateWindow.PopupNotifications.panel.firstElementChild.checkbox.hidden, true, "'Remember' checkbox should be hidden in private windows");
-
-  let promises = [
-    BrowserTestUtils.browserLoaded(gTestBrowser, false, gHttpTestRoot + "plugin_test.html"),
-    BrowserTestUtils.waitForEvent(window, "activate"),
-  ];
-  gPrivateWindow.close();
-  BrowserTestUtils.loadURI(gTestBrowser, gHttpTestRoot + "plugin_test.html");
-  await Promise.all(promises);
-  await SimpleTest.promiseFocus(window);
-});
-
-add_task(async function test2a() {
-  // enable test plugin on this site
-  let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(popupNotification, "Test 2a, Should have a click-to-play notification");
-
-  await ContentTask.spawn(gTestBrowser, null, function() {
-    let plugin = content.document.getElementById("test");
-    let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    ok(!objLoadingContent.activated, "Test 2a, Plugin should not be activated");
-  });
-
-  // Simulate clicking the "Allow Now" button.
-  let promiseShown = BrowserTestUtils.waitForEvent(PopupNotifications.panel,
-                                                   "Shown");
-  popupNotification.reshow();
-  await promiseShown;
-
-  PopupNotifications.panel.firstElementChild.button.click();
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let plugin = content.document.getElementById("test");
-    let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    let condition = () => objLoadingContent.activated;
-    await ContentTaskUtils.waitForCondition(condition, "Test 2a, Waited too long for plugin to activate");
-  });
-});
-
-add_task(async function test2c() {
-  let topicObserved = TestUtils.topicObserved("PopupNotifications-updateNotShowing");
-  await createPrivateWindow(gHttpTestRoot + "plugin_test.html");
-  await topicObserved;
-
-  let popupNotification = gPrivateWindow.PopupNotifications.getNotification("click-to-play-plugins", gPrivateBrowser);
-  ok(popupNotification, "Test 2c, Should have a click-to-play notification");
-
-  await ContentTask.spawn(gPrivateBrowser, null, function() {
-    let plugin = content.document.getElementById("test");
-    let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    ok(objLoadingContent.activated, "Test 2c, Plugin should be activated");
-  });
-
-  // Check the button status
-  let promiseShown = BrowserTestUtils.waitForEvent(gPrivateWindow.PopupNotifications.panel,
-                                                   "Shown");
-  popupNotification.reshow();
-  await promiseShown;
-  is(gPrivateWindow.PopupNotifications.panel.firstElementChild.secondaryButton.hidden, true,
-     "Test 2c, Activated plugin in a private window should not have visible 'Block' button.");
-  is(gPrivateWindow.PopupNotifications.panel.firstElementChild.checkbox.hidden, true,
-     "Test 2c, Activated plugin in a private window should not have visible 'Remember' checkbox.");
-
-  clearAllPluginPermissions();
-
-  let promises = [
-    BrowserTestUtils.browserLoaded(gTestBrowser, false, gHttpTestRoot + "plugin_test.html"),
-    BrowserTestUtils.waitForEvent(window, "activate"),
-  ];
-  gPrivateWindow.close();
-  BrowserTestUtils.loadURI(gTestBrowser, gHttpTestRoot + "plugin_test.html");
-  await Promise.all(promises);
-  await SimpleTest.promiseFocus(window);
-});
-
-add_task(async function test3a() {
-  // enable test plugin on this site
-  let popupNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser);
-  ok(popupNotification, "Test 3a, Should have a click-to-play notification");
-
-  await ContentTask.spawn(gTestBrowser, null, function() {
-    let plugin = content.document.getElementById("test");
-    let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    ok(!objLoadingContent.activated, "Test 3a, Plugin should not be activated");
-  });
-
-  // Simulate clicking the "Allow" button.
-  let promiseShown = BrowserTestUtils.waitForEvent(PopupNotifications.panel,
-                                                   "Shown");
-  popupNotification.reshow();
-  await promiseShown;
-  PopupNotifications.panel.firstElementChild.button.click();
-
-  await ContentTask.spawn(gTestBrowser, null, async function() {
-    let plugin = content.document.getElementById("test");
-    let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
-    let condition = () => objLoadingContent.activated;
-    await ContentTaskUtils.waitForCondition(condition, "Test 3a, Waited too long for plugin to activate");
-  });
-});
-
-add_task(async function test3c() {
-  let topicObserved = TestUtils.topicObserved("PopupNotifications-updateNotShowing");
-  await createPrivateWindow(gHttpTestRoot + "plugin_test.html");
-  await topicObserved;
-
-  let popupNotification = gPrivateWindow.PopupNotifications.getNotification("click-to-play-plugins", gPrivateBrowser);
-  ok(popupNotification, "Test 3c, Should have a click-to-play notification");
-
-  // Check the button status
-  let promiseShown = BrowserTestUtils.waitForEvent(gPrivateWindow.PopupNotifications.panel,
-                                                   "Shown");
-  popupNotification.reshow();
-  await promiseShown;
-  is(gPrivateWindow.PopupNotifications.panel.firstElementChild.secondaryButton.hidden, true,
-     "Test 2c, Activated plugin in a private window should not have visible 'Block' button.");
-  is(gPrivateWindow.PopupNotifications.panel.firstElementChild.checkbox.hidden, true,
-     "Test 2c, Activated plugin in a private window should not have visible 'Remember' checkbox.");
-
-  BrowserTestUtils.loadURI(gPrivateBrowser, gHttpTestRoot + "plugin_two_types.html");
-  await BrowserTestUtils.browserLoaded(gPrivateBrowser);
-});
-
-add_task(async function test3d() {
-  let popupNotification = gPrivateWindow.PopupNotifications.getNotification("click-to-play-plugins", gPrivateBrowser);
-  ok(popupNotification, "Test 3d, Should have a click-to-play notification");
-
-  // Check the list item status
-  let promiseShown = BrowserTestUtils.waitForEvent(gPrivateWindow.PopupNotifications.panel,
-                                                   "Shown");
-  popupNotification.reshow();
-  await promiseShown;
-  let doc = gPrivateWindow.document;
-  for (let item of gPrivateWindow.PopupNotifications.panel.firstElementChild.children) {
-    let allowalways = doc.getAnonymousElementByAttribute(item, "anonid", "allowalways");
-    ok(allowalways, "Test 3d, should have list item for allow always");
-    let allownow = doc.getAnonymousElementByAttribute(item, "anonid", "allownow");
-    ok(allownow, "Test 3d, should have list item for allow now");
-    let block = doc.getAnonymousElementByAttribute(item, "anonid", "block");
-    ok(block, "Test 3d, should have list item for block");
-
-    if (item.action.pluginName === "Test") {
-      is(item.value, "allowalways", "Test 3d, Plugin should bet set to 'allow always'");
-      ok(!allowalways.hidden, "Test 3d, Plugin set to 'always allow' should have a visible 'always allow' action.");
-      ok(allownow.hidden, "Test 3d, Plugin set to 'always allow' should have an invisible 'allow now' action.");
-      ok(block.hidden, "Test 3d, Plugin set to 'always allow' should have an invisible 'block' action.");
-    } else if (item.action.pluginName === "Second Test") {
-      is(item.value, "block", "Test 3d, Second plugin should bet set to 'block'");
-      ok(allowalways.hidden, "Test 3d, Plugin set to 'block' should have a visible 'always allow' action.");
-      ok(!allownow.hidden, "Test 3d, Plugin set to 'block' should have a visible 'allow now' action.");
-      ok(!block.hidden, "Test 3d, Plugin set to 'block' should have a visible 'block' action.");
-    } else {
-      ok(false, "Test 3d, Unexpected plugin '" + item.action.pluginName + "'");
-    }
-  }
-
-  finishTest();
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/browser_subframe_access_hidden_plugins.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/* import-globals-from ../head.js */
-
-"use strict";
-
-const TEST_PLUGIN_NAME = "Test Plug-in";
-const HIDDEN_CTP_PLUGIN_PREF = "plugins.navigator.hidden_ctp_plugin";
-const DOMAIN_1 = "http://example.com";
-const DOMAIN_2 = "http://mochi.test:8888";
-
-/**
- * If a plugin is click-to-play and named in HIDDEN_CTP_PLUGIN_PREF,
- * then the plugin should be hidden in the navigator.plugins list by
- * default. However, if a plugin has been allowed on a top-level
- * document, we should let subframes of that document access
- * navigator.plugins.
- */
-add_task(async function setup() {
-  // We'll make the Test Plugin click-to-play.
-  let originalPluginState = getTestPluginEnabledState();
-  setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
-  registerCleanupFunction(() => {
-    setTestPluginEnabledState(originalPluginState);
-    clearAllPluginPermissions();
-  });
-
-  // And then make the plugin hidden.
-  await SpecialPowers.pushPrefEnv({
-    set: [[HIDDEN_CTP_PLUGIN_PREF, TEST_PLUGIN_NAME]],
-  });
-});
-
-add_task(async function test_plugin_accessible_in_subframe() {
-  // Let's make it so that DOMAIN_1 allows the test plugin to
-  // be activated. This permission will be cleaned up inside
-  // our registerCleanupFunction when the test ends.
-  let ssm = Services.scriptSecurityManager;
-  let principal = ssm.createCodebasePrincipalFromOrigin(DOMAIN_1);
-  let pluginHost = Cc["@mozilla.org/plugin/host;1"]
-                     .getService(Ci.nsIPluginHost);
-  let permString = pluginHost.getPermissionStringForType("application/x-test");
-  Services.perms.addFromPrincipal(principal, permString,
-                                  Ci.nsIPermissionManager.ALLOW_ACTION,
-                                  Ci.nsIPermissionManager.EXPIRE_NEVER,
-                                  0 /* expireTime */);
-
-  await BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: DOMAIN_1,
-  }, async function(browser) {
-    await ContentTask.spawn(browser, [TEST_PLUGIN_NAME, DOMAIN_2],
-                            async function([pluginName, domain2]) {
-      Assert.ok(content.navigator.plugins[pluginName],
-                "Top-level document should find Test Plugin");
-
-      // Now manually create a subframe hosted at domain2...
-      let subframe = content.document.createElement("iframe");
-      subframe.src = domain2;
-      let loadedPromise = ContentTaskUtils.waitForEvent(subframe, "load");
-      content.document.body.appendChild(subframe);
-      await loadedPromise;
-
-      // Make sure that the HiddenPlugin event never fires in content.
-      let sawEvent = false;
-      addEventListener("HiddenPlugin", function onHiddenPlugin(e) {
-        sawEvent = true;
-        removeEventListener("HiddenPlugin", onHiddenPlugin, true);
-      }, true);
-
-      Assert.ok(subframe.contentWindow.navigator.plugins[pluginName],
-                "Subframe should find Test Plugin");
-      Assert.ok(!sawEvent, "Should not have seen the HiddenPlugin event.");
-    });
-  });
-});
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/empty_file.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <meta charset="UTF-8">
-  </head>
-  <body>
-    This page is intentionally left blank.
-  </body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_add_dynamically.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-<script>
-function addPlugin(aId, aType = "application/x-test") {
-  var embed = document.createElement("embed");
-  embed.setAttribute("id", aId);
-  embed.style.width = "200px";
-  embed.style.height = "200px";
-  embed.setAttribute("type", aType);
-  return document.body.appendChild(embed);
-}
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_alternate_content.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!-- bug 739575 -->
-<html>
-<head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-</head>
-<body>
-<object id="test" type="application/x-test" style="height: 200px; width:200px">
-<p><a href="about:blank">you should not see this link when plugins are click-to-play</a></p>
-</object>
-</body></html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_big.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-<embed id="test" style="width: 500px; height: 500px" type="application/x-test">
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_both.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-<embed id="unknown" style="width: 100px; height: 100px" type="application/x-unknown">
-<embed id="test" style="width: 100px; height: 100px" type="application/x-test">
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_both2.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-<embed id="test" style="width: 100px; height: 100px" type="application/x-test">
-<embed id="unknown" style="width: 100px; height: 100px" type="application/x-unknown">
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_bug744745.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head><meta charset="utf-8"/></head>
-<body>
-<style>
-.x {
-  opacity: 0 !important;
-}
-</style>
-<object id="test" class="x" type="application/x-test" width=200 height=200></object>
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_bug749455.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<!-- bug 749455 -->
-<html>
-<head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-</head>
-<body>
-<embed src="plugin_bug749455.html" type="application/x-test" width="100px" height="100px"></embed>
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_bug787619.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head><meta charset="utf-8"/></head>
-<body>
-  <a id="wrapper">
-    <embed id="plugin" style="width: 200px; height: 200px" type="application/x-test">
-  </a>
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_bug797677.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head><meta charset="utf-8"/></head>
-<body><embed id="plugin" type="9000"></embed></body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_bug820497.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head><meta charset="utf-8"/></head>
-<body>
-<object id="test" type="application/x-test" width=200 height=200></object>
-<script>
-  function addSecondPlugin() {
-    var object = document.createElement("object");
-    object.type = "application/x-second-test";
-    object.width = 200;
-    object.height = 200;
-    object.id = "secondtest";
-    document.body.appendChild(object);
-  }
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_clickToPlayAllow.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-<embed id="test" style="width: 200px; height: 200px" type="application/x-test">
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_clickToPlayDeny.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-<embed id="test" style="width: 200px; height: 200px" type="application/x-test">
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_crashCommentAndURL.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-    <script type="text/javascript">
-      function crash() {
-        var plugin = document.getElementById("plugin");
-        var argStr = decodeURIComponent(window.location.search.substr(1));
-        if (argStr) {
-          var args = JSON.parse(argStr);
-          for (var key in args)
-            plugin.setAttribute(key, args[key]);
-        }
-        try {
-          plugin.crash();
-        } catch (err) {}
-      }
-    </script>
-  </head>
-  <body onload="crash();">
-    <embed id="plugin" type="application/x-test"
-           width="400" height="400"
-           drawmode="solid" color="FF00FFFF">
-    </embed>
-  </body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_favorfallback.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head><meta charset="utf-8"/></head>
-<body>
-<style>
-.testcase {
-    display: none;
-}
-object {
-    width: 200px;
-    height: 200px;
-}
-</style>
-
-<!-- Tests that a <video> tag in the fallback content favors the fallback content -->
-<div id="testcase_video" class="testcase">
-    <object class="expected_ctp" type="application/x-shockwave-flash-test">
-        Unexpected fallback
-    </object>
-    <object class="expected_fallback" type="application/x-shockwave-flash-test">
-        <video></video>
-        Expected fallback
-    </object>
-</div>
-
-<!-- Tests that an object with no src specified (no data="") favors the fallback content -->
-<div id="testcase_nosrc" class="testcase">
-    <!-- We must use an existing and valid file here because otherwise the failed load
-         triggers the plugin's alternate content, indepedent of the favor-fallback code path -->
-    <object class="expected_ctp" type="application/x-shockwave-flash-test" data="plugin_simple_blank.swf">
-        Unexpected fallback
-    </object>
-    <object class="expected_fallback" type="application/x-shockwave-flash-test">
-        Expected fallback
-    </object>
-</div>
-
-<!-- Tests that an <embed> tag in the fallback content forces the plugin content,
-     when fallback is defaulting to true -->
-<div id="testcase_embed" class="testcase">
-    <object class="expected_ctp" type="application/x-shockwave-flash-test">
-        <embed></embed>
-        Unexpected fallback
-    </object>
-    <object class="expected_fallback" type="application/x-shockwave-flash-test">
-        Expected fallback
-    </object>
-</div>
-
-<!-- Tests that links to adobe.com inside the fallback content forces the plugin content,
-     when fallback is defaulting to true -->
-<div id="testcase_adobelink" class="testcase">
-    <object class="expected_ctp" type="application/x-shockwave-flash-test">
-        <a href="https://www.adobe.com">Go to adobe.com</a>
-        Unexpected fallback
-    </object>
-    <object class="expected_ctp" type="application/x-shockwave-flash-test">
-        <a href="https://adobe.com">Go to adobe.com</a>
-        Unexpected fallback
-    </object>
-    <object class="expected_fallback" type="application/x-shockwave-flash-test">
-        Expected fallback
-    </object>
-</div>
-
-<!-- Tests that instructions to download or install flash inside the fallback content
-     forces the plugin content, when fallback is defaulting to true -->
-<div id="testcase_installinstructions" class="testcase">
-    <object class="expected_ctp" type="application/x-shockwave-flash-test">
-        Install -- Unexpected fallback
-    </object>
-    <object class="expected_ctp" type="application/x-shockwave-flash-test">
-        Flash -- Unexpected fallback
-    </object>
-    <object class="expected_ctp" type="application/x-shockwave-flash-test">
-        Download -- Unexpected fallback
-    </object>
-    <object class="expected_fallback" type="application/x-shockwave-flash-test">
-        <!-- Tests that the words Install, Flash or Download do not trigger
-             this behavior if it's just inside a comment, and not part of
-             the text content -->
-        Expected Fallback
-    </object>
-    <object class="expected_fallback" type="application/x-shockwave-flash-test">
-        Expected fallback
-    </object>
-</div>
-
-<script>
-    let queryString = location.search;
-    let match = /^\?testcase=([a-z]+)$/.exec(queryString);
-    let testcase = match[1];
-    document.getElementById(`testcase_${testcase}`).style.display = "block";
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_hidden_to_visible.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-  <div id="container" style="display: none">
-    <object id="test" type="application/x-test" style="width: 200px; height: 200px;"></object>
-  </div>
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_iframe.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-<iframe id="frame" with="400" height="400" src="plugin_test.html">
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_outsideScrollArea.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<style type="text/css">
-#container {
-  position: fixed;
-  top: 0;
-  bottom: 0;
-  width: 100%;
-  height: 100%;
-  background: blue;
-}
-
-#test {
-  width: 400px;
-  height: 400px;
-  position: absolute;
-}
-</style>
-</head>
-<body>
-  <div id="container"></div>
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_overlay_styles.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-
-  <div id="testcase1" class="testcase">
-    <object width="10" height="10" type="application/x-test"></object>
-  </div>
-
-  <div id="testcase2" class="testcase">
-    <object width="40" height="40" type="application/x-test"></object>
-  </div>
-
-  <div id="testcase3" class="testcase">
-    <object width="100" height="70" type="application/x-test"></object>
-  </div>
-
-  <div id="testcase4" class="testcase">
-    <object width="200" height="200" type="application/x-test"></object>
-  </div>
-
-  <div id="testcase5" class="testcase">
-    <object width="300" height="300" type="application/x-test"></object>
-  </div>
-
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_shouldShowOverlay.html
+++ /dev/null
@@ -1,116 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<style>
-object {
-  width: 200px;
-  height: 200px;
-}
-
-.testcase {
-  position: relative;
-  margin-bottom: 5px;
-}
-
-.cover {
-  position: absolute;
-  width: 20px;
-  height: 20px;
-  background-color: green;
-}
-</style>
-</head>
-<body>
-
-  <div id="testcase1" class="testcase" shouldshow="true"
-       style="top: -100px">
-    <!-- Should show overlay even though the top part is outside
-       of the page. -->
-    <object type="application/x-test"></object>
-  </div>
-
-  <div id="testcase2" class="testcase" shouldshow="true"
-       style="left: -100px">
-    <!-- Should show overlay even though the left part is outside
-       of the page. -->
-    <object type="application/x-test"></object>
-  </div>
-
-  <div id="testcase3" class="testcase" shouldshow="false"
-       style="left: -210px">
-    <!-- The object is entirely outside of the page, so the overlay
-         should NOT show. -->
-    <object type="application/x-test"></object>
-  </div>
-
-  <div id="testcase4" class="testcase" shouldshow="true">
-    <!-- Should show overlay even though the top-left corner is covered. -->
-    <div class="cover" style="top: 0; left: 0"></div>
-    <object type="application/x-test"></object>
-  </div>
-
-  <div id="testcase5" class="testcase" shouldshow="true">
-    <!-- Should show overlay even though the top-right corner is covered. -->
-    <div class="cover" style="top: 0; left: 180px"></div>
-    <object type="application/x-test"></object>
-  </div>
-
-  <div id="testcase6" class="testcase" shouldshow="true">
-    <!-- Should show overlay even though the bottom-left corner is covered. -->
-    <div class="cover" style="top: 180px; left: 0"></div>
-    <object type="application/x-test"></object>
-  </div>
-
-
-  <div id="testcase7" class="testcase" shouldshow="true">
-    <!-- Should show overlay even though the bottom-right corner is covered. -->
-    <div class="cover" style="top: 180px; left: 180px"></div>
-    <object type="application/x-test"></object>
-  </div>
-
-  <div id="testcase8" class="testcase" shouldshow="true">
-    <!-- Should show overlay even though the center is covered. -->
-    <div class="cover" style="top: 90px; left: 90px"></div>
-    <object type="application/x-test"></object>
-  </div>
-
-  <div id="testcase9" class="testcase" shouldshow="true">
-    <!-- Should show overlay even though multiple points are covered,
-       but not all of them. -->
-    <div class="cover" style="top: 0; left: 0"></div>
-    <div class="cover" style="top: 0; left: 180px"></div>
-    <div class="cover" style="top: 180px; left: 0"></div>
-    <div class="cover" style="top: 180px; left: 180px"></div>
-    <object type="application/x-test"></object>
-  </div>
-
-  <div id="testcase10" class="testcase" shouldshow="true">
-    <!-- Another case where 4 are covered, but not all. -->
-    <div class="cover" style="top: 90px; left: 90px"></div>
-    <div class="cover" style="top: 0; left: 180px"></div>
-    <div class="cover" style="top: 180px; left: 0"></div>
-    <div class="cover" style="top: 180px; left: 180px"></div>
-    <object type="application/x-test"></object>
-  </div>
-
-  <div id="testcase11" class="testcase" shouldshow="false">
-    <!-- All corners and center are covered here, so in this
-         case the overlay should NOT show. -->
-    <div class="cover" style="top: 0; left: 0"></div>
-    <div class="cover" style="top: 0; left: 180px"></div>
-    <div class="cover" style="top: 180px; left: 0"></div>
-    <div class="cover" style="top: 180px; left: 180px"></div>
-    <div class="cover" style="top: 90px; left: 90px"></div>
-    <object type="application/x-test"></object>
-  </div>
-
-  <div id="testcase12" class="testcase" shouldshow="false">
-        <!-- All corners and center are covered here, by a single
-        element. In this case the overlay should NOT show. -->
-    <div class="cover" style="width: 200px; height:200px"></div>
-    <object type="application/x-test"></object>
-  </div>
-
-</body>
-</html>
deleted file mode 100644
index b846387eb8b81ed7528d2ec13b153b74e34a1882..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_small.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-<embed id="test" style="width: 10px; height: 10px" type="application/x-test">
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_small_2.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-<embed id="test" style="width: 10px; height: 10px" type="application/x-second-test">
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_syncRemoved.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<body>
-<script type="text/javascript">
-  // create an embed, insert it in the doc and immediately remove it
-  var embed = document.createElement("embed");
-  embed.setAttribute("id", "test");
-  embed.setAttribute("type", "application/x-test");
-  embed.setAttribute("style", "width: 0px; height: 0px;");
-  document.body.appendChild(embed);
-  window.getComputedStyle(embed).top;
-  document.body.remove(embed);
-</script>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_test.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-<embed id="test" style="width: 300px; height: 300px" type="application/x-test">
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_test2.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-<embed id="test1" style="width: 200px; height: 200px" type="application/x-test">
-<embed id="test2" style="width: 200px; height: 200px" type="application/x-test">
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_test3.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-<embed id="test" style="width: 0px; height: 0px" type="application/x-test">
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_two_types.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head><meta charset="utf-8"/></head>
-<body>
-<embed id="test" style="width: 200px; height: 200px" type="application/x-test"/>
-<embed id="secondtestA" style="width: 200px; height: 200px" type="application/x-second-test"/>
-<embed id="secondtestB" style="width: 200px; height: 200px" type="application/x-second-test"/>
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_unknown.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-<embed id="unknown" style="width: 100px; height: 100px" type="application/x-unknown">
-</body>
-</html>
deleted file mode 100644
--- a/browser/base/content/test/plugins/xbl/plugin_zoom.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-</head>
-<body>
-<!-- The odd width and height are here to trigger bug 972237. -->
-<embed id="test" style="width: 99.789%; height: 99.123%" type="application/x-test">
-</body>
-</html>
--- a/browser/base/moz.build
+++ b/browser/base/moz.build
@@ -32,17 +32,16 @@ BROWSER_CHROME_MANIFESTS += [
     'content/test/historySwipeAnimation/browser.ini',
     'content/test/metaTags/browser.ini',
     'content/test/pageinfo/browser.ini',
     'content/test/performance/browser.ini',
     'content/test/performance/hidpi/browser.ini',
     'content/test/performance/lowdpi/browser.ini',
     'content/test/permissions/browser.ini',
     'content/test/plugins/browser.ini',
-    'content/test/plugins/xbl/browser.ini',
     'content/test/popupNotifications/browser.ini',
     'content/test/popups/browser.ini',
     'content/test/referrer/browser.ini',
     'content/test/sanitize/browser.ini',
     'content/test/sidebar/browser.ini',
     'content/test/siteIdentity/browser.ini',
     'content/test/static/browser.ini',
     'content/test/statuspanel/browser.ini',
--- a/browser/themes/linux/preferences/applications.css
+++ b/browser/themes/linux/preferences/applications.css
@@ -37,17 +37,17 @@ menuitem[appHandlerIcon="ask"] {
 
 richlistitem[appHandlerIcon="save"],
 menuitem[appHandlerIcon="save"] {
   list-style-image: url("moz-icon://stock/gtk-save?size=menu");
 }
 
 richlistitem[appHandlerIcon="plugin"],
 menuitem[appHandlerIcon="plugin"] {
-  list-style-image: url("chrome://global/skin/plugins/pluginGeneric.svg");
+  list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric.svg");
 }
 
 .actionsMenu .menulist-icon {
   margin-inline-end: 1px;
   height: 16px;
   width: 16px;
 }
 
--- a/browser/themes/osx/preferences/applications.css
+++ b/browser/themes/osx/preferences/applications.css
@@ -48,17 +48,17 @@ menuitem[appHandlerIcon="ask"] {
 
 richlistitem[appHandlerIcon="save"],
 menuitem[appHandlerIcon="save"] {
   list-style-image: url("chrome://browser/skin/preferences/saveFile.png");
 }
 
 richlistitem[appHandlerIcon="plugin"],
 menuitem[appHandlerIcon="plugin"] {
-  list-style-image: url("chrome://global/skin/plugins/pluginGeneric.svg");
+  list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric.svg");
 }
 
 /* Repeat what menu.css does for .menuitem-iconic */
 menuitem[appHandlerIcon] {
   padding-top: 1px;
   padding-bottom: 3px;
 }
 
--- a/browser/themes/shared/notification-icons.inc.css
+++ b/browser/themes/shared/notification-icons.inc.css
@@ -248,22 +248,22 @@ html|*#webRTC-previewVideo {
 .popup-notification-icon[popupid*="offline-app-requested"],
 .popup-notification-icon[popupid="offline-app-usage"] {
   list-style-image: url(chrome://global/skin/icons/question-64.png);
 }
 
 /* PLUGINS */
 
 .plugin-icon {
-  list-style-image: url(chrome://global/skin/plugins/plugin.svg);
+  list-style-image: url(chrome://mozapps/skin/plugins/plugin.svg);
   transition: fill 1.5s;
 }
 
 .plugin-icon.blocked-permission-icon {
-  list-style-image: url(chrome://global/skin/plugins/plugin-blocked.svg);
+  list-style-image: url(chrome://mozapps/skin/plugins/plugin-blocked.svg);
 }
 
 #plugin-icon-badge {
   list-style-image: url(chrome://browser/skin/notification-icons/plugin-badge.svg);
   opacity: 0;
   transition: opacity 1.5s;
 }
 
@@ -284,17 +284,17 @@ html|*#webRTC-previewVideo {
     opacity: 0;
   }
   to {
     opacity: 1;
   }
 }
 
 .plugin-blocked > .plugin-icon {
-  list-style-image: url(chrome://global/skin/plugins/plugin-blocked.svg);
+  list-style-image: url(chrome://mozapps/skin/plugins/plugin-blocked.svg);
   fill: #d92215 !important;
 }
 
 .plugin-blocked > #plugin-icon-badge {
   visibility: collapse;
 }
 
 #notification-popup-box[hidden] {
--- a/browser/themes/windows/preferences/applications.css
+++ b/browser/themes/windows/preferences/applications.css
@@ -37,17 +37,17 @@ menuitem[appHandlerIcon="ask"] {
 
 richlistitem[appHandlerIcon="save"],
 menuitem[appHandlerIcon="save"] {
   list-style-image: url("chrome://browser/skin/preferences/saveFile.png");
 }
 
 richlistitem[appHandlerIcon="plugin"],
 menuitem[appHandlerIcon="plugin"] {
-  list-style-image: url("chrome://global/skin/plugins/pluginGeneric.svg");
+  list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric.svg");
 }
 
 .actionsMenu .menulist-icon {
   margin-inline-end: 3px;
 }
 
 .actionsMenu > menupopup > menuitem > .menu-iconic-left {
   padding-inline-start: 0px;
--- a/caps/tests/mochitest/test_bug292789.html
+++ b/caps/tests/mochitest/test_bug292789.html
@@ -55,18 +55,18 @@ function testScriptSrc(aCallback) {
       // trigger the callback
       if (aCallback)
         aCallback();
     }
 }
 
 /** <img src=""> tests **/
 var img_global = "chrome://global/skin/media/error.png";
-var img_mozapps = "chrome://mozapps/skin/extensions/extensionGeneric.svg";
-var res_mozapps = "resource://gre/chrome/toolkit/skin/classic/mozapps/extensions/extensionGeneric.svg";
+var img_mozapps = "chrome://mozapps/skin/plugins/contentPluginCrashed.png";
+var res_mozapps = "resource://gre/chrome/toolkit/skin/classic/mozapps/plugins/contentPluginCrashed.png";
 
 var imgTests = [[img_global, "success"],
                 [img_mozapps, "fail"],
                 [res_mozapps, "success"]];
 
 var curImgTest = 0;
 
 function runImgTest() {
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -600,17 +600,16 @@ nsObjectLoadingContent::BindToTree(nsIDo
                                    nsIContent* aParent,
                                    nsIContent* aBindingParent)
 {
   nsImageLoadingContent::BindToTree(aDocument, aParent, aBindingParent);
 
   if (aDocument) {
     aDocument->AddPlugin(this);
   }
-
   return NS_OK;
 }
 
 void
 nsObjectLoadingContent::UnbindFromTree(bool aDeep, bool aNullParent)
 {
   nsImageLoadingContent::UnbindFromTree(aDeep, aNullParent);
 
@@ -630,31 +629,16 @@ nsObjectLoadingContent::UnbindFromTree(b
     QueueCheckPluginStopEvent();
   } else if (mType != eType_Image) {
     // nsImageLoadingContent handles the image case.
     // Reset state and clear pending events
     /// XXX(johns): The implementation for GenericFrame notes that ideally we
     ///             would keep the docshell around, but trash the frameloader
     UnloadObject();
   }
-
-  // Unattach plugin problem UIWidget if any.
-  if (thisElement->IsInComposedDoc() && thisElement->GetShadowRoot()) {
-    nsContentUtils::AddScriptRunner(NS_NewRunnableFunction(
-      "nsObjectLoadingContent::UnbindFromTree::UAWidgetUnbindFromTree",
-      [thisElement]() {
-        nsContentUtils::DispatchChromeEvent(
-          thisElement->OwnerDoc(), thisElement,
-          NS_LITERAL_STRING("UAWidgetUnbindFromTree"),
-          CanBubble::eYes, Cancelable::eNo);
-        thisElement->UnattachShadow();
-      })
-    );
-  }
-
   if (mType == eType_Plugin) {
     nsIDocument* doc = thisElement->GetComposedDoc();
     if (doc && doc->IsActive()) {
       nsCOMPtr<nsIRunnable> ev = new nsSimplePluginEvent(doc,
                                                          NS_LITERAL_STRING("PluginRemoved"));
       NS_DispatchToCurrentThread(ev);
     }
   }
@@ -2643,97 +2627,64 @@ nsObjectLoadingContent::NotifyStateChang
                                            EventStates aOldState,
                                            bool aSync,
                                            bool aNotify)
 {
   LOG(("OBJLC [%p]: Notifying about state change: (%u, %" PRIx64 ") -> (%u, %" PRIx64 ")"
        " (sync %i, notify %i)", this, aOldType, aOldState.GetInternalValue(),
        mType, ObjectState().GetInternalValue(), aSync, aNotify));
 
-  nsCOMPtr<dom::Element> thisEl =
+  nsCOMPtr<nsIContent> thisContent =
     do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));
-  MOZ_ASSERT(thisEl, "must be an element");
+  NS_ASSERTION(thisContent, "must be a content");
+
+  NS_ASSERTION(thisContent->IsElement(), "Not an element?");
 
   // XXX(johns): A good bit of the code below replicates UpdateState(true)
 
   // Unfortunately, we do some state changes without notifying
   // (e.g. in Fallback when canceling image requests), so we have to
   // manually notify object state changes.
-  thisEl->UpdateState(false);
+  thisContent->AsElement()->UpdateState(false);
 
   if (!aNotify) {
     // We're done here
     return;
   }
 
-  nsIDocument* doc = thisEl->GetComposedDoc();
+  nsIDocument* doc = thisContent->GetComposedDoc();
   if (!doc) {
     return; // Nothing to do
   }
 
   EventStates newState = ObjectState();
 
   if (newState == aOldState && mType == aOldType) {
     return; // Also done.
   }
 
   if (newState != aOldState) {
-    MOZ_ASSERT(thisEl->IsInComposedDoc(), "Something is confused");
+    NS_ASSERTION(thisContent->IsInComposedDoc(), "Something is confused");
     // This will trigger frame construction
     EventStates changedBits = aOldState ^ newState;
     {
       nsAutoScriptBlocker scriptBlocker;
-      doc->ContentStateChanged(thisEl, changedBits);
-    }
-
-    // Create/destroy plugin problem UAWidget if needed.
-    if (nsContentUtils::IsUAWidgetEnabled()) {
-      const EventStates pluginProblemState =
-        NS_EVENT_STATE_HANDLER_BLOCKED |
-        NS_EVENT_STATE_HANDLER_CRASHED |
-        NS_EVENT_STATE_TYPE_CLICK_TO_PLAY |
-        NS_EVENT_STATE_VULNERABLE_UPDATABLE |
-        NS_EVENT_STATE_VULNERABLE_NO_UPDATE;
-
-      bool hadProblemState = !(aOldState & pluginProblemState).IsEmpty();
-      bool hasProblemState = !(newState & pluginProblemState).IsEmpty();
-
-      if (hadProblemState && !hasProblemState) {
-        nsContentUtils::AddScriptRunner(NS_NewRunnableFunction(
-          "nsObjectLoadingContent::UnbindFromTree::UAWidgetUnbindFromTree",
-          [thisEl]() {
-            nsContentUtils::DispatchChromeEvent(
-              thisEl->OwnerDoc(), thisEl,
-              NS_LITERAL_STRING("UAWidgetUnbindFromTree"),
-              CanBubble::eYes, Cancelable::eNo);
-            thisEl->UnattachShadow();
-          })
-        );
-      } else if (!hadProblemState && hasProblemState) {
-        nsGenericHTMLElement::FromNode(thisEl)->AttachAndSetUAShadowRoot();
-
-        AsyncEventDispatcher* dispatcher =
-          new AsyncEventDispatcher(thisEl,
-                                   NS_LITERAL_STRING("UAWidgetBindToTree"),
-                                   CanBubble::eYes,
-                                   ChromeOnlyDispatch::eYes);
-        dispatcher->RunDOMEventWhenSafe();
-      }
+      doc->ContentStateChanged(thisContent, changedBits);
     }
   } else if (aOldType != mType) {
     // If our state changed, then we already recreated frames
     // Otherwise, need to do that here
     nsCOMPtr<nsIPresShell> shell = doc->GetShell();
     if (shell) {
-      shell->PostRecreateFramesFor(thisEl);
+      shell->PostRecreateFramesFor(thisContent->AsElement());
     }
   }
 
   if (aSync) {
-    MOZ_ASSERT(InActiveDocument(thisEl), "Something is confused");
+    NS_ASSERTION(InActiveDocument(thisContent), "Something is confused");
     // Make sure that frames are actually constructed immediately.
     doc->FlushPendingNotifications(FlushType::Frames);
   }
 }
 
 nsObjectLoadingContent::ObjectType
 nsObjectLoadingContent::GetTypeOfContent(const nsCString& aMIMEType,
                                          bool aNoFakePlugin)
--- a/dom/plugins/test/mochitest/test_crash_submit.xul
+++ b/dom/plugins/test/mochitest/test_crash_submit.xul
@@ -112,18 +112,17 @@ var testObserver = {
 
 
 function onPluginCrashed(aEvent) {
   ok(true, "Plugin crashed notification received");
   is(aEvent.type, "PluginCrashed", "event is correct type");
 
   let submitButton = document.getAnonymousElementByAttribute(aEvent.target,
                                                              "class",
-                                                             "submitButton") ||
-                     aEvent.target.openOrClosedShadowRoot.getElementById("submitButton");
+                                                             "submitButton");
   // try to submit this report
   sendMouseEvent({type:'click'}, submitButton, window);
 }
 
 function runTests() {
   // the test harness will have set MOZ_CRASHREPORTER_NO_REPORT,
   // ensure that we can change the setting and have our minidumps
   // wind up in Crash Reports/pending
--- a/dom/plugins/test/mochitest/test_hang_submit.xul
+++ b/dom/plugins/test/mochitest/test_hang_submit.xul
@@ -116,18 +116,17 @@ var testObserver = {
 };
 
 function onPluginCrashed(aEvent) {
   ok(true, "Plugin crashed notification received");
   is(aEvent.type, "PluginCrashed", "event is correct type");
 
   let submitButton = document.getAnonymousElementByAttribute(aEvent.target,
                                                              "class",
-                                                             "submitButton") ||
-                     aEvent.target.openOrClosedShadowRoot.getElementById("submitButton");
+                                                             "submitButton");
   // try to submit this report
   sendMouseEvent({type:'click'}, submitButton, window);
 }
 
 async function runTests() {
   // Default plugin hang timeout is too high for mochitests
   Services.prefs.setIntPref("dom.ipc.plugins.timeoutSecs", 1);
 
new file mode 100644
--- /dev/null
+++ b/mobile/android/chrome/content/PluginHelper.js
@@ -0,0 +1,226 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+"use strict";
+
+XPCOMUtils.defineLazyGetter(this, "GlobalEventDispatcher", () => EventDispatcher.instance);
+
+var PluginHelper = {
+  showDoorHanger: function(aTab) {
+    if (!aTab.browser)
+      return;
+
+    // Even though we may not end up showing a doorhanger, this flag
+    // lets us know that we've tried to show a doorhanger.
+    aTab.shouldShowPluginDoorhanger = false;
+
+    let uri = aTab.browser.currentURI;
+
+    // If the user has previously set a plugins permission for this website,
+    // either play or don't play the plugins instead of showing a doorhanger.
+    let permValue = Services.perms.testPermission(uri, "plugins");
+    if (permValue != Services.perms.UNKNOWN_ACTION) {
+      if (permValue == Services.perms.ALLOW_ACTION)
+        PluginHelper.playAllPlugins(aTab.browser.contentWindow);
+
+      return;
+    }
+
+    let message = Strings.browser.formatStringFromName("clickToPlayPlugins.message2",
+                                                       [uri.host], 1);
+    let buttons = [
+      {
+        label: Strings.browser.GetStringFromName("clickToPlayPlugins.dontActivate"),
+        callback: function(aChecked) {
+          // If the user checked "Don't ask again", make a permanent exception
+          if (aChecked)
+            Services.perms.add(uri, "plugins", Ci.nsIPermissionManager.DENY_ACTION);
+
+          // Other than that, do nothing
+        },
+      },
+      {
+        label: Strings.browser.GetStringFromName("clickToPlayPlugins.activate"),
+        callback: function(aChecked) {
+          // If the user checked "Don't ask again", make a permanent exception
+          if (aChecked)
+            Services.perms.add(uri, "plugins", Ci.nsIPermissionManager.ALLOW_ACTION);
+
+          PluginHelper.playAllPlugins(aTab.browser.contentWindow);
+        },
+        positive: true,
+      },
+    ];
+
+    // Add a checkbox with a "Don't ask again" message if the uri contains a
+    // host. Adding a permanent exception will fail if host is not present.
+    let options = uri.host ? { checkbox: Strings.browser.GetStringFromName("clickToPlayPlugins.dontAskAgain") } : {};
+
+    NativeWindow.doorhanger.show(message, "ask-to-play-plugins", buttons, aTab.id, options);
+  },
+
+  delayAndShowDoorHanger: function(aTab) {
+    // To avoid showing the doorhanger if there are also visible plugin
+    // overlays on the page, delay showing the doorhanger to check if
+    // visible plugins get added in the near future.
+    if (!aTab.pluginDoorhangerTimeout) {
+      aTab.pluginDoorhangerTimeout = setTimeout(function() {
+        if (this.shouldShowPluginDoorhanger) {
+          PluginHelper.showDoorHanger(this);
+        }
+      }.bind(aTab), 500);
+    }
+  },
+
+  playAllPlugins: function(aContentWindow) {
+    let cwu = aContentWindow.windowUtils;
+    // XXX not sure if we should enable plugins for the parent documents...
+    let plugins = cwu.plugins;
+    if (!plugins || !plugins.length)
+      return;
+
+    plugins.forEach(this.playPlugin);
+  },
+
+  playPlugin: function(plugin) {
+    let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
+    let mimeType = objLoadingContent.actualType;
+    if (mimeType) {
+      GlobalEventDispatcher.sendRequest({ type: "PluginHelper:playFlash" });
+    }
+    if (!objLoadingContent.activated)
+      objLoadingContent.playPlugin();
+  },
+
+  getPluginPreference: function getPluginPreference() {
+    let pluginDisable = Services.prefs.getBoolPref("plugin.disable");
+    if (pluginDisable)
+      return "0";
+
+    let state = Services.prefs.getIntPref("plugin.default.state");
+    return state == Ci.nsIPluginTag.STATE_CLICKTOPLAY ? "2" : "1";
+  },
+
+  setPluginPreference: function setPluginPreference(aValue) {
+    switch (aValue) {
+      case "0": // Enable Plugins = No
+        Services.prefs.setBoolPref("plugin.disable", true);
+        Services.prefs.clearUserPref("plugin.default.state");
+        break;
+      case "1": // Enable Plugins = Yes
+        Services.prefs.clearUserPref("plugin.disable");
+        Services.prefs.setIntPref("plugin.default.state", Ci.nsIPluginTag.STATE_ENABLED);
+        break;
+      case "2": // Enable Plugins = Tap to Play (default)
+        Services.prefs.clearUserPref("plugin.disable");
+        Services.prefs.clearUserPref("plugin.default.state");
+        break;
+    }
+  },
+
+  // Copied from /browser/base/content/browser.js
+  isTooSmall: function(plugin, overlay) {
+    // Is the <object>'s size too small to hold what we want to show?
+    let pluginRect = plugin.getBoundingClientRect();
+    // XXX bug 446693. The text-shadow on the submitted-report text at
+    //     the bottom causes scrollHeight to be larger than it should be.
+    let overflows = (overlay.scrollWidth > pluginRect.width) ||
+                    (overlay.scrollHeight - 5 > pluginRect.height);
+
+    return overflows;
+  },
+
+  getPluginMimeType: function(plugin) {
+    var tagMimetype = plugin.actualType;
+
+    if (tagMimetype == "") {
+      tagMimetype = plugin.type;
+    }
+
+    return tagMimetype;
+  },
+
+  handlePluginBindingAttached: function(aTab, aEvent) {
+    let plugin = aEvent.target;
+    let doc = plugin.ownerDocument;
+    let overlay = doc.getAnonymousElementByAttribute(plugin, "anonid", "main");
+    if (!overlay || overlay._bindingHandled) {
+      return;
+    }
+    overlay._bindingHandled = true;
+
+    let eventType = PluginHelper._getBindingType(plugin);
+    if (!eventType) {
+      // Not all bindings have handlers
+      return;
+    }
+
+    switch (eventType) {
+      case "PluginClickToPlay": {
+        // Check if plugins have already been activated for this page, or if
+        // the user has set a permission to always play plugins on the site
+        if (aTab.clickToPlayPluginsActivated ||
+            Services.perms.testPermission(aTab.browser.currentURI, "plugins") ==
+            Services.perms.ALLOW_ACTION) {
+          PluginHelper.playPlugin(plugin);
+          return;
+        }
+
+        // If the plugin is hidden, or if the overlay is too small, show a
+        // doorhanger notification
+        if (PluginHelper.isTooSmall(plugin, overlay)) {
+          PluginHelper.delayAndShowDoorHanger(aTab);
+        } else {
+          // There's a large enough visible overlay that we don't need to show
+          // the doorhanger.
+          aTab.shouldShowPluginDoorhanger = false;
+          overlay.classList.add("visible");
+        }
+
+        // Add click to play listener to the overlay
+        overlay.addEventListener("click", function(e) {
+          if (!e.isTrusted)
+            return;
+          e.preventDefault();
+          let win = e.target.ownerGlobal.top;
+          let tab = BrowserApp.getTabForWindow(win);
+          tab.clickToPlayPluginsActivated = true;
+          PluginHelper.playAllPlugins(win);
+
+          NativeWindow.doorhanger.hide("ask-to-play-plugins", tab.id);
+        }, true);
+
+        // Add handlers for over- and underflow in case the plugin gets resized
+        plugin.addEventListener("overflow", function(event) {
+          overlay.classList.remove("visible");
+          PluginHelper.delayAndShowDoorHanger(aTab);
+        });
+        plugin.addEventListener("underflow", function(event) {
+          // This is also triggered if only one dimension underflows,
+          // the other dimension might still overflow
+          if (!PluginHelper.isTooSmall(plugin, overlay)) {
+            overlay.classList.add("visible");
+          }
+        });
+
+        break;
+      }
+    }
+  },
+
+  // Helper to get the binding handler type from a plugin object
+  _getBindingType: function(plugin) {
+    if (!(plugin instanceof Ci.nsIObjectLoadingContent))
+      return null;
+
+    switch (plugin.pluginFallbackType) {
+      case Ci.nsIObjectLoadingContent.PLUGIN_UNSUPPORTED:
+        return "PluginNotFound";
+      case Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY:
+        return "PluginClickToPlay";
+      default:
+        // Not all states map to a handler
+        return null;
+    }
+  },
+};
--- a/mobile/android/chrome/jar.mn
+++ b/mobile/android/chrome/jar.mn
@@ -25,16 +25,17 @@ chrome.jar:
   content/browser.css                  (content/browser.css)
   content/browser.js                   (content/browser.js)
   content/PresentationView.xul         (content/PresentationView.xul)
   content/PresentationView.js          (content/PresentationView.js)
   content/netError.xhtml               (content/netError.xhtml)
   content/EmbedRT.js                   (content/EmbedRT.js)
   content/MemoryObserver.js            (content/MemoryObserver.js)
   content/ConsoleAPI.js                (content/ConsoleAPI.js)
+  content/PluginHelper.js              (content/PluginHelper.js)
   content/PrintHelper.js               (content/PrintHelper.js)
   content/OfflineApps.js               (content/OfflineApps.js)
   content/MasterPassword.js            (content/MasterPassword.js)
   content/FindHelper.js                (content/FindHelper.js)
   content/PermissionsHelper.js         (content/PermissionsHelper.js)
   content/FeedHandler.js               (content/FeedHandler.js)
   content/Feedback.js                  (content/Feedback.js)
   content/Linkify.js                   (content/Linkify.js)
--- a/toolkit/actors/UAWidgetsChild.jsm
+++ b/toolkit/actors/UAWidgetsChild.jsm
@@ -51,20 +51,20 @@ class UAWidgetsChild extends ActorChild 
       case "audio":
         uri = "chrome://global/content/elements/videocontrols.js";
         widgetName = "VideoControlsPageWidget";
         break;
       case "input":
         uri = "chrome://global/content/elements/datetimebox.js";
         widgetName = "DateTimeBoxWidget";
         break;
+      case "applet":
       case "embed":
       case "object":
-        uri = "chrome://global/content/elements/pluginProblem.js";
-        widgetName = "PluginProblemWidget";
+        // TODO (pluginProblems)
         break;
       case "marquee":
         uri = "chrome://global/content/elements/marquee.js";
         widgetName = "MarqueeWidget";
         break;
     }
 
     if (!uri || !widgetName) {
--- a/toolkit/content/jar.mn
+++ b/toolkit/content/jar.mn
@@ -92,17 +92,16 @@ toolkit.jar:
    content/global/bindings/tree.xml            (widgets/tree.xml)
    content/global/bindings/videocontrols.xml   (widgets/videocontrols.xml)
 *  content/global/bindings/wizard.xml          (widgets/wizard.xml)
    content/global/elements/datetimebox.js      (widgets/datetimebox.js)
    content/global/elements/findbar.js          (widgets/findbar.js)
    content/global/elements/editor.js          (widgets/editor.js)
    content/global/elements/general.js          (widgets/general.js)
    content/global/elements/notificationbox.js  (widgets/notificationbox.js)
-   content/global/elements/pluginProblem.js    (widgets/pluginProblem.js)
    content/global/elements/radio.js            (widgets/radio.js)
    content/global/elements/marquee.css         (widgets/marquee.css)
    content/global/elements/marquee.js          (widgets/marquee.js)
    content/global/elements/stringbundle.js     (widgets/stringbundle.js)
    content/global/elements/tabbox.js           (widgets/tabbox.js)
    content/global/elements/textbox.js          (widgets/textbox.js)
    content/global/elements/videocontrols.js    (widgets/videocontrols.js)
    content/global/elements/tree.js             (widgets/tree.js)
deleted file mode 100644
--- a/toolkit/content/widgets/pluginProblem.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
-  * License, v. 2.0. If a copy of the MPL was not distributed with this
-  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-// This is a UA Widget. It runs in per-origin UA widget scope,
-// to be loaded by UAWidgetsChild.jsm.
-
-this.PluginProblemWidget = class {
-  constructor(shadowRoot) {
-    this.shadowRoot = shadowRoot;
-    this.element = shadowRoot.host;
-    this.window = this.element.ownerGlobal;
-
-    const parser = new this.window.DOMParser();
-    let parserDoc = parser.parseFromString(`
-      <!DOCTYPE bindings [
-        <!ENTITY % pluginproblemDTD SYSTEM "chrome://pluginproblem/locale/pluginproblem.dtd">
-        <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
-        <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
-        %pluginproblemDTD;
-        %globalDTD;
-        %brandDTD;
-      ]>
-      <div xmlns="http://www.w3.org/1999/xhtml" class="mainBox" id="main" chromedir="&locale.dir;">
-        <link rel="stylesheet" type="text/css" href="chrome://pluginproblem/content/pluginProblemContent.css" />
-        <link rel="stylesheet" type="text/css" href="chrome://global/skin/plugins/pluginProblem.css" />
-        <div class="hoverBox">
-          <label>
-            <button class="icon" id="icon"/>
-            <div class="msg msgVulnerabilityStatus" id="vulnerabilityStatus"><!-- set at runtime --></div>
-            <div class="msg msgTapToPlay">&tapToPlayPlugin;</div>
-            <div class="msg msgClickToPlay" id="clickToPlay">&clickToActivatePlugin;</div>
-          </label>
-
-          <div class="msg msgBlocked">&blockedPlugin.label;</div>
-          <div class="msg msgCrashed">
-            <div class="msgCrashedText" id="crashedText"><!-- set at runtime --></div>
-            <!-- link href set at runtime -->
-            <div class="msgReload">&reloadPlugin.pre;<a class="reloadLink" id="reloadLink" href="">&reloadPlugin.middle;</a>&reloadPlugin.post;</div>
-          </div>
-
-          <div class="msg msgManagePlugins"><a class="action-link" id="managePluginsLink" href="">&managePlugins;</a></div>
-          <div class="submitStatus" id="submitStatus">
-            <div class="msg msgPleaseSubmit" id="pleaseSubmit">
-              <textarea class="submitComment"
-                        id="submitComment"
-                        placeholder="&report.comment;"/>
-              <div class="submitURLOptInBox">
-                <label><input class="submitURLOptIn" id="submitURLOptIn" type="checkbox"/> &report.pageURL;</label>
-              </div>
-              <div class="submitButtonBox">
-                <span class="helpIcon" id="helpIcon" role="link"/>
-                <input class="submitButton" type="button"
-                       id="submitButton"
-                       value="&report.please;"/>
-              </div>
-            </div>
-            <div class="msg msgSubmitting">&report.submitting;<span class="throbber"> </span></div>
-            <div class="msg msgSubmitted">&report.submitted;</div>
-            <div class="msg msgNotSubmitted">&report.disabled;</div>
-            <div class="msg msgSubmitFailed">&report.failed;</div>
-            <div class="msg msgNoCrashReport">&report.unavailable;</div>
-          </div>
-          <div class="msg msgCheckForUpdates"><a class="action-link" id="checkForUpdatesLink" href="">&checkForUpdates;</a></div>
-      </div>
-      <button class="closeIcon" id="closeIcon" title="&hidePluginBtn.label;"/>
-    </div>
-    `, "application/xml");
-    this.shadowRoot.importNodeAndAppendChildAt(this.shadowRoot,
-                                               parserDoc.documentElement, true);
-
-    // Notify browser-plugins.js that we were attached, on a delay because
-    // this binding doesn't complete layout until the constructor
-    // completes.
-    this.element.dispatchEvent(new this.window.CustomEvent("PluginBindingAttached"));
-  }
-};
--- a/toolkit/mozapps/extensions/Blocklist.jsm
+++ b/toolkit/mozapps/extensions/Blocklist.jsm
@@ -1322,17 +1322,17 @@ var Blocklist = {
           plugin.enabledState = Ci.nsIPluginTag.STATE_DISABLED;
       } else if (!plugin.disabled && state != Ci.nsIBlocklistService.STATE_NOT_BLOCKED) {
         if (state != Ci.nsIBlocklistService.STATE_OUTDATED &&
             state != Ci.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE &&
             state != Ci.nsIBlocklistService.STATE_VULNERABLE_NO_UPDATE) {
           addonList.push({
             name: plugin.name,
             version: plugin.version,
-            icon: "chrome://global/skin/plugins/pluginGeneric.svg",
+            icon: "chrome://mozapps/skin/plugins/pluginGeneric.svg",
             disable: false,
             blocked: state == Ci.nsIBlocklistService.STATE_BLOCKED,
             item: plugin,
             url: await this.getPluginBlockURL(plugin),
           });
         }
       }
     }
--- a/toolkit/mozapps/extensions/test/browser/browser_bug523784.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug523784.js
@@ -6,17 +6,17 @@ const URI_BLOCKLIST_DIALOG = "chrome://m
 // This tests that the blocklist dialog still affects soft-blocked add-ons
 // if the user clicks the "Restart Later" button. It also ensures that the
 // "Cancel" button is correctly renamed (to "Restart Later").
 var args = {
   restart: false,
   list: [{
     name: "Bug 523784 softblocked addon",
     version: "1",
-    icon: "chrome://global/skin/plugins/pluginGeneric.svg",
+    icon: "chrome://mozapps/skin/plugins/pluginGeneric.svg",
     disable: false,
     blocked: false,
     url: "http://example.com/bug523784_1",
   }],
 };
 
 function test() {
   waitForExplicitFinish();
@@ -91,25 +91,25 @@ function bug523784_test2(win) {
   };
   Services.ww.registerNotification(windowObserver);
 
   // Add 2 more addons to the blocked list to check that the more info link
   // points to the general blocked list page.
   args.list.push({
     name: "Bug 523784 softblocked addon 2",
     version: "2",
-    icon: "chrome://global/skin/plugins/pluginGeneric.svg",
+    icon: "chrome://mozapps/skin/plugins/pluginGeneric.svg",
     disable: false,
     blocked: false,
     url: "http://example.com/bug523784_2",
   });
   args.list.push({
     name: "Bug 523784 softblocked addon 3",
     version: "4",
-    icon: "chrome://global/skin/plugins/pluginGeneric.svg",
+    icon: "chrome://mozapps/skin/plugins/pluginGeneric.svg",
     disable: false,
     blocked: false,
     url: "http://example.com/bug523784_3",
   });
 
   args.wrappedJSObject = args;
   Services.ww.openWindow(null, URI_BLOCKLIST_DIALOG, "",
                          "chrome,centerscreen,dialog,titlebar", args);
--- a/toolkit/pluginproblem/content/pluginProblem.xml
+++ b/toolkit/pluginproblem/content/pluginProblem.xml
@@ -13,17 +13,17 @@
 
 <bindings id="pluginBindings"
               xmlns="http://www.mozilla.org/xbl"
               xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
               xmlns:html="http://www.w3.org/1999/xhtml">
 <binding id="pluginProblem" inheritstyle="false" chromeOnlyContent="true" bindToUntrustedContent="true">
     <resources>
         <stylesheet src="chrome://pluginproblem/content/pluginProblemContent.css"/>
-        <stylesheet src="chrome://global/skin/plugins/pluginProblem.css"/>
+        <stylesheet src="chrome://mozapps/skin/plugins/pluginProblem.css"/>
     </resources>
 
     <content>
         <html:div class="mainBox" anonid="main" chromedir="&locale.dir;">
             <html:div class="hoverBox">
                 <html:label>
                     <html:button class="icon" anonid="icon"/>
                     <html:div class="msg msgVulnerabilityStatus" anonid="vulnerabilityStatus"><!-- set at runtime --></html:div>
--- a/toolkit/pluginproblem/content/pluginProblemBinding.css
+++ b/toolkit/pluginproblem/content/pluginProblemBinding.css
@@ -4,34 +4,23 @@
 
 @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
 
 embed:-moz-handler-blocked,
 embed:-moz-handler-crashed,
 embed:-moz-handler-clicktoplay,
 embed:-moz-handler-vulnerable-updatable,
 embed:-moz-handler-vulnerable-no-update,
+applet:-moz-handler-blocked,
+applet:-moz-handler-crashed,
+applet:-moz-handler-clicktoplay,
+applet:-moz-handler-vulnerable-updatable,
+applet:-moz-handler-vulnerable-no-update,
 object:-moz-handler-blocked,
 object:-moz-handler-crashed,
 object:-moz-handler-clicktoplay,
 object:-moz-handler-vulnerable-updatable,
 object:-moz-handler-vulnerable-no-update {
     display: inline-block;
     overflow: hidden;
     opacity: 1 !important;
+    -moz-binding: url('chrome://pluginproblem/content/pluginProblem.xml#pluginProblem') !important;
 }
-
-@supports not -moz-bool-pref("dom.ua_widget.enabled") {
-
-    embed:-moz-handler-blocked,
-    embed:-moz-handler-crashed,
-    embed:-moz-handler-clicktoplay,
-    embed:-moz-handler-vulnerable-updatable,
-    embed:-moz-handler-vulnerable-no-update,
-    object:-moz-handler-blocked,
-    object:-moz-handler-crashed,
-    object:-moz-handler-clicktoplay,
-    object:-moz-handler-vulnerable-updatable,
-    object:-moz-handler-vulnerable-no-update {
-        -moz-binding: url('chrome://pluginproblem/content/pluginProblem.xml#pluginProblem') !important;
-    }
-
-}
--- a/toolkit/pluginproblem/content/pluginProblemContent.css
+++ b/toolkit/pluginproblem/content/pluginProblemContent.css
@@ -3,48 +3,38 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 @namespace html url(http://www.w3.org/1999/xhtml);
 
 /* Do not change this without also changing the appropriate line in
  * browser-plugins.js (near where this file is mentioned). */
 html|object:not([width]), html|object[width=""],
 html|embed:not([width]), html|embed[width=""],
-html|applet:not([width]), html|applet[width=""],
-:host(:not([width])), :host([width=""]) {
+html|applet:not([width]), html|applet[width=""] {
   width: 240px;
 }
 
 /* Do not change this without also changing the appropriate line in
  * browser-plugins.js (near where this file is mentioned). */
 html|object:not([height]), html|object[height=""],
 html|embed:not([height]), html|embed[height=""],
-html|applet:not([height]), html|applet[height=""],
-:host(:not([width])), :host([width=""]) {
+html|applet:not([height]), html|applet[height=""] {
   height: 200px;
 }
 
 :-moz-handler-clicktoplay .mainBox,
 :-moz-handler-vulnerable-updatable .mainBox,
 :-moz-handler-vulnerable-no-update .mainBox,
-:-moz-handler-blocked .mainBox,
-:host(:-moz-handler-clicktoplay) .mainBox,
-:host(:-moz-handler-vulnerable-updatable) .mainBox,
-:host(:-moz-handler-vulnerable-no-update) .mainBox,
-:host(:-moz-handler-blocked) .mainBox {
+:-moz-handler-blocked .mainBox {
   -moz-user-focus: normal;
 }
 :-moz-handler-clicktoplay .mainBox:focus,
 :-moz-handler-vulnerable-updatable .mainBox:focus,
 :-moz-handler-vulnerable-no-update .mainBox:focus,
-:-moz-handler-blocked .mainBox:focus,
-:host(:-moz-handler-clicktoplay) .mainBox:focus,
-:host(:-moz-handler-vulnerable-updatable) .mainBox:focus,
-:host(:-moz-handler-vulnerable-no-update) .mainBox:focus,
-:host(:-moz-handler-blocked) .mainBox:focus {
+:-moz-handler-blocked .mainBox:focus {
   outline: 1px dotted;
 }
 
 .mainBox {
   width: inherit;
   height: inherit;
   overflow: hidden;
   direction: ltr;
@@ -77,20 +67,17 @@ html|applet:not([height]), html|applet[h
 }
 
 .mainBox[chromedir="rtl"] {
   direction: rtl;
 }
 
 :-moz-handler-clicktoplay .hoverBox,
 :-moz-handler-vulnerable-updatable .hoverBox,
-:-moz-handler-vulnerable-no-update .hoverBox,
-:host(:-moz-handler-clicktoplay) .hoverBox,
-:host(:-moz-handler-vulnerable-updatable) .hoverBox,
-:host(:-moz-handler-vulnerable-no-update) .hoverBox {
+:-moz-handler-vulnerable-no-update .hoverBox {
   cursor: pointer;
 }
 
 .hoverBox > label {
   cursor: inherit;
 }
 .icon {
   cursor: inherit;
@@ -102,25 +89,17 @@ html|applet:not([height]), html|applet[h
 
 :-moz-handler-clicktoplay .msgClickToPlay,
 :-moz-handler-vulnerable-updatable .msgVulnerabilityStatus,
 :-moz-handler-vulnerable-updatable .msgCheckForUpdates,
 :-moz-handler-vulnerable-updatable .msgClickToPlay,
 :-moz-handler-vulnerable-no-update .msgVulnerabilityStatus,
 :-moz-handler-vulnerable-no-update .msgClickToPlay,
 :-moz-handler-blocked .msgBlocked,
-:-moz-handler-crashed .msgCrashed,
-:host(:-moz-handler-clicktoplay) .msgClickToPlay,
-:host(:-moz-handler-vulnerable-updatable) .msgVulnerabilityStatus,
-:host(:-moz-handler-vulnerable-updatable) .msgCheckForUpdates,
-:host(:-moz-handler-vulnerable-updatable) .msgClickToPlay,
-:host(:-moz-handler-vulnerable-no-update) .msgVulnerabilityStatus,
-:host(:-moz-handler-vulnerable-no-update) .msgClickToPlay,
-:host(:-moz-handler-blocked) .msgBlocked,
-:host(:-moz-handler-crashed) .msgCrashed {
+:-moz-handler-crashed .msgCrashed {
   display: block;
 }
 
 .submitStatus[status] {
   display: -moz-box;
   -moz-box-align: center;
   -moz-box-pack: center;
   height: 160px;
--- a/toolkit/themes/mobile/jar.mn
+++ b/toolkit/themes/mobile/jar.mn
@@ -43,8 +43,17 @@ toolkit.jar:
   skin/classic/global/media/audioNoAudioButton.svg         (../shared/media/audioNoAudioButton.svg)
   skin/classic/global/media/audioUnmutedButton.svg         (../shared/media/audioUnmutedButton.svg)
   skin/classic/global/media/castingButton-ready.svg        (../shared/media/castingButton-ready.svg)
   skin/classic/global/media/castingButton-active.svg       (../shared/media/castingButton-active.svg)
   skin/classic/global/media/closedCaptionButton-cc-off.svg (../shared/media/closedCaptionButton-cc-off.svg)
   skin/classic/global/media/closedCaptionButton-cc-on.svg  (../shared/media/closedCaptionButton-cc-on.svg)
   skin/classic/global/media/fullscreenEnterButton.svg      (../shared/media/fullscreenEnterButton.svg)
   skin/classic/global/media/fullscreenExitButton.svg       (../shared/media/fullscreenExitButton.svg)
+
+% skin mozapps classic/1.0 %skin/classic/mozapps/
+   skin/classic/mozapps/plugins/pluginProblem.css          (mozapps/plugins/pluginProblem.css)
+
+   skin/classic/mozapps/plugins/contentPluginActivate.png  (mozapps/plugins/contentPluginActivate.png)
+   skin/classic/mozapps/plugins/contentPluginBlocked.png   (mozapps/plugins/contentPluginBlocked.png)
+   skin/classic/mozapps/plugins/contentPluginClose.png     (mozapps/plugins/contentPluginClose.png)
+   skin/classic/mozapps/plugins/contentPluginCrashed.png   (mozapps/plugins/contentPluginCrashed.png)
+   skin/classic/mozapps/plugins/contentPluginStripe.png    (mozapps/plugins/contentPluginStripe.png)
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..eab4439c1352f958dc246074aba6e44609df3f7f
GIT binary patch
literal 307
zc%17D@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpUtU!E?GAr*{oZ<z+MIZCu7h6%^$
zHUD<BkePl!QB_s-;9c3YHu2}>-`}lL|GTOx_E_<`t)@jaD;y>UGKvO3P@}+3qkcga
zj{ltk50v|N95*&I2ycz76qh)}_3mP;+?Pa#xf^aA6Duo>XpLl*cRGGz?x{1EEDM_5
zS?)U>xi6#h?n8t6o{-G2d#vX^_AuBr<;%q-6!fa^IT)6Dt^Cs7iMmNbUuT4#d8YND
zD_!DB@~+R8E%&7Us+6q=4LNWyi$8;Z%MZ^S>E8mE<Stk)a6VyD#Mmu<#b{TL6wqm6
z`?z+_+86W+C>g+bw{!Z1#;P-FLW{0yZ9Qi#eYh~TYw6nuz))cDboFyt=akR{03r~6
AY5)KL
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..9f59b38e0c7c1125be88da76378fe9bea1c2eee2
GIT binary patch
literal 1487
zc$@*x1u*)FP)<h;3K|Lk000e1NJLTq001xm001xu1^@s6R|5Hm000G+Nkl<ZcmdU#
z1B_%@8-{N*&EK|-Rh+C9tmCz9+qTg*ify~AT^QS*wXOHr?8$!VjH*%9ljKQm?)lD(
z!Yz7Vef8BojXUr@`sCB;@_liPxKq@KL9tA15Wq3#SYzf`_Ds`r+6Cr`Q$(fMB(^3A
zd#cbtE0qN@#YG}ckQpL@Cfc)I;0Q4+woGEvd)s#mY;Fn%7hiu_aQw)F+J^p|5gGiM
zHx3+gjx}bOWzSA@hVht<0vY0=$%Y@i_x^&l<%NNv{eIIkkn6>VbG+D?n8@*>(MfQQ
zHD;J)4|~zrNfEp<W~#u?M2j`}@WYRmt$Ow`|G-bZiP3KZ$C89S>_r1DG>r$e;XT~~
ze-J}f_>IL2oBIEnH8>*kac<pdf(BY>O1lvc1Kz)%YJp#gQ6sit#ZwOlxcl9$K9it{
zHXe8x-%+w8TOdociOt{e@h7Y2UwTdmgE4NkSpsc5@WRvilZ8yl6nNBZUO)ee^9Uas
z#blPj11~)BHaQ;K+X6?h!LjV|2Lru1y251Zv6>?A!V_<sg=~8&kRgWLhSwG?XzZ5I
z5TYptPrP4SkZ3dohRL|Q0vCu)pv&5luD@gt4rF^V#L@xYU4P1mD9a+3i;TM}Fi%9?
z;Ibzk^6PGlMI@9?$guSB2Lh%*Ol0h=z{zgtgLmJHxBkeB_H!$w88VQCOs2%iJ1bBw
zHp0r1e1Dgkvw1E+7BabfWSv~#`(mA7aee#$e%;%h!`(MGAPbquMn<xd*%mm41$bxs
z_TDBv`+Kx$E<q-;xtwIS1#S}?U~OF>(4xDnOPd@WqFDm<xgI2DnK)i}+6-h`TOahh
zoZ@y{px7-;TzhGtRhO?$J@y<;*<SqZEt|VpPX&14X)}<CY-X;+7U*>g9fuy!rr~J2
zA*5S`wN!$q%|IrynVDW&V6j*a^?%HYFx+Mc=6DI#QVE_m1DVKXX6D-h>m7lgcoWSU
zZZY`NPykPxflOpGGplTYbq=3~8hP9sYAL{a3c=H6AQRcl%t~8eky{A;F+0-021896
z3gBrokcn(&CSeQoxP_)e4rmMWcr#S<Bu;SwJZ%Otk<HBX*aC%OEkv%lBoNH<Vs%+w
z)KRNT+M8Q8cd(uc-rBmQ15cZQOk^{2MYh1LZeeBE@2k-@H>6FDfT)&Wg(%PV60->&
zcm<3<kZEOIz~^$3*%mnZyY^eV5DC(H4nd~3wr%S+1&*HlW^SceBUaV^=hwZpTt2hr
z24o=<*#sHM`U6`4idlq(MR~qT-DN&)oC}bJOfH`&+1clT6Wzf3@4h!)@?&qJic4sk
zsTQTmLMBt-q@5MW5W`|Mj6d<PuUyR$NGD_%d+b4<%Vj^<+X9Yr+@L;4$4mb3y-1k^
zDkYQ-@FoLUOo4Ov^tDQ_8{U$L*A-^z(#cgI#o&qe=2$dr!uRg!YZW+5ta1!Lbgv(w
zGDK4ZUU<seXS0xPZ@*f6&~4Ipl*`&LIVV`4SHe=nXBj;3!V_;3{^4Z5+-)!=7PXvr
zS~yR)O0f(|W(l<MXg&Y*FrFrSL$Y7)!Y@UiDX~1Fhttb4(A^uuY$ibyZ9MQY;rqxk
z)gL&1C%VN-$L4q}l>f&c4(7>FrqQBlf(BY>>IoaNUU-vXCVpZHTVY++qLD}LuYFN3
zFt1=vkR)Lbd(l7(P3wUt-ZS|l-+k5q^y)Yo&3~z;@L#{~eLmZZzohFnq4EeQ3V>t5
zIo6nAmObo6!|56Boyi~hEQgA&ofs~EW6PF~#lhOzwyQ4kR~~Xu+bh4#i9G*9FA5xU
zjx}bOWzSA@&^{y;KXjiXhA^EWhR{Si)qgcOUKEL?Vnvd$rwEPI{?%aTd|w<TZWMW<
pRZNH_z%l1oV}{uo{j<lu%Ga$V>TY%ACRqRg002ovPDHLkV1kNT&ba^p
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..1b2e94a8085fb1ae0bf8dd4b15883082bc63d084
GIT binary patch
literal 1306
zc$@(m1?BpQP)<h;3K|Lk000e1NJLTq001xm000mO1ONa4`lmEH000ExNkl<ZcmY+^
z19T)=7YFeFeO0aMj&U+^#<m@f=i}P;9<F!n!?kUD<BV+^;lxf?b(ijTt@rm1pLH+c
zclr=4z<9(l(1}AR^_;^$XcKTVa*@oS7T!W1`3~V9J{^ihG|?GPoj8Ev>(2rXf-|{-
zhs?R>+P2gk>m!T~<Yo*>khalFZteHUqj(ekTT}CM-JuXL-n%FxD^q;Sk1KtE<8uX%
z8inVqgJ|#qsi8?2D&$H$f1L&p5LU3ZE%T`Z-(6ypm_Y>jKLgfJO01@3Zq1n<U-o4`
zy8ov-vhZs=ON%pJm>jsw*G86brr*>$^iAoC3T7sNKsm}iR?=xad7UNz+}ED7u(GbP
zzZ=9%3>xM+TDP#GV*uZW2woQ)IJc^{Aq&5aW*Wpt>*rPl2h%z@9%>u0Ui3Bwf=;U=
zrnjYigJ>IthX4u>u%5qjTWiaAMY^81`AU#6B&sssHfC0hN_%&X{HPf~#VsW*O(jbV
zZDwVi3G|nD%s0bRHjnD};Q}i7A!NS3!B(4B`VD;<`n;f+;2M`<E*A-LPYL;6L4{}9
zi>rGr%Zy6glA94dB&IUo7Z(im*~Qi8+EIubt7|G6d)d~#nL7*8JOe!2=gX;DFvt~+
zH8r@A=btlcR9)CcAZ`u&wV2>qmp57q8=_XdXkfm;xGh&<pAF@2)j9%6J7!nrDsio~
zGxl~FWLI6qc;psG+As6$3bVnRwL5oPkt?n9)Wicl47<1id1B&0!0z@fGu7@u!dk3#
z`C?j|R{M2{?ft+cf#fqGfbH{rbGEDPfh1pCbM3SPT^ciRE`(&tJZUh%m#rC9;RbKE
zoYr+}@}XV}5vNRKAf?$uHk>64wJR#o7u(vnQqcw5WH)&!ML>rQatJ^G1jXkUEI>>k
zwh?yPogyG4r>8esaXJ&oa{3!&!giJ*77|4$9=G94&$eJ<ftDcw2*`t@w#;!Zr!R7f
zT{AQMBts1GQX}d{`AD!dF!Ho=TJK4{-jlsAH^l`BVvLL{Xiha4K%BZxQDR#f)y_cD
zdMOYF2q`MA3O<t85AqOi<s5HZOYPJ{b9V+KOYE4L>V=$}%7?IJVH)ItV%q{at^35d
z!_%sadT-9&+*D$DVLB>tV1giuRo4W3F)j5gTu+D8jzHo%mp=rWBw?RG>9Dw>tTv%(
zt+mq+bZgbY+#SI-!_sMf_K;XA!~2=p`KcWu)Yo-l;-Ox%&YD&kuC)wZ6s2Zn@dx;6
zuqWH6Nuh9S!wQ#<9@o=au*0-%%25V+@G}AWovn-KZ435TcBc-Tz*3H<4@z{|+@v4f
z?*Qr=_14)Hk#_E}!2pX4Xyl98QK)?2TLygfK>PJ;di8FbbP3ELiV7RT9lI<l;j{n0
zDgb^j>1gS!De0Xy5d;LG+MJY8GArpYzlR7~>EF9OZ%SIv?+;I?mnLOw&r|mBN;qCm
z*!_$@Enb(w%!rg;Z+gPBO2Tfu{ztNt`6lCkXS*vJoi97wThMQ4jO%NB>@fj{>Y``(
zk=ojy8;%*k7}uio%nZCp>wE^__)5lI)(sbo14e^~I8~qG9w1Af(%b(tfxpsqGUoFr
zBtb?qj!~(*1^=LB;trlg>2PxmZN)pjI{d>|DOieeNQMiIID{Ym-vl^*0VAwcQ^lC<
Q@&Et;07*qoM6N<$g6QCC`Tzg`
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..1c0d5b32c78af1a1e5c27961012ec1aa2fe394b7
GIT binary patch
literal 1229
zc$@*v1Ty=HP)<h;3K|Lk000e1NJLTq001xm001xu1^@s6R|5Hm000D(Nkl<ZcmeI&
z1FR%V7r^mvukYF(d=G2e>Y2yuXWO=I+x82d&9!aYw)sEFNiwNH*Gw+@CELkwx6^e_
zRh>cYboKu4@ZrP%X-5mFXz`9pDh=t#K&FKZjZf2jlxklVhYp4eWFZ$-Pz^Oy%?LGA
zHB`~~EX_|V<-RJ}7Lb8#R7GtxKoj^7h{31r4K%*0=4YzX=qtmvfHY)jV%-A=4h%k=
z#3AvLr};UmH2TUy8eETb<ZAVP`ndzo;v@Wo(U^lZ*a<n7XxqcclRW6FhtlaQSLfz>
zWS|NfpjnE8Hq-nXsx<nlf()BgCmS{4NBa~9?SKI4s{lHr*jIb_Q4`s*RwZ-QsfLDV
zj-GUK4erNF_(VG&hACKpl^CmSw;@DcFSJBZ=y|Uc`|7E4X^3jERwZ-QsgGmO2_ZVU
z5I5mryrP|di@z`mlkkhSU4_2nh0zV|l$?iC>?@>mIR^F3RmpwT@xtM<Dw(U!K`)E7
zDw(U!elLr)DrKS?nxG9q`)~jUJ>~%R$sBdA)xg~O12y17M}l@^zenwsIl_k;W&r_o
z*7bN_B8LtgS~FzGkXO$?|NQGNzx?v+M~xcw2G=%dyDNzuK79D=k}u@kGJmJc5dpJ+
znh^zT$KH4tXmyVsJuW2n6oe4QsT`N;B=#n9@ZiA}j^kVskuOe>YtrVDzdfRWn(+$Q
ziaqiC^Ups|>7d=wLG?g*>eQ)kneirG?dQyVJr7BnOa4}y0ybe+JU*W<Uk7Y~K*Yba
zJxWSS&NJgp{rdGg!^j8cT$47J{7p6mY{1TVg2CX4`uik+dZ@2ObU5?OGfy|;O?*@e
zjeKy<weH=!=ey)@uqj|Iw#UOq=pLPb-<Uv$i4!M2WyYKM!ap3ZfMLUiJ>ZhR)~0|}
z*cuOCv<3b9_aC4?umY+Dul@;qiI+)?Oa7ev{QQvl5t3`t=90h4rhw(xln4XO9x-CX
zO+`gTeJ;A_qW+U7PrjFH^R?ZT#Eu<1_72Gva&DQw+@^pf*x*r1YzkP2bsn|Qrhs`~
zW>dgyFS99NMrmPHnj}iIPn!a!q+;vVtzZBC`|tN&cinZDUwY}K7t>b>idD%~S6y|9
zv`LJ_raF#I0TYw4apT4h`9*pexrI0xVK^9Qa1hp*LdlWbWXH29V63gpn>T-ym6dgd
z{<0i|KIny>;BUaV)<<JckzC%5&ypF_rhrkl9)0xDYstxngFelgHS05O+_-DktXcEe
z&Ye3y*t>V{7lQNm<l2M@6Rz?5{ZfE%Q1HPAAKaSEm^K9rv-Rq$uU=119-P602Vcz>
z_7}GtiQ#*21vw$)fBNaCHzzZuO#y>#vCZ-G;>C-f-nMPqyViM%oVS-RU;do*kxZUZ
zK+Idpzr4)2rHpw~|C^V^x~Vs}Retg^b6X{9V{6NnEl(2oy%)*c%#E$6twpp&PdGRk
zdB~3;&t%4yLSCNE!9h=*o3XWMZ0>46GqgcRbgp0>buP`|H#c|fAL>;Y_lJJAk5wyx
r`(sy^2iqRt^5FaE|CR7~0p526F`U5fBRdw_00000NkvXXu0mjf;;(Le
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..529828dc9ec091f36ec6e10d06cb99923cf4ddcc
GIT binary patch
literal 1591
zc$@(@2FUq|P)<h;3K|Lk000e1NJLTq001xm001xu1^@s6R|5Hm000I4Nkl<ZcmdU#
z1B@hj6o)T3D_DCsI@`7#`+VWrHp8_V<JNd)ZQDEM+P2@9^#AhGsa8!*C!6F;I#uue
z(AEQY@7}$y`TxSz>o=OpQ^HrmaKR_670QK1;4;TJ7oPc=ou>LWwZKEdZ$g%EP&kq#
z>|~>XRw@fTBK#-pAc#ZkL=)}iF7TPKK{y=2!Q&@Sty;8XS<bK#qcXn#@fY87FT9lB
zv2(W);4;TJ#|*RVSm<oPqd5vZEKG<rym<M_E?*#&`ObSEgj%(3x1d#<cBQS`v?~cy
ztTD%#VU`_s(Xc3j*TYT~Xelhv2A8j1E1NZUUS@|*T}oBx;$$#o&_D~#h!TtNZfb$f
z!g?)SURhQ6!b`8_i@6D1)I^HWLQ}L0B1+)h$!>wR!X_owICJ*g47vGBO>l=PMjH>j
zl<y|8BwOIo@J)CKu3Wob)2H9S46Z56niD+m!qfPZg-pp5n5>o?`VSnOlJL3&o_MPq
zQxYxknOTDAv*r+<yG&s!!4q$tg>3N(JS?m?3uP6R1#-VEu`npY;M?zh%xX$GcE9`n
zr|hssQRI2N_m!0wr~(_v7^}cP!a=xn<?4QUX2`P;E<(7lxFn04c;x7@>2^x6GiuDZ
zbTsk{i?h(Q@_P39m+~abUXzQA(F!~yY%_y1XU|I$69fx193#9Eq=cG{53?q`(J3e@
z$&BVVW7gbs<+q(%!K%QoX6XFI%iBA2>|z<{haZ2=G{#mX?1VQOXj|=&g-mMpSE~XU
z!U6CFLm3#w2~f|hqJBi25}X?uWf#p@o@7$<8Ic8^QlbrSzx%#Fyqs@ED@u$VpBAS?
z!aE$-I~Ej>iEL(v%(}o=M)3H_)5}`5)?)TcI1%1JCbFsBuXKSSLL)3(yo3i+AxlY=
zsAE@AM+r<J+DxM1flTsNJX7rt)df7}guG|>hL`dZ0pZbO$9todh!&n5b`$j>6WNr8
zR~J}mPJH*n&snB`6D1r95BX$MIxBU7eL@2~|Kck_8O}`>2~;50Hn(IgI#zIw8D{Nx
zkWFdr(ghj}9XfTjB@V4x>k`)CnX#)+Hl<gs3)CBAh`Ue74iYY3p3f;zWAqd?oMXnW
zKG~FBl`gQ?oRFI-U@LqZ>+qH(+Sn^WHl?*w7g%9V$O9#lo6Di_HQ-Q*T(T*h6}o`S
zJYx(QKGGdt2quCA$qR?CW?xY~V$>K<v~wJ1H&Gulkxgm1b%DX=guIaPo+Q_S@Z8_?
zz=;xMl581jf3Pm_r8#lz#K|R?%2FT}2+FgH+bWp6Gj(%5ky(zL*;tV2*ojk1)b5v&
zZ|16mT14M^=lvX7#|kgkp4;pwsz&JW3GQ$_PKh9y$Yyqgr*#4F7*Ss!$SY+iO88Ks
z;cb+N>PaRw@3s0o@Us~>fAP|0dCoOrevN$S@Wcqujz1Q$t^l;Hb~<+I8YGjN{l%)l
z!@>rk2IkCjxx_4J6`-J~)NAI1%0$Ckl&Ca1`GqBERvKiOF?)_n`E7{ykrMtegYrRo
zhrDp)SlkLcpiGIR!|M|Arp|>1;nB46A_G}efj{GYt+LV#?<=byEVqJBW3CzbN`%J>
zran8cD;gekOZzl<@7cFMpu(?=_q7UqB2*iu&z$YX0Krs(=d>BK+&T-{68&m%yjha(
zD9if|800e7bSl6LPrOz5iOGJsTck?t?a`}`DUs8h;L)pZe>a{gd{MGr?m`=3l@ckR
zF>8*iRcmugI3C`IHXe8>Uoy0@`vXTuVYyIc*jrW}kgpv1KGW}1c(l;myT8n@z3?W3
z6F)KKYhig>+r~8|FED=0ZQde2cF{l!P3?gv-cJ6=HwIyiygF{o@dw>+zWr_nH@^hZ
zMY1*KI5W($!!8<1(=gh}ANe#N3(G7FD~_HxxoF|yrCxc@K2Ls9^~kr%S?xP^2>_Ql
z#yMt~WyeAX?T=FNL-!xTdQ2T+J(_5z`mY8*3T~lHs7w-e+-RiwuLf2;C43?D7v>5J
pg{{JV;4;TJ#|*Ph{n_Kb<{mmNm34OJ19AWW002ovPDHLkV1jE#0vP}R
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7fda316f34328cf3f36beda57b460f31a5cd8df1
GIT binary patch
literal 285
zc%17D@N?(olHy`uVBq!ia0vp^HXzKw1|+Ti+$;i8jKx9jP7LeL$-D$|u6w#ThEy=V
zy~xPM<jBzauyIM~w5XN?aSALNZ~x|BW!c{lF|+f(?LX$4xX9g=^N!!Tw9q-ze8Y0T
z8;Um)nt8t^AM`uOCY`e(zKZSlZPw}>?xnRa4Ucb*Sgv#^E^E8eA-x9Phy!9e57=(p
zwNGG--q4^6;wEs5ZD8fT(Zrf_kZBu{!VxVXVL7YB^ST=wRL}3*ecf#CMzGxn?V5Pa
mK&}aElFh!(mwWouUWV3hQ-51j-dhaxB7>)^pUXO@geCxs2yK%9
new file mode 100644
--- /dev/null
+++ b/toolkit/themes/mobile/mozapps/plugins/pluginProblem.css
@@ -0,0 +1,195 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+@namespace html url(http://www.w3.org/1999/xhtml);
+
+/* These styles affect only the bound element, not other page content. */
+.mainBox {
+  font: message-box;
+  font-size: 12px;
+  text-align: center;
+  display: table;
+  width: 100%;
+  height: 100%;
+  background-color: rgb(72,72,72);
+  color: white;
+  -moz-user-select: none;
+}
+
+.hoverBox {
+  display: table-cell;
+  box-sizing: border-box;
+  padding: 5px;
+  vertical-align: middle;
+  width: 100%;
+  height: 100%;
+}
+:-moz-handler-vulnerable-updatable .hoverBox:active,
+:-moz-handler-vulnerable-no-update .hoverBox:active,
+:-moz-handler-clicktoplay .hoverBox:active {
+  background-color: rgb(65, 65, 65);
+}
+
+:-moz-handler-clicktoplay .hoverBox:active .msgTapToPlay,
+:-moz-handler-clicktoplay .hoverBox:active .msgClickToPlay,
+:-moz-handler-vulnerable-updatable .hoverBox:active .msgTapToPlay,
+:-moz-handler-vulnerable-updatable .hoverBox:active .msgClickToPlay,
+:-moz-handler-vulnerable-no-update .hoverBox:active .msgTapToPlay,
+:-moz-handler-vulnerable-no-update .hoverBox:active .msgClickToPlay {
+  color: red;
+}
+
+:-moz-handler-vulnerable-updatable .hoverBox,
+:-moz-handler-vulnerable-no-update .hoverBox,
+:-moz-handler-blocked .hoverBox,
+:-moz-handler-crashed .hoverBox {
+  background-image: url(chrome://mozapps/skin/plugins/contentPluginStripe.png);
+}
+
+html|a {
+  color: white;
+}
+
+.icon {
+  width: 48px;
+  height: 48px;
+  background-position: center;
+  background-repeat: no-repeat;
+  border: none;
+  background-color: transparent;
+  -moz-user-focus: ignore;
+  margin-bottom: 6px;
+}
+
+:-moz-handler-vulnerable-updatable .icon,
+:-moz-handler-vulnerable-no-update .icon {
+  background-image: url(chrome://mozapps/skin/plugins/contentPluginBlocked.png);
+  -moz-user-focus: normal;
+}
+:-moz-handler-blocked .icon {
+  background-image: url(chrome://mozapps/skin/plugins/contentPluginBlocked.png);
+}
+:-moz-handler-clicktoplay .icon {
+  background-image: url(chrome://mozapps/skin/plugins/contentPluginActivate.png);
+  -moz-user-focus: normal;
+}
+:-moz-handler-crashed .icon {
+  background-image: url(chrome://mozapps/skin/plugins/contentPluginCrashed.png);
+}
+
+.throbber {
+  padding-left: 16px; /* width of the background image */
+  background: url(chrome://global/skin/icons/loading.png) no-repeat;
+  margin-left: 5px;
+}
+
+.msgTapToPlay,
+.msgClickToPlay {
+  text-decoration: underline;
+}
+
+@media (-moz-touch-enabled: 0) {
+  :-moz-handler-clicktoplay .msgTapToPlay {
+    display: none;
+  }
+}
+
+@media (-moz-touch-enabled) {
+  :-moz-handler-clicktoplay .msgClickToPlay {
+    display: none;
+  }
+}
+
+.submitStatus div {
+  min-height: 19px; /* height of biggest line (with throbber) */
+}
+
+.submitComment {
+  width: 340px;
+  height: 70px;
+  padding: 5px;
+  border: none;
+  border-radius: 5px;
+  resize: none;
+  font-family: inherit;
+  font-size: inherit;
+}
+
+.submitURLOptInBox {
+  text-align: start;
+}
+
+.submitURLOptIn {
+  margin-left: -1px;
+}
+
+.mainBox[chromedir="rtl"] .submitURLOptIn {
+  margin-left: 0;
+  margin-right: -1px;
+}
+
+.submitButtonBox {
+  margin-top: 7px;
+}
+
+.submitButton {
+  float: right;
+}
+
+.mainBox[chromedir="rtl"] .submitButton {
+  float: left;
+}
+
+.helpIcon {
+  display: inline-block;
+  min-width: 16px;
+  min-height: 16px;
+  background: url(chrome://mozapps/skin/plugins/pluginHelp-16.png) no-repeat;
+  cursor: pointer;
+  float: left;
+}
+
+.mainBox[chromedir="rtl"] .helpIcon {
+  float: right;
+}
+
+.closeIcon {
+  display: block;
+  width: 16px;
+  height: 16px;
+  margin-top: 4px;
+  margin-inline-start: -20px;
+  margin-inline-end: 4px;
+  border: none;
+  background-color: transparent;
+  background-image: url("chrome://mozapps/skin/plugins/contentPluginClose.png");
+  background-repeat: no-repeat;
+}
+
+.closeIcon:hover {
+  background-position: -16px 0;
+}
+
+.closeIcon:hover:active {
+  background-position: -32px 0;
+}
+
+.action-link {
+  display: inline-block;
+  border-radius: 10px;
+  background-color: rgb(35, 35, 35);
+  padding: 2px 8px;
+  margin-top: 7px;
+  text-decoration: none;
+}
+.action-link:active {
+  background-color: rgb(20, 20, 20);
+}
+
+:-moz-handler-vulnerable-updatable .action-link {
+  background-color: #a81b0c;
+}
+:-moz-handler-vulnerable-updatable .action-link:active {
+  background-color: #801409;
+}
--- a/toolkit/themes/osx/global/jar.mn
+++ b/toolkit/themes/osx/global/jar.mn
@@ -60,9 +60,8 @@ toolkit.jar:
   skin/classic/global/icons/error-16.png                             (icons/error-16.png)
   skin/classic/global/icons/error-64.png                             (icons/error-64.png)
   skin/classic/global/icons/question-16.png                          (icons/question-16.png)
   skin/classic/global/icons/question-64.png                          (icons/question-64.png)
   skin/classic/global/icons/sslWarning.png                           (icons/sslWarning.png)
 * skin/classic/global/in-content/common.css                          (in-content/common.css)
 * skin/classic/global/in-content/info-pages.css                      (in-content/info-pages.css)
   skin/classic/global/tree/columnpicker.gif                          (tree/columnpicker.gif)
-  skin/classic/global/plugins/pluginHelp-16.png                      (plugins/pluginHelp-16.png)
deleted file mode 100644
index e46cb06afda977605118473bb72c1e9a24243693..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/toolkit/themes/osx/mozapps/jar.mn
+++ b/toolkit/themes/osx/mozapps/jar.mn
@@ -9,12 +9,13 @@ toolkit.jar:
   skin/classic/mozapps/extensions/discover-logo.png               (extensions/discover-logo.png)
   skin/classic/mozapps/extensions/rating-won.png                  (extensions/rating-won.png)
   skin/classic/mozapps/extensions/rating-not-won.png              (extensions/rating-not-won.png)
   skin/classic/mozapps/extensions/cancel.png                      (extensions/cancel.png)
   skin/classic/mozapps/extensions/toolbarbutton-dropmarker.png    (extensions/toolbarbutton-dropmarker.png)
   skin/classic/mozapps/extensions/heart.png                       (extensions/heart.png)
 * skin/classic/mozapps/extensions/extensions.css                  (extensions/extensions.css)
   skin/classic/mozapps/extensions/blocklist.css                   (extensions/blocklist.css)
+  skin/classic/mozapps/plugins/pluginHelp-16.png                  (plugins/pluginHelp-16.png)
   skin/classic/mozapps/profile/profileSelection.css               (profile/profileSelection.css)
   skin/classic/mozapps/update/buttons.png                         (update/buttons.png)
 * skin/classic/mozapps/update/updates.css                         (update/updates.css)
   skin/classic/mozapps/handling/handling.css                      (handling/handling.css)
rename from toolkit/themes/windows/global/plugins/pluginHelp-16.png
rename to toolkit/themes/osx/mozapps/plugins/pluginHelp-16.png
--- a/toolkit/themes/shared/extensions/extensions.inc.css
+++ b/toolkit/themes/shared/extensions/extensions.inc.css
@@ -357,17 +357,17 @@ button.warning {
   list-style-image: url("chrome://mozapps/skin/extensions/themeGeneric.svg");
 }
 
 .addon-view[type="locale"] .icon {
   list-style-image: url("chrome://mozapps/skin/extensions/localeGeneric.svg");
 }
 
 .addon-view[type="plugin"] .icon {
-  list-style-image: url("chrome://global/skin/plugins/pluginGeneric.svg");
+  list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric.svg");
 }
 
 .addon-view[type="dictionary"] .icon {
   list-style-image: url("chrome://mozapps/skin/extensions/dictionaryGeneric.svg");
 }
 
 .addon-view[type="experiment"] .icon {
   list-style-image: url("chrome://mozapps/skin/extensions/experimentGeneric.svg");
--- a/toolkit/themes/shared/jar.inc.mn
+++ b/toolkit/themes/shared/jar.inc.mn
@@ -91,15 +91,8 @@ toolkit.jar:
   skin/classic/global/media/pauseButton.svg                (../../shared/media/pauseButton.svg)
   skin/classic/global/media/playButton.svg                 (../../shared/media/playButton.svg)
   skin/classic/global/media/error.png                      (../../shared/media/error.png)
   skin/classic/global/media/throbber.png                   (../../shared/media/throbber.png)
   skin/classic/global/media/stalled.png                    (../../shared/media/stalled.png)
 #ifdef MOZ_PLACES
   skin/classic/mozapps/places/defaultFavicon.svg           (../../shared/places/defaultFavicon.svg)
 #endif
-  skin/classic/global/plugins/plugin.svg                    (../../shared/plugins/plugin.svg)
-  skin/classic/global/plugins/plugin-blocked.svg            (../../shared/plugins/plugin-blocked.svg)
-  skin/classic/global/plugins/pluginGeneric.svg             (../../shared/extensions/category-plugins.svg)
-  skin/classic/global/plugins/pluginProblem.css             (../../shared/plugins/pluginProblem.css)
-  skin/classic/global/plugins/contentPluginBlocked.png      (../../shared/plugins/contentPluginBlocked.png)
-  skin/classic/global/plugins/contentPluginCrashed.png      (../../shared/plugins/contentPluginCrashed.png)
-  skin/classic/global/plugins/contentPluginStripe.png       (../../shared/plugins/contentPluginStripe.png)
--- a/toolkit/themes/shared/mozapps.inc.mn
+++ b/toolkit/themes/shared/mozapps.inc.mn
@@ -18,21 +18,28 @@
 
   skin/classic/mozapps/extensions/extensionGeneric-16.svg    (../../shared/extensions/extensionGeneric-16.svg)
   skin/classic/mozapps/extensions/utilities.svg              (../../shared/extensions/utilities.svg)
   skin/classic/mozapps/extensions/alerticon-warning.svg      (../../shared/extensions/alerticon-warning.svg)
   skin/classic/mozapps/extensions/alerticon-error.svg        (../../shared/extensions/alerticon-error.svg)
   skin/classic/mozapps/extensions/alerticon-info-positive.svg (../../shared/extensions/alerticon-info-positive.svg)
   skin/classic/mozapps/extensions/alerticon-info-negative.svg (../../shared/extensions/alerticon-info-negative.svg)
   skin/classic/mozapps/extensions/category-legacy.svg        (../../shared/extensions/category-legacy.svg)
+  skin/classic/mozapps/plugins/plugin.svg                    (../../shared/plugins/plugin.svg)
+  skin/classic/mozapps/plugins/plugin-blocked.svg            (../../shared/plugins/plugin-blocked.svg)
+  skin/classic/mozapps/plugins/pluginGeneric.svg             (../../shared/extensions/category-plugins.svg)
+  skin/classic/mozapps/plugins/pluginProblem.css             (../../shared/plugins/pluginProblem.css)
   skin/classic/mozapps/aboutNetworking.css                   (../../shared/aboutNetworking.css)
 #ifndef ANDROID
   skin/classic/mozapps/aboutProfiles.css                     (../../shared/aboutProfiles.css)
 #endif
   skin/classic/mozapps/aboutServiceWorkers.css               (../../shared/aboutServiceWorkers.css)
+  skin/classic/mozapps/plugins/contentPluginBlocked.png      (../../shared/plugins/contentPluginBlocked.png)
+  skin/classic/mozapps/plugins/contentPluginCrashed.png      (../../shared/plugins/contentPluginCrashed.png)
+  skin/classic/mozapps/plugins/contentPluginStripe.png       (../../shared/plugins/contentPluginStripe.png)
 
-% override chrome://mozapps/skin/extensions/category-plugins.svg          chrome://global/skin/plugins/pluginGeneric.svg
+% override chrome://mozapps/skin/extensions/category-plugins.svg          chrome://mozapps/skin/plugins/pluginGeneric.svg
 % override chrome://mozapps/skin/extensions/category-extensions.svg       chrome://mozapps/skin/extensions/extensionGeneric.svg
 % override chrome://mozapps/skin/extensions/category-languages.svg        chrome://mozapps/skin/extensions/localeGeneric.svg
 % override chrome://mozapps/skin/extensions/category-themes.svg           chrome://mozapps/skin/extensions/themeGeneric.svg
 % override chrome://mozapps/skin/extensions/category-dictionaries.svg chrome://mozapps/skin/extensions/dictionaryGeneric.svg
 % override chrome://mozapps/skin/extensions/localeGeneric.svg         chrome://mozapps/skin/extensions/dictionaryGeneric.svg
 % override chrome://mozapps/skin/extensions/category-experiments.svg  chrome://mozapps/skin/extensions/experimentGeneric.svg
--- a/toolkit/themes/shared/non-mac.jar.inc.mn
+++ b/toolkit/themes/shared/non-mac.jar.inc.mn
@@ -21,22 +21,22 @@
   skin/classic/global/arrow/panelarrow-vertical.svg        (../../windows/global/arrow/panelarrow-vertical.svg)
 
 * skin/classic/global/dirListing/dirListing.css            (../../windows/global/dirListing/dirListing.css)
   skin/classic/global/icons/error-16.png                   (../../windows/global/icons/error-16.png)
   skin/classic/global/icons/question-16.png                (../../windows/global/icons/question-16.png)
   skin/classic/global/icons/question-64.png                (../../windows/global/icons/question-64.png)
   skin/classic/global/icons/search-textbox.svg             (../../windows/global/icons/search-textbox.svg)
   skin/classic/global/tree/columnpicker.gif                (../../windows/global/tree/columnpicker.gif)
-  skin/classic/global/plugins/pluginHelp-16.png            (../../windows/global/plugins/pluginHelp-16.png)
 
   skin/classic/mozapps/downloads/downloadButtons.png         (../../windows/mozapps/downloads/downloadButtons.png)
   skin/classic/mozapps/downloads/unknownContentType.css      (../../windows/mozapps/downloads/unknownContentType.css)
   skin/classic/mozapps/extensions/blocklist.css              (../../windows/mozapps/extensions/blocklist.css)
   skin/classic/mozapps/extensions/discover-logo.png          (../../windows/mozapps/extensions/discover-logo.png)
   skin/classic/mozapps/extensions/rating-won.png             (../../windows/mozapps/extensions/rating-won.png)
   skin/classic/mozapps/extensions/rating-not-won.png         (../../windows/mozapps/extensions/rating-not-won.png)
   skin/classic/mozapps/extensions/cancel.png                 (../../windows/mozapps/extensions/cancel.png)
   skin/classic/mozapps/handling/handling.css                 (../../windows/mozapps/handling/handling.css)
+  skin/classic/mozapps/plugins/pluginHelp-16.png             (../../windows/mozapps/plugins/pluginHelp-16.png)
   skin/classic/mozapps/profile/profileSelection.css          (../../windows/mozapps/profile/profileSelection.css)
   skin/classic/mozapps/update/downloadButtons.png            (../../windows/mozapps/update/downloadButtons.png)
 
 % override chrome://mozapps/skin/xpinstall/xpinstallItemGeneric.png       chrome://mozapps/skin/extensions/extensionGeneric.svg
--- a/toolkit/themes/shared/plugins/pluginProblem.css
+++ b/toolkit/themes/shared/plugins/pluginProblem.css
@@ -27,38 +27,30 @@
   display: table-cell;
   box-sizing: border-box;
   padding: 5px;
   vertical-align: middle;
   width: 100%;
   height: 100%;
 }
 :-moz-handler-vulnerable-updatable .hoverBox:active,
-:-moz-handler-vulnerable-no-update .hoverBox:active,
-:host(:-moz-handler-vulnerable-updatable) .hoverBox:active,
-:host(:-moz-handler-vulnerable-no-update) .hoverBox:active {
+:-moz-handler-vulnerable-no-update .hoverBox:active {
   background-color: rgb(65, 65, 65);
 }
 
 :-moz-handler-vulnerable-updatable .hoverBox:active .msgClickToPlay,
-:-moz-handler-vulnerable-no-update .hoverBox:active .msgClickToPlay,
-:host(:-moz-handler-vulnerable-updatable) .hoverBox:active .msgClickToPlay,
-:host(:-moz-handler-vulnerable-no-update) .hoverBox:active .msgClickToPlay {
+:-moz-handler-vulnerable-no-update .hoverBox:active .msgClickToPlay {
   color: red;
 }
 
 :-moz-handler-vulnerable-updatable .hoverBox,
 :-moz-handler-vulnerable-no-update .hoverBox,
 :-moz-handler-blocked .hoverBox,
-:-moz-handler-crashed .hoverBox,
-:host(:-moz-handler-vulnerable-updatable) .hoverBox,
-:host(:-moz-handler-vulnerable-no-update) .hoverBox,
-:host(:-moz-handler-blocked) .hoverBox,
-:host(:-moz-handler-crashed) .hoverBox {
-  background-image: url(chrome://global/skin/plugins/contentPluginStripe.png);
+:-moz-handler-crashed .hoverBox {
+  background-image: url(chrome://mozapps/skin/plugins/contentPluginStripe.png);
 }
 
 html|a {
   color: white;
 }
 
 .icon {
   width: 48px;
@@ -69,53 +61,47 @@ html|a {
   border: none;
   background-color: transparent;
   -moz-user-focus: ignore;
   margin-bottom: 6px;
   -moz-context-properties: fill;
 }
 
 :-moz-handler-vulnerable-updatable .icon,
-:-moz-handler-vulnerable-no-update .icon,
-:host(:-moz-handler-vulnerable-updatable) .icon,
-:host(:-moz-handler-vulnerable-no-update) .icon {
-  background-image: url(chrome://global/skin/plugins/contentPluginBlocked.png);
+:-moz-handler-vulnerable-no-update .icon {
+  background-image: url(chrome://mozapps/skin/plugins/contentPluginBlocked.png);
   -moz-user-focus: normal;
 }
-:-moz-handler-blocked .icon,
-:host(:-moz-handler-blocked) .icon {
-  background-image: url(chrome://global/skin/plugins/contentPluginBlocked.png);
+:-moz-handler-blocked .icon {
+  background-image: url(chrome://mozapps/skin/plugins/contentPluginBlocked.png);
 }
-:-moz-handler-clicktoplay .icon,
-:host(:-moz-handler-clicktoplay) .icon {
-  background-image: url(chrome://global/skin/plugins/plugin.svg);
+:-moz-handler-clicktoplay .icon {
+  background-image: url(chrome://mozapps/skin/plugins/plugin.svg);
   fill: var(--grey-10);
   -moz-user-focus: normal;
 }
-:-moz-handler-crashed .icon,
-:host(:-moz-handler-crashed) .icon {
-  background-image: url(chrome://global/skin/plugins/contentPluginCrashed.png);
+:-moz-handler-crashed .icon {
+  background-image: url(chrome://mozapps/skin/plugins/contentPluginCrashed.png);
 }
 
 .throbber {
   padding-left: 16px; /* width of the background image */
   background: url(chrome://global/skin/icons/loading.png) no-repeat;
   margin-left: 5px;
 }
 
 @media (min-resolution: 1.1dppx) {
   .throbber {
     background-image: url(chrome://global/skin/icons/loading@2x.png);
     background-size: 16px;
   }
 }
 
 /* on desktop, don't ever show the tap-to-play UI: that is for mobile only */
-:-moz-handler-clicktoplay .msgTapToPlay,
-:host(:-moz-handler-clicktoplay) .msgTapToPlay {
+:-moz-handler-clicktoplay .msgTapToPlay {
   display: none;
 }
 
 .submitStatus div {
   min-height: 19px; /* height of biggest line (with throbber) */
 }
 
 .submitComment {
@@ -153,17 +139,17 @@ html|a {
 .mainBox[chromedir="rtl"] .submitButton {
   float: left;
 }
 
 .helpIcon {
   display: inline-block;
   min-width: 16px;
   min-height: 16px;
-  background: url(chrome://global/skin/plugins/pluginHelp-16.png) no-repeat;
+  background: url(chrome://mozapps/skin/plugins/pluginHelp-16.png) no-repeat;
   cursor: pointer;
   float: left;
 }
 
 .mainBox[chromedir="rtl"] .helpIcon {
   float: right;
 }
 
@@ -199,75 +185,63 @@ html|a {
   padding: 2px 8px;
   margin-top: 7px;
   text-decoration: none;
 }
 .action-link:active {
   background-color: rgb(20, 20, 20);
 }
 
-:-moz-handler-vulnerable-updatable .action-link,
-:host(:-moz-handler-vulnerable-updatable) .action-link {
+:-moz-handler-vulnerable-updatable .action-link {
   background-color: #a81b0c;
 }
-:-moz-handler-vulnerable-updatable .action-link:active,
-:host(:-moz-handler-vulnerable-updatable) .action-link:active {
+:-moz-handler-vulnerable-updatable .action-link:active {
   background-color: #801409;
 }
 
 /* New Photon styling
  *
  * At the moment, these rules are written to only override
  * :-moz-handler-clicktoplay styling. Once we finish the
  * redesign for all cases, we can change the CSS directly
  * above instead of writing these super-specific rules.
  */
-:-moz-handler-clicktoplay .mainBox,
-:host(:-moz-handler-clicktoplay) .mainBox {
+:-moz-handler-clicktoplay .mainBox {
   background-color: var(--grey-70);
 }
 
-:-moz-handler-clicktoplay .msgClickToPlay,
-:host(:-moz-handler-clicktoplay) .msgClickToPlay {
+:-moz-handler-clicktoplay .msgClickToPlay {
   font-size: 13px;
 }
 
-:-moz-handler-clicktoplay .mainBox[sizing=blank] .hoverBox,
-:host(:-moz-handler-clicktoplay) .mainBox[sizing=blank] .hoverBox {
+:-moz-handler-clicktoplay .mainBox[sizing=blank] .hoverBox {
   visibility: hidden;
 }
 
-:-moz-handler-clicktoplay .mainBox[sizing=tiny] .icon,
-:host(:-moz-handler-clicktoplay) .mainBox[sizing=tiny] .icon {
+:-moz-handler-clicktoplay .mainBox[sizing=tiny] .icon {
   width: 16px;
   height: 16px;
 }
 
-:-moz-handler-clicktoplay .mainBox[sizing=reduced] .icon,
-:host(:-moz-handler-clicktoplay) .mainBox[sizing=reduced] .icon {
+:-moz-handler-clicktoplay .mainBox[sizing=reduced] .icon {
   width: 32px;
   height: 32px;
 }
 
 :-moz-handler-clicktoplay .mainBox[sizing=blank] .closeIcon,
 :-moz-handler-clicktoplay .mainBox[sizing=tiny] .closeIcon,
-:-moz-handler-clicktoplay .mainBox[sizing=reduced] .closeIcon,
-:host(:-moz-handler-clicktoplay) .mainBox[sizing=blank] .closeIcon,
-:host(:-moz-handler-clicktoplay) .mainBox[sizing=tiny] .closeIcon,
-:host(:-moz-handler-clicktoplay) .mainBox[sizing=reduced] .closeIcon {
+:-moz-handler-clicktoplay .mainBox[sizing=reduced] .closeIcon {
   display: none;
 }
 
-:-moz-handler-clicktoplay .mainBox[notext] .msgClickToPlay,
-:host(:-moz-handler-clicktoplay) .mainBox[notext] .msgClickToPlay {
+:-moz-handler-clicktoplay .mainBox[notext] .msgClickToPlay {
   display: none;
 }
 
-:-moz-handler-clicktoplay .mainBox[notext] .icon,
-:host(:-moz-handler-clicktoplay) .mainBox[notext] .icon {
+:-moz-handler-clicktoplay .mainBox[notext] .icon {
   /* Override a `margin-bottom: 6px` now that .msgClickToPlay
    * below the icon is no longer shown, in order to achieve
    * a perfect vertical centering of the icon.
    */
   margin-bottom: 0;
 }
 
 :-moz-handler-clicktoplay .hoverBox:active {
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e46cb06afda977605118473bb72c1e9a24243693
GIT binary patch
literal 477
zc$@*<0V4j1P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00001b5ch_0Itp)
z=>Px$mq|oHRCocEkpW~fVI0O^-v<bNzWDGB1`>lJ2O(oP(6|5)3|RqiKsar|3>abq
zYsSGen&4zXnqk|v8_~Ayu91pFsVeRNaL0L_*u&53d7kHeImg_zTrRhW98n@ZaKa;J
zt3(4IaYB5p0KL!c^7>-2c(8}6s=i2)bmR4UuOpF2EuYUnQQtym?fyA0{~nLW8cI+o
z6m*JZLa5j4emcRfq9}LvW;7a|GF$WcT(S!wisHWY@Sc?&!3TrE9e4*Z1{sEN<tzk2
z@FSm0Chzd3X+FZI)9L??9r6-`27|#X0yk!}Su2%FVaU4O?zXe*_xnu-!MHIT4$XKx
zUZY8r{Kj-TZSapXsMqTm2zZjoBrXfqA8PV_r_=dlP_<fp=1UL`hhym5?e?Ktk9!Qt
zWHKs(pCZfhIfFbNkErYV8$Y0`0<zicJ>Qkf<py<|%+jw=D0GHza*ph>SS%j%-yR4A
z4j893(j{JYj(N~yNBh6bMSln-kx1NXn%1!Y4o-OF=&jvKMTs17K~!+UBj<<T33zUW
Te^i%500000NkvXXu0mjfXoT1i