Bug 1675349: Update tests under dom/base for the removal of plugins. r=jmathies
authorDavid Parks <daparks@mozilla.com>
Wed, 18 Nov 2020 15:57:27 +0000
changeset 557833 b712e934ced5d0108dfb9bbf02ec93d61a256405
parent 557832 e38cc205b04ccf7d48ae98d20659caa1375e4abe
child 557834 4d3ed7f582f503fb36d3eda50fcc55a3e1d8269e
push id37962
push userapavel@mozilla.com
push dateWed, 18 Nov 2020 21:51:58 +0000
treeherdermozilla-central@9d797387f57c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmathies
bugs1675349
milestone85.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1675349: Update tests under dom/base for the removal of plugins. r=jmathies UPDATED ------- dom/base/test/browser_timeout_throttling_with_audio_playback.js Test background tab audio throttling Remove plugin portion Differential Revision: https://phabricator.services.mozilla.com/D95908
dom/base/test/browser.ini
dom/base/test/browser_timeout_throttling_with_audio_playback.js
dom/base/test/file_pluginAudio.html
dom/base/test/mochitest.ini
--- a/dom/base/test/browser.ini
+++ b/dom/base/test/browser.ini
@@ -17,17 +17,16 @@ support-files =
   file_bug1303838_target_foo.html
   file_bug1303838_target_bar.html
   file_bug1303838_target_baz.html
   file_bug1303838_target_ifoo.html
   file_bug1303838_target_ibar.html
   file_bug1303838_target_ibaz.html
   file_bug1303838_with_iframe.html
   file_messagemanager_unload.html
-  file_pluginAudio.html
   file_use_counter_bfcache.html
   file_use_counter_bfcache_helper.html
   file_use_counter_outer.html
   file_use_counter_outer_display_none.html
   file_use_counter_style.html
   file_use_counter_svg_getElementById.svg
   file_use_counter_svg_currentScale.svg
   file_use_counter_svg_fill_pattern_definition.svg
--- a/dom/base/test/browser_timeout_throttling_with_audio_playback.js
+++ b/dom/base/test/browser_timeout_throttling_with_audio_playback.js
@@ -1,36 +1,32 @@
 // The tab closing code leaves an uncaught rejection. This test has been
 // whitelisted until the issue is fixed.
 if (!gMultiProcessBrowser) {
   ChromeUtils.import("resource://testing-common/PromiseTestUtils.jsm", this);
   PromiseTestUtils.expectUncaughtRejection(/is no longer, usable/);
 }
 
 const kBaseURI = "http://mochi.test:8888/browser/dom/base/test/empty.html";
-const kPluginJS = "chrome://mochitests/content/browser/dom/base/test/plugin.js";
 var testURLs = [
   "http://mochi.test:8888/browser/dom/base/test/file_audioLoop.html",
   "http://mochi.test:8888/browser/dom/base/test/file_audioLoopInIframe.html",
-  "http://mochi.test:8888/browser/dom/base/test/file_pluginAudio.html",
   "http://mochi.test:8888/browser/dom/base/test/file_webaudio_startstop.html",
 ];
 
 // We want to ensure that while audio is being played back, a background tab is
 // treated the same as a foreground tab as far as timeout throttling is concerned.
 // So we use a 100,000 second minimum timeout value for background tabs.  This
 // means that in case the test fails, it will time out in practice, but just for
 // sanity the test condition ensures that the observed timeout delay falls in
 // this range.
 const kMinTimeoutBackground = 100 * 1000 * 1000;
 
 const kDelay = 10;
 
-Services.scriptloader.loadSubScript(kPluginJS, this);
-
 async function runTest(url) {
   let currentTab = gBrowser.selectedTab;
   let newTab = await BrowserTestUtils.openNewForegroundTab(gBrowser, kBaseURI);
   let newBrowser = gBrowser.getBrowserForTab(newTab);
 
   // Wait for the UI to indicate that audio is being played back.
   let promise = BrowserTestUtils.waitForAttribute(
     "soundplaying",
deleted file mode 100644
--- a/dom/base/test/file_pluginAudio.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<embed type="application/x-test" width="200" height="200"></embed>
-<script>
-var plugin = document.querySelector("embed");
-onload = function() {
-  plugin.startAudioPlayback();
-};
-function stopAudio() {
-  plugin.stopAudioPlayback();
-}
-function pluginMuted() {
-  return plugin.audioMuted();
-}
-function toggleMuteState(muted) {
-  return SpecialPowers.toggleMuteState(muted, window.top);
-}
-</script>
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -196,17 +196,16 @@ support-files =
   somedatas.resource^headers^
   variable_style_sheet.sjs
   viewport_helpers.js
   w3element_traversal.svg
   wholeTexty-helper.xml
   referrerHelper.js
   file_audioLoop.html
   file_webaudio_startstop.html
-  file_pluginAudio.html
   referrer_helper.js
   referrer_testserver.sjs
   script_postmessages_fileList.js
   common_postMessages.js
   iframe_postMessages.html
   worker_postMessages.js
   test_anonymousContent_style_csp.html^headers^
   file_explicit_user_agent.sjs