Bug 1532944 - Remove unnecessary ESLint disabling mozilla/no-cpows-in-tests comments. r=Standard8
authorMihir <mihir17166@iiitd.ac.in>
Wed, 20 Mar 2019 13:58:47 +0000
changeset 524019 5df0da0ce027ee9311bfedd21d45bfcae7e03170
parent 524018 87e8e93c2133e0e7dfe3e102d5c5e117dcf41548
child 524020 0f9e3bff55750b4764e2ddd8c58e10c16e7f6865
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs1532944
milestone68.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 1532944 - Remove unnecessary ESLint disabling mozilla/no-cpows-in-tests comments. r=Standard8 Differential Revision: https://phabricator.services.mozilla.com/D24148
browser/components/preferences/in-content/tests/browser_connection_bug1445991.js
browser/components/preferences/in-content/tests/browser_extension_controlled.js
browser/components/preferences/in-content/tests/browser_homepages_filter_aboutpreferences.js
devtools/client/debugger/new/test/mochitest/helpers.js
dom/indexedDB/test/browser_private_idb.js
--- a/browser/components/preferences/in-content/tests/browser_connection_bug1445991.js
+++ b/browser/components/preferences/in-content/tests/browser_connection_bug1445991.js
@@ -12,17 +12,16 @@ add_task(async function testAutoconfigRe
       ["network.proxy.type", 2],
       ["network.proxy.autoconfig_url", "file:///nonexistent.pac"],
     ],
   });
 
   await openPreferencesViaOpenPreferencesAPI("general", { leaveOpen: true });
   const connectionURL = "chrome://browser/content/preferences/connection.xul";
   const promiseDialogLoaded = promiseLoadSubDialog(connectionURL);
-  // eslint-disable-next-line mozilla/no-cpows-in-tests
   gBrowser.contentDocument.getElementById("connectionSettings").click();
   const dialog = await promiseDialogLoaded;
 
   ok(!dialog.document.getElementById("autoReload").disabled,
      "Reload button is enabled when proxy type is autoconfig");
 
   dialog.close();
   gBrowser.removeCurrentTab();
