Bug 1967204 - remove superfluous eslint-env annotations from remaining places. r=frontend-codestyle-reviewers,geckoview-reviewers,whimboo,Gijs,nalexander

Differential Revision: https://phabricator.services.mozilla.com/D279321
This commit is contained in:
Mark Banner
2026-01-21 13:57:59 +00:00
committed by mbanner@mozilla.com
parent 73473d292f
commit 0faa040118
117 changed files with 0 additions and 151 deletions
-2
View File
@@ -2,8 +2,6 @@
* 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/. */
/* eslint-env node */
module.exports = {
plugins: ["@babel/plugin-syntax-jsx"],
};
-2
View File
@@ -2,8 +2,6 @@
* 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/. */
/* eslint-env node */
module.exports = {
arrowParens: "avoid",
endOfLine: "lf",
-2
View File
@@ -2,8 +2,6 @@
* 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/. */
/* eslint-env node */
"use strict";
const fs = require("fs");
@@ -1,7 +1,6 @@
/* 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/. */
/* eslint-env node */
/**
* This file hooks our addon into Storybook. Having a root-level file like this
@@ -1,7 +1,6 @@
/* 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/. */
/* eslint-env node */
/**
* This file hooks our addon into Storybook. Having a root-level file like this
@@ -1,7 +1,6 @@
/* 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/. */
/* eslint-env node */
const path = require("path");
const webpack = require("webpack");
@@ -1,7 +1,6 @@
/* 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/. */
/* eslint-env node */
const { loadCsf } = require("@storybook/csf-tools");
const { compile } = require("@storybook/mdx2-csf");
@@ -1,7 +1,6 @@
/* 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/. */
/* eslint-env node */
/**
* This file contains a Webpack loader that takes markdown as its source and
@@ -1,7 +1,6 @@
/* 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/. */
/* eslint-env node */
const path = require("path");
const fs = require("fs");
@@ -1,7 +1,6 @@
/* 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/. */
/* eslint-env node */
/**
* This file contains a webpack loader which rewrites JS source files to use
@@ -1,7 +1,6 @@
/* 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/. */
/* eslint-env node */
const path = require("path");
const [prefixMap, aliasMap, sourceMap] = require("./chrome-map.js");
@@ -1,7 +1,5 @@
// Forward iframe loaded event.
/* eslint-env mozilla/frame-script */
addEventListener(
"frames-loaded",
() => sendAsyncMessage("test:frames-loaded"),
@@ -81,7 +81,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=509055
sheTitle = sh.legacySHistory.getEntryAtIndex(sh.index).title;
} else {
let chromeScript = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
addMessageListener("getTitle", browsingContext => {
// eslint-disable-next-line no-shadow
let sh = browsingContext.sessionHistory;
@@ -20,7 +20,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=
let chromeScript = null;
if (SpecialPowers.Services.appinfo.sessionHistoryInParent) {
chromeScript = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
function doSend(message, fn) {
try {
sendAsyncMessage(message, {success: true, value: fn()});
@@ -26,7 +26,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1375833
let chromeScript = null;
if (SpecialPowers.Services.appinfo.sessionHistoryInParent) {
chromeScript = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
function doSend(message, fn) {
try {
sendAsyncMessage(message, {success: true, value: fn()});
@@ -24,11 +24,9 @@
function offlineOnline(online) {
function offlineFn() {
/* eslint-env mozilla/chrome-script */
Services.io.offline = true;
}
function onlineFn() {
/* eslint-env mozilla/chrome-script */
Services.io.offline = false;
}
SpecialPowers.loadChromeScript(online ? onlineFn : offlineFn);
@@ -21,7 +21,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1139964
var msgName = "TEST:Global_has_Promise";
function mmScriptForPromiseTest() {
/* eslint-env mozilla/process-script */
sendAsyncMessage("TEST:Global_has_Promise",
{
hasPromise: ("Promise" in this),
-1
View File
@@ -23,7 +23,6 @@ var lastContentType = -1;
const testURL = window.location.href + "/this/is/the/test/url";
function createChromeScript() {
/* eslint-env mozilla/chrome-script */
var categoryManager = Cc["@mozilla.org/categorymanager;1"].getService(
Ci.nsICategoryManager
);
@@ -12,7 +12,6 @@
function triggerKey() {
SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
var win = Services.wm.getMostRecentBrowserWindow();
for (let i = 0; i < 200; ++i) {
EventUtils.synthesizeKey("a", {}, win);
@@ -17,7 +17,6 @@
async function testBrowserChildCoalescing() {
var ret = new Promise(function(resolve) {
SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
var element = this.actorParent.rootFrameLoader.ownerElement;
var rect = element.getBoundingClientRect();
var win = element.ownerDocument.defaultView;
@@ -94,7 +93,6 @@
}
}, true);
window.addEventListener("touchmove", function(e) {
if (receivedTouchEnd) {
ok(false, "Shouldn't get any touchmove events after touchend");
@@ -25,7 +25,6 @@
async function fireLotsOfSingleTouchMoves() {
var ret = new Promise(function(resolve) {
SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
var element = this.actorParent.rootFrameLoader.ownerElement;
var rect = element.getBoundingClientRect();
var win = element.ownerDocument.defaultView;
@@ -66,7 +65,6 @@
async function fireTwoSingleTouches() {
var ret = new Promise(function(resolve) {
SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
var element = this.actorParent.rootFrameLoader.ownerElement;
var rect = element.getBoundingClientRect();
var win = element.ownerDocument.defaultView;
@@ -110,7 +108,6 @@
async function fireLotsOfMultiTouchMoves() {
var ret = new Promise(function(resolve) {
SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
var element = this.actorParent.rootFrameLoader.ownerElement;
var rect = element.getBoundingClientRect();
var win = element.ownerDocument.defaultView;
@@ -25,7 +25,6 @@
async function fireLotsOfSingleTouchMoves() {
var ret = new Promise(function(resolve) {
SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
var element = this.actorParent.rootFrameLoader.ownerElement;
var rect = element.getBoundingClientRect();
var win = element.ownerDocument.defaultView;
@@ -66,7 +65,6 @@
async function fireTwoSingleTouches() {
var ret = new Promise(function(resolve) {
SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
var element = this.actorParent.rootFrameLoader.ownerElement;
var rect = element.getBoundingClientRect();
var win = element.ownerDocument.defaultView;
@@ -109,7 +107,6 @@
async function fireLotsOfMultiTouchMoves() {
var ret = new Promise(function(resolve) {
SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
var element = this.actorParent.rootFrameLoader.ownerElement;
var rect = element.getBoundingClientRect();
var win = element.ownerDocument.defaultView;
-1
View File
@@ -104,7 +104,6 @@ function runTest() {
SimpleTest.waitForFocus(function() {
/* eslint-disable no-shadow */
let chromeScript = SpecialPowers.loadChromeScript(_ => {
/* eslint-env mozilla/chrome-script */
let win = Services.wm.getMostRecentWindow("navigator:browser");
win.requestAnimationFrame(() => {
win.gBrowser.selectedBrowser.removeAttribute("blank");
@@ -53,7 +53,6 @@
// Until the blank attribute is removed, we can't send scroll events.
SimpleTest.waitForFocus(function() {
let chromeScript = SpecialPowers.loadChromeScript(_ => {
/* eslint-env mozilla/chrome-script */
let win = Services.wm.getMostRecentWindow("navigator:browser");
win.requestAnimationFrame(() => {
win.gBrowser.selectedBrowser.removeAttribute("blank");
@@ -8,7 +8,6 @@
<link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
<script>
add_task(async function testResponseConstructor() {
/* eslint-env webextensions */
function contentScript() {
new Response();
browser.test.notifyPass("done");
@@ -52,7 +52,6 @@ dump("EXCEPTION IN CREATION: " + e + "\n " + e.stack + "\n");
{ type: "text/fancy" });
function workerScript() {
/* eslint-env worker */
onmessage = function(event) {
// Save the Blob to the worker's global scope.
self.holdOntoBlob = event.data;
-1
View File
@@ -207,7 +207,6 @@
info("Send blob to a worker, read its contents there, and verify results.");
function workerScript() {
/* eslint-env worker */
onmessage = function(event) {
var reader = new FileReaderSync();
postMessage(reader.readAsText(event.data));
@@ -71,7 +71,6 @@
info("Sending slice to a worker");
function workerScript() {
/* eslint-env worker */
onmessage = function(event) {
var blob = event.data;
var xhr = new XMLHttpRequest();
@@ -69,7 +69,6 @@
is(blob.type, BLOB_TYPE, "Correct type");
function workerScript() {
/* eslint-env worker */
onmessage = function(event) {
var blob = event.data;
var compositeBlob = new Blob(["preceding string. ", blob],
@@ -70,7 +70,6 @@
info("Sending blob to a worker");
function workerScript() {
/* eslint-env worker */
onmessage = function(event) {
var blob = event.data;
var blobUrl = URL.createObjectURL(blob);
@@ -71,7 +71,6 @@
info("Sending blob to a worker");
function workerScript() {
/* eslint-env worker */
onmessage = function(event) {
var blob = event.data;
var slicedBlob = blob.slice(0, 3, "text/plain");
@@ -12,7 +12,6 @@
async function chromeScriptFunc() {
function childFrameScript() {
/* eslint-env mozilla/frame-script */
"use strict";
const mmName = "test:idb-and-mm";
-1
View File
@@ -16,7 +16,6 @@ Test that the preallocated process starts up.
SimpleTest.waitForExplicitFinish();
function expectProcessCreated() {
/* eslint-env mozilla/chrome-script */
return new Promise(resolve => {
function parentExpectProcessCreated() {
let topic = "ipc:content-initializing";
@@ -60,7 +60,6 @@
}
let script = SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
var EventUtils = {};
EventUtils.window = {};
EventUtils._EU_Ci = Ci;
@@ -19,7 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1429432
// Add an allow permission for the mochitest origin to test this.
let script = SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
let principal = Services.scriptSecurityManager.createContentPrincipalFromOrigin("http://mochi.test:8888");
Services.perms.addFromPrincipal(principal, "desktop-notification", Services.perms.ALLOW_ACTION);
addMessageListener("destroy", function() {
@@ -25,7 +25,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=782211
// processes (with Fission), since the default content-process alerts service
// relays messages to the parent process.
function mockServicesChromeScript() {
/* eslint-env mozilla/chrome-script */
const MOCK_CID = Components.ID("{dbe37e64-d9a3-402c-8d8a-0826c619f7ad}");
const SYSTEM_CID = Components.ID("{a0ccaaf8-09da-44d8-b250-9ac3e93c8117}");
const ALERTS_SERVICE_CONTRACT_ID = "@mozilla.org/alerts-service;1";
@@ -90,7 +90,6 @@ http://creativecommons.org/licenses/publicdomain/
// Load chrome script to change offline status in the
// parent process.
var offlineChromeScript = SpecialPowers.loadChromeScript(_ => {
/* eslint-env mozilla/chrome-script */
addMessageListener("change-status", function(offline) {
// eslint-disable-next-line mozilla/use-services
const ioService = Cc["@mozilla.org/network/io-service;1"]
@@ -23,7 +23,6 @@
SimpleTest.waitForExplicitFinish();
var script = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
let ignoreCount = 0;
function listener(msg) {
if(msg.message.includes("Content-Security-Policy: Ignoring x-frame-options because of frame-ancestors directive.")) {
@@ -18,7 +18,6 @@
*/
function createChromeScript() {
/* eslint-env mozilla/chrome-script */
const POLICYNAME = "@mozilla.org/testpolicy;1";
const POLICYID = Components.ID("{6cc95ef3-40e1-4d59-87f0-86f100373227}");
const EXPECTED_URL =
@@ -22,7 +22,6 @@ function checkTestsDone() {
}
}
var script = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
let counter = 0;
Services.obs.addObserver(function onExamResp(subject) {
let channel = subject.QueryInterface(Ci.nsIHttpChannel);
@@ -25,7 +25,6 @@ async function realTest(noneRequiresSecure) {
info("Check cookies");
let chromeScript = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
const {sendAsyncMessage} = this;
let cookies = { test: null, test2: null, test3: null };
@@ -98,7 +98,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=803225
// Test 6: mailto protocol
let mm = SpecialPowers.loadChromeScript(function launchHandler() {
/* eslint-env mozilla/chrome-script */
var ioService = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
@@ -114,7 +113,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=803225
})
var pScript = "data:,new " + function () {
/* eslint-env mozilla/process-script */
var os = Cc["@mozilla.org/observer-service;1"]
.getService(Ci.nsIObserverService);
var observer = {
@@ -17,7 +17,6 @@ let testCounter = 0;
let testFrame;
var script = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
Services.obs.addObserver(function onExamResp(subject) {
let channel = subject.QueryInterface(Ci.nsIHttpChannel);
info("request observed: " + channel.URI.spec);
@@ -24,7 +24,6 @@ const REQUEST_URL = "https://example.com/tests/dom/security/test/sec-fetch/file_
let testPassCounter = 0;
var script = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
Services.obs.addObserver(function onExamResp(subject) {
let channel = subject.QueryInterface(Ci.nsIHttpChannel);
if (!channel.URI.spec.startsWith("https://example.com/tests/dom/security/test/sec-fetch/file_redirect.sjs")) {
@@ -24,7 +24,6 @@ const REQUEST_URL = "https://example.com/tests/dom/security/test/sec-fetch/file_
let testPassCounter = 0;
var script = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
Services.obs.addObserver(function onExamResp(subject) {
let channel = subject.QueryInterface(Ci.nsIHttpChannel);
if (!channel.URI.spec.startsWith("https://example.com/tests/dom/security/test/sec-fetch/file_redirect.sjs")) {
@@ -25,7 +25,6 @@ let testPassCounter = 0;
let testWindow;
var script = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
Services.obs.addObserver(function onExamResp(subject) {
let channel = subject.QueryInterface(Ci.nsIHttpChannel);
if (!channel.URI.spec.startsWith("https://example.com/tests/dom/security/test/sec-fetch/file_redirect.sjs")) {
@@ -12,7 +12,6 @@
add_task(async function() {
var script = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
Services.obs.addObserver(function onExamResp(subject) {
let channel = subject.QueryInterface(Ci.nsIHttpChannel);
info("request observed: " + channel.URI.spec);
@@ -22,7 +22,6 @@ function checkTestsDone() {
}
var script = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
Services.obs.addObserver(function onExamResp(subject) {
let channel = subject.QueryInterface(Ci.nsIHttpChannel);
if (!channel.URI.spec.includes("localhost") ||
@@ -20,7 +20,6 @@ function checkTestsDone() {
}
var script = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
Services.obs.addObserver(function onExamResp(subject) {
let channel = subject.QueryInterface(Ci.nsIHttpChannel);
if (!channel.URI.spec.startsWith("https://example.com/tests/dom/security/test/sec-fetch/file_websocket")) {
@@ -20,7 +20,6 @@ add_setup(async function () {
add_task(async function() {
var script = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
Services.obs.addObserver(function onExamResp(subject) {
let channel = subject.QueryInterface(Ci.nsIHttpChannel);
info("request observed: " + channel.URI.spec);
-1
View File
@@ -66,7 +66,6 @@
async function testScopes() {
function chromeScriptSource() {
/* eslint-env mozilla/chrome-script */
let swm = Cc["@mozilla.org/serviceworkers/manager;1"]
.getService(Ci.nsIServiceWorkerManager);
@@ -15,7 +15,6 @@
var chromeScript;
chromeScript = SpecialPowers.loadChromeScript(_ => {
/* eslint-env mozilla/chrome-script */
Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => resolve());
});
@@ -10,7 +10,6 @@
async function checkForFindDialog() {
let chromeScript = SpecialPowers.loadChromeScript(_ => {
/* eslint-env mozilla/chrome-script */
addMessageListener("test:check", () => {
let sawFind = false;
let findDialog = Services.wm.getMostRecentWindow("findInPage");
@@ -25,7 +25,6 @@
// so that we can dispatch key event in the parent to test
// InputTaskManager properly
SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
var win = Services.wm.getMostRecentBrowserWindow();
EventUtils.synthesizeKey("a", {}, win);
EventUtils.synthesizeKey("b", {}, win);
@@ -13,7 +13,6 @@
setTimeout(function() {
input.focus();
SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
var win = Services.wm.getMostRecentBrowserWindow();
EventUtils.synthesizeKey("a", {}, win);
});
@@ -23,10 +23,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=569988
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(runTest);
function runTest() {
var script = SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
var gPromptInput = null;
var os = Services.obs;
@@ -55,7 +55,6 @@ var script;
var loadListener = async function(evt) {
if (loadCount == 0) {
script = SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/use-services
var dir = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIProperties)
@@ -32,7 +32,6 @@ var script;
var loadListener = async function(evt) {
if (firstLoad) {
script = SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/use-services
var dir = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIProperties)
@@ -36,7 +36,6 @@ var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(async function() {
script = SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/use-services
var dir = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIProperties)
@@ -43,7 +43,6 @@ let { maybeOnSpellCheck, onSpellCheck } = SpecialPowers.ChromeUtils.importESModu
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(async function() {
script = SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
var chromeWin = actorParent.rootFrameLoader
.ownerElement.ownerGlobal.browsingContext.topChromeWindow;
var contextMenu = chromeWin.document.getElementById("contentAreaContextMenu");
@@ -34,7 +34,6 @@ SimpleTest.waitForExplicitFinish();
addLoadEvent(start);
async function start() {
let script = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/use-services
let dir = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIProperties)
@@ -33,7 +33,6 @@ SimpleTest.waitForExplicitFinish();
addLoadEvent(start);
async function start() {
let script = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/use-services
let dir = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIProperties)
@@ -35,7 +35,6 @@ SimpleTest.waitForExplicitFinish();
addLoadEvent(start);
async function start() {
let script = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/use-services
let dir = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIProperties)
@@ -31,7 +31,6 @@ var script;
var loadListener = async function(evt) {
if (firstLoad) {
script = SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/use-services
var dir = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIProperties)
@@ -35,7 +35,6 @@ var { maybeOnSpellCheck, onSpellCheck } = SpecialPowers.ChromeUtils.importESModu
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(async function() {
script = SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/use-services
var dir = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIProperties)
@@ -32,7 +32,6 @@ var script;
var loadListener = async function(evt) {
if (firstLoad) {
script = SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/use-services
var dir = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIProperties)
@@ -55,7 +55,6 @@ var script;
var loadListener = async function(evt) {
if (loadCount == 0) {
script = SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/use-services
var dir = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIProperties)
@@ -1,5 +1,3 @@
/* eslint-env mozilla/chrome-script */
// Chrome scripts are run with synchronous messages, so make sure we're completely
// decoupled from the content process before doing this work.
Cu.dispatch(function () {
@@ -34,7 +34,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1272623
// Perform the spelling correction
let mm = SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
const {BrowserTestUtils} = ChromeUtils.importESModule(
"resource://testing-common/BrowserTestUtils.sys.mjs"
);
@@ -664,7 +664,6 @@ function isKeyApzEnabled() {
// The snapshot is returned in the form of a data URL.
function getSnapshot(rect) {
function parentProcessSnapshot() {
/* eslint-env mozilla/chrome-script */
addMessageListener("snapshot", function (parentRect) {
var topWin = Services.wm.getMostRecentWindow("navigator:browser");
if (!topWin) {
@@ -56,7 +56,6 @@ let chromeScriptHandle = null;
function startListeningForClickEventsInChrome() {
function chromeScript() {
/* eslint-env mozilla/chrome-script */
let topWin = Services.wm.getMostRecentWindow("navigator:browser");
if (!topWin) {
topWin = Services.wm.getMostRecentWindow("navigator:geckoview");
@@ -37,7 +37,6 @@ let chromeScriptHandle = null;
function startListeningForContextmenuEventsInChrome() {
function chromeScript() {
/* eslint-env mozilla/chrome-script */
let topWin = Services.wm.getMostRecentWindow("navigator:browser");
if (!topWin) {
topWin = Services.wm.getMostRecentWindow("navigator:geckoview");
@@ -32,7 +32,6 @@ function listener(callback) {
// at the end to clean up. Returns true on success, false on failure.
function chromeTouchEventCounter(operation) {
function chromeProcessCounter() {
/* eslint-env mozilla/chrome-script */
const PREFIX = "apz:ctec:";
const LISTENERS = {
-2
View File
@@ -2,8 +2,6 @@
* 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/. */
/* eslint-env mozilla/frame-script */
const XHTML_NS = "http://www.w3.org/1999/xhtml";
const DEBUG_CONTRACTID = "@mozilla.org/xpcom/debug;1";
@@ -2,8 +2,6 @@
* 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/. */
/* eslint-env webextensions */
/*
* This web extension looks for known icon tags, collects URLs and available
* meta data (e.g. sizes) and passes that to the app code.
@@ -2,8 +2,6 @@
* 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/. */
/* eslint-env webextensions */
/*
Establish communication with native application.
*/
@@ -2,8 +2,6 @@
* 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/. */
/* eslint-env webextensions */
/*
Establish communication with native application.
*/
@@ -2,8 +2,6 @@
* 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/. */
/* eslint-env webextensions */
// This background script is needed to update the current tab
// and activate reader view.
@@ -2,7 +2,6 @@
* 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/. */
/* eslint-env webextensions */
/* import-globals-from readability/readability-readerable-0.4.2.js */
// This script is injected into content to determine whether or not a
@@ -2,7 +2,6 @@
* 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/. */
/* eslint-env webextensions */
/* eslint-disable no-unsanitized/property */ /* bug 1903144 */
/* import-globals-from readability/readability-0.4.2.js */
/* import-globals-from readability/JSDOMParser-0.4.2.js */
@@ -2,8 +2,6 @@
* 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/. */
/* eslint-env webextensions */
/**
* Send
* - current URL
@@ -2,8 +2,6 @@
* 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/. */
/* eslint-env webextensions */
/**
* Send
* - current URL
@@ -2,8 +2,6 @@
* 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/. */
/* eslint-env webextensions */
/* Avoid adding ID selector rules in this style sheet, since they could
* inadvertently match elements in the article content. */
@@ -16,7 +16,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1845824
// Note: TestRunnerActivity provides a pseudo Experiment Delegate for this test.
async function requestExperiment(message) {
const chromeScript = SpecialPowers.loadChromeScript(_ => {
/* eslint-env mozilla/chrome-script */
addMessageListener("experiment", (msg) => {
var result;
const navigator = Services.wm.getMostRecentWindow("navigator:geckoview");
@@ -3,8 +3,6 @@
* 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/. */
/* eslint-env commonjs */
"use strict";
/**
* Fennec-specific actors.
@@ -14,7 +14,6 @@
async function requestTranslate() {
const chromeScript = SpecialPowers.loadChromeScript(_ => {
/* eslint-env mozilla/chrome-script */
addMessageListener("translate",() => {
// Get Chrome
const navigator = Services.wm.getMostRecentWindow("navigator:geckoview");
@@ -12,7 +12,6 @@
SimpleTest.waitForExplicitFinish();
var script = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
Services.obs.addObserver(function onExamResp(subject) {
let channel = subject.QueryInterface(Ci.nsIHttpChannel);
if (!channel.URI.spec.startsWith("http://example.org")) {
@@ -15,7 +15,6 @@
async function clearHttpAuthCacheTest() {
let script = SpecialPowers.loadChromeScript(function () {
/* eslint-env mozilla/chrome-script */
const {addMessageListener, sendAsyncMessage} = this;
addMessageListener("start", function () {
try {
@@ -2,8 +2,6 @@
* 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/. */
/* eslint-env mozilla/frame-script */
"use strict";
const { XPCOMUtils } = ChromeUtils.importESModule(
@@ -16,7 +16,6 @@
async function runTest() {
let script = SpecialPowers.loadChromeScript(function() {
/* eslint-env mozilla/chrome-script */
// Force download to be w/o user assistance for our testing mime type
const mimeSvc = Cc["@mozilla.org/mime;1"].getService(Ci.nsIMIMEService);
let handlerInfo =
@@ -36,7 +36,6 @@ function endOfFirstTest() {
// wantGlobalProperties should add the specified properties to the sandbox
// that is used to run the chrome script.
script2 = SpecialPowers.loadChromeScript(_ => {
/* eslint-env mozilla/chrome-script */
addMessageListener("valid-assert", function () {
assert.equal(typeof XMLHttpRequest, "function", "XMLHttpRequest is defined");
assert.equal(typeof CSS, "undefined", "CSS is not defined");
@@ -13,7 +13,6 @@ SimpleTest.waitForExplicitFinish();
var script = SpecialPowers.loadChromeScript(function loadChromeScriptTest() {
/* eslint-env mozilla/chrome-script */
// Copied from SpecialPowersLoadChromeScript.js
// Just receive 'foo' message and forward it back
@@ -104,7 +104,6 @@ add_task(async function() {
},
"SpecialPowers.loadChromeScript": async () => {
let script = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
const resultPromise = (async () => {
Assert.equal(1, 2, "Thing");
Assert.equal(1, 1, "Hmm");
@@ -27,7 +27,6 @@ const AlertNotification = Components.Constructor(
);
const chromeScript = SpecialPowers.loadChromeScript(_ => {
/* eslint-env mozilla/chrome-script */
const {setTimeout} = ChromeUtils.importESModule(
"resource://gre/modules/Timer.sys.mjs"
);
@@ -17,7 +17,6 @@ const AlertNotification = Components.Constructor(
);
const chromeScript = SpecialPowers.loadChromeScript(_ => {
/* eslint-env mozilla/chrome-script */
const {clearTimeout, setTimeout} = ChromeUtils.importESModule(
"resource://gre/modules/Timer.sys.mjs"
);
@@ -17,7 +17,6 @@ const AlertNotification = Components.Constructor(
);
const chromeScript = SpecialPowers.loadChromeScript(_ => {
/* eslint-env mozilla/chrome-script */
const {clearTimeout, setTimeout} = ChromeUtils.importESModule(
"resource://gre/modules/Timer.sys.mjs"
);
@@ -25,7 +25,6 @@ const notifier = Cc["@mozilla.org/alerts-service;1"]
.getService(Ci.nsIAlertsService);
const chromeScript = SpecialPowers.loadChromeScript(_ => {
/* eslint-env mozilla/chrome-script */
addMessageListener("anyXULAlertsVisible", function() {
var windows = Services.wm.getEnumerator("alert:alert");
return windows.hasMoreElements();
@@ -269,7 +269,6 @@ add_task(async function test_browserData_on_aboutnewtab_and_file_data() {
await new Promise(resolve => {
const chromeScript = SpecialPowers.loadChromeScript(async () => {
/* eslint-env mozilla/chrome-script */
const { SiteDataTestUtils } = ChromeUtils.importESModule(
"resource://testing-common/SiteDataTestUtils.sys.mjs"
);
@@ -68,7 +68,6 @@ add_task(async function test_contentscript_cache() {
if (appinfo.processType === appinfo.PROCESS_TYPE_CONTENT) {
/* globals addMessageListener, assert */
chromeScript = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
addMessageListener("check-script-cache", extensionId => {
const { ExtensionProcessScript } = ChromeUtils.importESModule(
"resource://gre/modules/ExtensionProcessScript.sys.mjs"
@@ -83,7 +83,6 @@ add_task(async function test_cookies_incognito_not_allowed() {
await extension.awaitMessage("set-cookies");
let chromeScript = SpecialPowers.loadChromeScript(() => {
/* eslint-env mozilla/chrome-script */
Services.cookies.add("example.org", "/", "public", `foo${Math.random()}`,
false, false, false, Number.MAX_SAFE_INTEGER, {},
Ci.nsICookie.SAMESITE_UNSET);

Some files were not shown because too many files have changed in this diff Show More