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

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