Bug 1320782 - Disable eslint no-cpows-in-tests check for browser_ext_omnibox.js r=aswan
authorMatthew Wein <mwein@mozilla.com>
Tue, 29 Nov 2016 15:34:41 -0500
changeset 324799 a2e634f475d3a78c0c59ed12298b66384b0f0bdd
parent 324798 3a44959def71d9e859bbaa40668f79995a6a6184
child 324800 8f217ad4bcd380c91e2c580fe56bba1e7dff6c60
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersaswan
bugs1320782
milestone53.0a1
Bug 1320782 - Disable eslint no-cpows-in-tests check for browser_ext_omnibox.js r=aswan MozReview-Commit-ID: 3BNSejB1lwF
browser/components/extensions/test/browser/browser_ext_omnibox.js
--- a/browser/components/extensions/test/browser/browser_ext_omnibox.js
+++ b/browser/components/extensions/test/browser/browser_ext_omnibox.js
@@ -1,12 +1,18 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
+// The no-cpows-in-tests check isn't very smart, simply warning if it finds
+// a variable named `content`. For Chrome compatibility, the Omnibox API uses
+// that name for setting the text of a suggestion, and that's all this test uses
+// it for, so we can disable it for this test.
+/* eslint-disable mozilla/no-cpows-in-tests */
+
 function* setup() {
   const SUGGEST_URLBAR_PREF = "browser.urlbar.suggest.searches";
   Services.prefs.setBoolPref(SUGGEST_URLBAR_PREF, false);
 
   registerCleanupFunction(() => {
     Services.prefs.clearUserPref(SUGGEST_URLBAR_PREF);
   });
 }