--- a/browser/components/preferences/in-content/tests/browser_extension_controlled.js
+++ b/browser/components/preferences/in-content/tests/browser_extension_controlled.js
@@ -83,17 +83,16 @@ async function openNotificationsPermissi
   });
 
   sitePermissionsDialog = await dialogOpened;
   await sitePermissionsDialog.document.mozSubdialogReady;
 }
 
 add_task(async function testExtensionControlledHomepage() {
   await openPreferencesViaOpenPreferencesAPI("paneHome", {leaveOpen: true});
-  // eslint-disable-next-line mozilla/no-cpows-in-tests
   let doc = gBrowser.contentDocument;
   is(gBrowser.currentURI.spec, "about:preferences#home",
      "#home should be in the URI for about:preferences");
   let homepagePref = () => Services.prefs.getCharPref("browser.startup.homepage");
   let originalHomepagePref = homepagePref();
   let extensionHomepage = "https://developer.mozilla.org/";
   let controlledContent = doc.getElementById("browserHomePageExtensionContent");
 
@@ -153,17 +152,16 @@ add_task(async function testExtensionCon
   await promise;
   // Do the uninstall now that the enable code has been run.
   await addon.uninstall();
   BrowserTestUtils.removeTab(gBrowser.selectedTab);
 });
 
 add_task(async function testPrefLockedHomepage() {
   await openPreferencesViaOpenPreferencesAPI("paneHome", {leaveOpen: true});
-  // eslint-disable-next-line mozilla/no-cpows-in-tests
   let doc = gBrowser.contentDocument;
   is(gBrowser.currentURI.spec, "about:preferences#home",
      "#home should be in the URI for about:preferences");
 
   let homePagePref = "browser.startup.homepage";
   let buttonPrefs = [
     "pref.browser.homepage.disable_button.current_page",
     "pref.browser.homepage.disable_button.bookmark_page",
@@ -300,17 +298,16 @@ add_task(async function testPrefLockedHo
   is(controlledContent.hidden, true,
      "The extension controlled message is hidden when unlocked with no extension");
 
   BrowserTestUtils.removeTab(gBrowser.selectedTab);
 });
 
 add_task(async function testExtensionControlledNewTab() {
   await openPreferencesViaOpenPreferencesAPI("paneHome", {leaveOpen: true});
-  // eslint-disable-next-line mozilla/no-cpows-in-tests
   let doc = gBrowser.contentDocument;
   is(gBrowser.currentURI.spec, "about:preferences#home",
      "#home should be in the URI for about:preferences");
 
   let controlledContent = doc.getElementById("browserNewTabExtensionContent");
 
   // The new tab is set to the default and message is hidden.
   ok(!aboutNewTabService.newTabURL.startsWith("moz-extension:"), "new tab is not set");
@@ -528,17 +525,16 @@ add_task(async function testExtensionCon
   await originalExtension.unload();
   await updatedExtension.unload();
   BrowserTestUtils.removeTab(gBrowser.selectedTab);
 });
 
 add_task(async function testExtensionControlledHomepageUninstalledAddon() {
   async function checkHomepageEnabled() {
     await openPreferencesViaOpenPreferencesAPI("paneHome", {leaveOpen: true});
-    // eslint-disable-next-line mozilla/no-cpows-in-tests
     let doc = gBrowser.contentDocument;
     is(gBrowser.currentURI.spec, "about:preferences#home",
       "#home should be in the URI for about:preferences");
     let controlledContent = doc.getElementById("browserHomePageExtensionContent");
 
     // The homepage is enabled.
     let homepageInput = doc.getElementById("homePageUrl");
     is(homepageInput.disabled, false, "The homepage input is enabled");
--- a/browser/components/preferences/in-content/tests/browser_homepages_filter_aboutpreferences.js
+++ b/browser/components/preferences/in-content/tests/browser_homepages_filter_aboutpreferences.js
@@ -1,15 +1,14 @@
 var {HomePage} = ChromeUtils.import("resource:///modules/HomePage.jsm");
 
 add_task(async function testSetHomepageUseCurrent() {
   is(gBrowser.currentURI.spec, "about:blank", "Test starts with about:blank open");
   await BrowserTestUtils.openNewForegroundTab(gBrowser, "about:home");
   await openPreferencesViaOpenPreferencesAPI("paneHome", {leaveOpen: true});
-  // eslint-disable-next-line mozilla/no-cpows-in-tests
   let doc = gBrowser.contentDocument;
   is(gBrowser.currentURI.spec, "about:preferences#home",
      "#home should be in the URI for about:preferences");
   let oldHomepage = HomePage.get();
 
   let useCurrent = doc.getElementById("useCurrentBtn");
   useCurrent.click();
 
--- a/devtools/client/debugger/new/test/mochitest/helpers.js
+++ b/devtools/client/debugger/new/test/mochitest/helpers.js
@@ -963,17 +963,17 @@ function waitForActive(dbg) {
  * @static
  */
 function invokeInTab(fnc, ...args) {
   info(`Invoking in tab: ${fnc}(${args.map(uneval).join(",")})`);
   return ContentTask.spawn(gBrowser.selectedBrowser, { fnc, args }, function*({
     fnc,
     args
   }) {
-    return content.wrappedJSObject[fnc](...args); // eslint-disable-line mozilla/no-cpows-in-tests, max-len
+    return content.wrappedJSObject[fnc](...args); // max-len
   });
 }
 
 const isLinux = Services.appinfo.OS === "Linux";
 const isMac = Services.appinfo.OS === "Darwin";
 const cmdOrCtrl = isLinux ? { ctrlKey: true } : { metaKey: true };
 const shiftOrAlt = isMac
   ? { accelKey: true, shiftKey: true }
--- a/dom/indexedDB/test/browser_private_idb.js
+++ b/dom/indexedDB/test/browser_private_idb.js
@@ -1,16 +1,15 @@
 async function idbCheckFunc() {
   let factory;
   try {
     // in a worker, this resolves directly.
     factory = indexedDB;
   } catch (ex) {
     // in a frame-script, we need to pierce "content"
-    // eslint-disable-next-line mozilla/no-cpows-in-tests
     factory = content.indexedDB;
   }
   try {
     console.log("opening db");
     const req = factory.open("db", 1);
     const result = await new Promise((resolve, reject) => {
       req.onerror = () => { resolve("error"); };
       // we expect the db to not exist and for created to resolve first
@@ -68,17 +67,16 @@ const workerScriptBlob = new Blob([worke
 
 /**
  * This function is deployed via ContextTask.spawn and operates in a tab
  * frame script context.  Its job is to create the worker that will run the
  * idbCheckFunc and return the result to us.
  */
 async function workerCheckDeployer({ srcBlob, workerType }) {
   let worker, port;
-  // eslint-disable-next-line mozilla/no-cpows-in-tests
   const url = content.URL.createObjectURL(srcBlob);
   if (workerType === "dedicated") {
     worker = new content.Worker(url);
     port = worker;
   } else if (workerType === "shared") {
     worker = new content.SharedWorker(url);
     port = worker.port;
     port.start();