Bug 1320782 - Disable eslint no-cpows-in-tests check for browser_ext_omnibox.js r?aswan
MozReview-Commit-ID: 3BNSejB1lwF
--- 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);
});
}