Bug 1576267 move "Message manager disconnected" whitelist into head files r=robwu
authorShane Caraveo <scaraveo@mozilla.com>
Mon, 26 Aug 2019 18:15:25 +0000
changeset 489913 91356fe76f76b6007c7acedcdb867338ee0129bd
parent 489912 b463644949345f52b398edf7458abcbbc51a96e4
child 489914 72373df5fb3f0a3518d6f5c11e31c5ca27eca98b
push id93643
push userscaraveo@mozilla.com
push dateMon, 26 Aug 2019 18:16:26 +0000
treeherderautoland@91356fe76f76 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrobwu
bugs1576267
milestone70.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 1576267 move "Message manager disconnected" whitelist into head files r=robwu Differential Revision: https://phabricator.services.mozilla.com/D43294
browser/components/extensions/test/browser/browser_ext_windows_allowScriptsToClose.js
toolkit/components/extensions/test/xpcshell/head.js
toolkit/components/extensions/test/xpcshell/test_ext_alarms.js
toolkit/components/extensions/test/xpcshell/test_ext_alarms_replaces.js
toolkit/components/extensions/test/xpcshell/test_ext_captivePortal.js
toolkit/components/extensions/test/xpcshell/test_ext_downloads_search.js
toolkit/components/extensions/test/xpcshell/test_ext_idle.js
toolkit/components/extensions/test/xpcshell/test_ext_messaging_startup.js
toolkit/components/extensions/test/xpcshell/test_ext_networkStatus.js
toolkit/components/extensions/test/xpcshell/test_ext_persistent_events.js
toolkit/components/extensions/test/xpcshell/test_ext_proxy_authorization_via_proxyinfo.js
toolkit/components/extensions/test/xpcshell/test_ext_proxy_startup.js
toolkit/components/extensions/test/xpcshell/test_ext_redirects.js
toolkit/components/extensions/test/xpcshell/test_ext_webRequest_cached.js
toolkit/components/extensions/test/xpcshell/test_ext_webRequest_host.js
toolkit/components/extensions/test/xpcshell/test_ext_webRequest_startup.js
toolkit/components/extensions/test/xpcshell/test_ext_webRequest_suspend.js
--- a/browser/components/extensions/test/browser/browser_ext_windows_allowScriptsToClose.js
+++ b/browser/components/extensions/test/browser/browser_ext_windows_allowScriptsToClose.js
@@ -1,19 +1,12 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
-if (!gMultiProcessBrowser) {
-  const { PromiseTestUtils } = ChromeUtils.import(
-    "resource://testing-common/PromiseTestUtils.jsm"
-  );
-  PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
-}
-
 // Tests allowScriptsToClose option
 add_task(async function test_allowScriptsToClose() {
   const files = {
     "dummy.html": "<meta charset=utf-8><script src=close.js></script>",
     "close.js": function() {
       window.close();
       if (!window.closed) {
         browser.test.sendMessage("close-failed");
--- a/toolkit/components/extensions/test/xpcshell/head.js
+++ b/toolkit/components/extensions/test/xpcshell/head.js
@@ -32,16 +32,18 @@ XPCOMUtils.defineLazyModuleGetters(this,
   ExtensionTestUtils: "resource://testing-common/ExtensionXPCShellUtils.jsm",
   FileUtils: "resource://gre/modules/FileUtils.jsm",
   MessageChannel: "resource://gre/modules/MessageChannel.jsm",
   NetUtil: "resource://gre/modules/NetUtil.jsm",
   PromiseTestUtils: "resource://testing-common/PromiseTestUtils.jsm",
   Schemas: "resource://gre/modules/Schemas.jsm",
 });
 
+PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
+
 // These values may be changed in later head files and tested in check_remote
 // below.
 Services.prefs.setBoolPref("extensions.webextensions.remote", false);
 const testEnv = {
   expectRemote: false,
 };
 
 add_task(function check_remote() {
--- a/toolkit/components/extensions/test/xpcshell/test_ext_alarms.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_alarms.js
@@ -1,15 +1,13 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 /* eslint-disable mozilla/no-arbitrary-setTimeout */
 "use strict";
 
-PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
-
 add_task(async function test_alarm_without_permissions() {
   function backgroundScript() {
     browser.test.assertTrue(
       !browser.alarms,
       "alarm API is not available when the alarm permission is not required"
     );
     browser.test.notifyPass("alarms_permission");
   }
--- a/toolkit/components/extensions/test/xpcshell/test_ext_alarms_replaces.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_alarms_replaces.js
@@ -1,15 +1,12 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
-// Error that occurs when the test ends while handling alarms.onAlarm.
-PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
-
 add_task(async function test_duplicate_alarm_name_replaces_alarm() {
   function backgroundScript() {
     let count = 0;
 
     browser.alarms.onAlarm.addListener(async alarm => {
       browser.test.assertEq(
         "replaced alarm",
         alarm.name,
--- a/toolkit/components/extensions/test/xpcshell/test_ext_captivePortal.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_captivePortal.js
@@ -1,17 +1,15 @@
 "use strict";
 
 /**
  * This duplicates the test from netwerk/test/unit/test_captive_portal_service.js
  * however using an extension to gather the captive portal information.
  */
 
-PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
-
 const PREF_CAPTIVE_ENABLED = "network.captive-portal-service.enabled";
 const PREF_CAPTIVE_TESTMODE = "network.captive-portal-service.testMode";
 const PREF_CAPTIVE_MINTIME = "network.captive-portal-service.minInterval";
 const PREF_CAPTIVE_ENDPOINT = "captivedetect.canonicalURL";
 const PREF_DNS_NATIVE_IS_LOCALHOST = "network.dns.native-is-localhost";
 
 const SUCCESS_STRING = "success\n";
 let cpResponse = SUCCESS_STRING;
--- a/toolkit/components/extensions/test/xpcshell/test_ext_downloads_search.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_downloads_search.js
@@ -1,14 +1,12 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
-PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
-
 const { Downloads } = ChromeUtils.import(
   "resource://gre/modules/Downloads.jsm"
 );
 
 const server = createHttpServer();
 server.registerDirectory("/data/", do_get_file("data"));
 
 const BASE = `http://localhost:${server.identity.primaryPort}/data`;
--- a/toolkit/components/extensions/test/xpcshell/test_ext_idle.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_idle.js
@@ -1,14 +1,12 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
-PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
-
 const { MockRegistrar } = ChromeUtils.import(
   "resource://testing-common/MockRegistrar.jsm"
 );
 
 let idleService = {
   _observers: new Set(),
   _activity: {
     addCalls: [],
--- a/toolkit/components/extensions/test/xpcshell/test_ext_messaging_startup.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_messaging_startup.js
@@ -1,12 +1,10 @@
 "use strict";
 
-PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
-
 const server = createHttpServer({ hosts: ["example.com"] });
 server.registerDirectory("/data/", do_get_file("data"));
 
 AddonTestUtils.init(this);
 AddonTestUtils.overrideCertDB();
 AddonTestUtils.createAppInfo(
   "xpcshell@tests.mozilla.org",
   "XPCShell",
--- a/toolkit/components/extensions/test/xpcshell/test_ext_networkStatus.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_networkStatus.js
@@ -1,12 +1,10 @@
 "use strict";
 
-PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
-
 const Cm = Components.manager;
 
 const uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].getService(
   Ci.nsIUUIDGenerator
 );
 
 var mockNetworkStatusService = {
   contractId: "@mozilla.org/network/network-link-service;1",
--- a/toolkit/components/extensions/test/xpcshell/test_ext_persistent_events.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_persistent_events.js
@@ -1,12 +1,10 @@
 "use strict";
 
-PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
-
 const { ExtensionCommon } = ChromeUtils.import(
   "resource://gre/modules/ExtensionCommon.jsm"
 );
 const { ExtensionAPI } = ExtensionCommon;
 
 const SCHEMA = [
   {
     namespace: "eventtest",
--- a/toolkit/components/extensions/test/xpcshell/test_ext_proxy_authorization_via_proxyinfo.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_proxy_authorization_via_proxyinfo.js
@@ -2,18 +2,16 @@
 
 XPCOMUtils.defineLazyServiceGetter(
   this,
   "authManager",
   "@mozilla.org/network/http-auth-manager;1",
   "nsIHttpAuthManager"
 );
 
-PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
-
 const proxy = createHttpServer();
 const proxyToken = "this_is_my_pass";
 
 // accept proxy connections for mozilla.org
 proxy.identity.add("http", "mozilla.org", 80);
 
 proxy.registerPathHandler("/", (request, response) => {
   if (request.hasHeader("Proxy-Authorization")) {
--- a/toolkit/components/extensions/test/xpcshell/test_ext_proxy_startup.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_proxy_startup.js
@@ -1,12 +1,10 @@
 "use strict";
 
-PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
-
 AddonTestUtils.init(this);
 AddonTestUtils.overrideCertDB();
 AddonTestUtils.createAppInfo(
   "xpcshell@tests.mozilla.org",
   "XPCShell",
   "1",
   "43"
 );
--- a/toolkit/components/extensions/test/xpcshell/test_ext_redirects.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_redirects.js
@@ -2,18 +2,16 @@
 
 // Tests whether we can redirect to a moz-extension: url.
 ChromeUtils.defineModuleGetter(
   this,
   "TestUtils",
   "resource://testing-common/TestUtils.jsm"
 );
 
-PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
-
 const server = createHttpServer();
 const gServerUrl = `http://localhost:${server.identity.primaryPort}`;
 
 server.registerPathHandler("/redirect", (request, response) => {
   let params = new URLSearchParams(request.queryString);
   response.setStatusLine(request.httpVersion, 302, "Moved Temporarily");
   response.setHeader("Location", params.get("redirect_uri"));
   response.write("redirecting");
--- a/toolkit/components/extensions/test/xpcshell/test_ext_webRequest_cached.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_webRequest_cached.js
@@ -1,12 +1,10 @@
 "use strict";
 
-PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
-
 const BASE_URL = "http://example.com";
 const FETCH_ORIGIN = "http://example.com/data/file_sample.html";
 
 const server = createHttpServer({ hosts: ["example.com"] });
 server.registerDirectory("/data/", do_get_file("data"));
 server.registerPathHandler("/status", (request, response) => {
   let IfNoneMatch = request.hasHeader("If-None-Match")
     ? request.getHeader("If-None-Match")
--- a/toolkit/components/extensions/test/xpcshell/test_ext_webRequest_host.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_webRequest_host.js
@@ -1,12 +1,10 @@
 "use strict";
 
-PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
-
 const HOSTS = new Set(["example.com", "example.org"]);
 
 const server = createHttpServer({ hosts: HOSTS });
 
 const BASE_URL = "http://example.com";
 const FETCH_ORIGIN = "http://example.com/dummy";
 
 server.registerPathHandler("/return_headers.sjs", (request, response) => {
--- a/toolkit/components/extensions/test/xpcshell/test_ext_webRequest_startup.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_webRequest_startup.js
@@ -1,12 +1,10 @@
 "use strict";
 
-PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
-
 AddonTestUtils.init(this);
 AddonTestUtils.overrideCertDB();
 AddonTestUtils.createAppInfo(
   "xpcshell@tests.mozilla.org",
   "XPCShell",
   "1",
   "43"
 );
--- a/toolkit/components/extensions/test/xpcshell/test_ext_webRequest_suspend.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_webRequest_suspend.js
@@ -1,12 +1,10 @@
 "use strict";
 
-PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
-
 const HOSTS = new Set(["example.com"]);
 
 const server = createHttpServer({ hosts: HOSTS });
 
 const BASE_URL = "http://example.com";
 const FETCH_ORIGIN = "http://example.com/dummy";
 
 server.registerPathHandler("/return_headers.sjs", (request, response) => {