Bug 1581243 - set pref extensions.webextensions.warnings-as-errors in a few tests. rs=bustage-fix
authorJorg K <jorgk@jorgk.com>
Sat, 14 Sep 2019 12:39:52 +0200
changeset 36815 5b0b472c4a7acc74d53c2eb1d4e86d6ffb64924f
parent 36814 43f3705dfb3b100a0623518d59a94b4b57e819f7
child 36816 ba0d11f51d765208d20e47d9601889507f84df18
push id395
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:38:57 +0000
reviewersbustage-fix
bugs1581243
Bug 1581243 - set pref extensions.webextensions.warnings-as-errors in a few tests. rs=bustage-fix
mail/components/extensions/test/browser/browser_ext_commands_onCommand.js
mail/components/extensions/test/browser/browser_ext_quickFilter.js
mail/components/extensions/test/xpcshell/test_ext_alias.js
mail/components/extensions/test/xpcshell/test_ext_cloudFile.js
--- a/mail/components/extensions/test/browser/browser_ext_commands_onCommand.js
+++ b/mail/components/extensions/test/browser/browser_ext_commands_onCommand.js
@@ -1,12 +1,14 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+Services.prefs.setBoolPref("extensions.webextensions.warnings-as-errors", false);
+
 add_task(async function test_user_defined_commands() {
   const testCommands = [
     // Ctrl Shortcuts
     {
       name: "toggle-ctrl-a",
       shortcut: "Ctrl+A",
       key: "A",
       modifiers: {
--- a/mail/components/extensions/test/browser/browser_ext_quickFilter.js
+++ b/mail/components/extensions/test/browser/browser_ext_quickFilter.js
@@ -1,14 +1,16 @@
 /* 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/. */
 
 let account, rootFolder, subFolders;
 
+Services.prefs.setBoolPref("extensions.webextensions.warnings-as-errors", false);
+
 add_task(async () => {
   account = createAccount();
   rootFolder = account.incomingServer.rootFolder;
   subFolders = [...rootFolder.subFolders];
   createMessages(subFolders[0], 10);
 
   window.gFolderTreeView.selectFolder(rootFolder);
   await new Promise(resolve => executeSoon(resolve));
--- a/mail/components/extensions/test/xpcshell/test_ext_alias.js
+++ b/mail/components/extensions/test/xpcshell/test_ext_alias.js
@@ -17,16 +17,18 @@ const server = createHttpServer({ hosts:
 server.registerPathHandler("/dummy", (request, response) => {
   response.setStatusLine(request.httpVersion, 200, "OK");
   response.setHeader("Content-Type", "text/html", false);
   response.write(
     "<!DOCTYPE html><html><head><meta charset='utf8'></head><body></body></html>"
   );
 });
 
+Services.prefs.setBoolPref("extensions.webextensions.warnings-as-errors", false);
+
 add_task(async function test_alias() {
   let extension = ExtensionTestUtils.loadExtension({
     background: async () => {
       let pending = new Set(["contentscript", "proxyscript", "webscript"]);
 
       browser.runtime.onMessage.addListener(message => {
         if (message == "error-no-messenger") {
           browser.test.fail("Proxy script has messenger object");
--- a/mail/components/extensions/test/xpcshell/test_ext_cloudFile.js
+++ b/mail/components/extensions/test/xpcshell/test_ext_cloudFile.js
@@ -8,16 +8,18 @@ var { cloudFileAccounts } = ChromeUtils.
   "resource:///modules/cloudFileAccounts.jsm"
 );
 var { ExtensionTestUtils } = ChromeUtils.import(
   "resource://testing-common/ExtensionXPCShellUtils.jsm"
 );
 
 ExtensionTestUtils.init(this);
 
+Services.prefs.setBoolPref("extensions.webextensions.warnings-as-errors", false);
+
 add_task(async () => {
   async function background() {
     function createCloudfileAccount() {
       return new Promise(resolve => {
         function accountListener(account) {
           browser.cloudFile.onAccountAdded.removeListener(accountListener);
           resolve(account);
         }