diff --git a/docshell/test/browser/browser_timelineMarkers-frame-02.js b/docshell/test/browser/browser_timelineMarkers-frame-02.js index b4b3efe49f77..97620acf728f 100644 --- a/docshell/test/browser/browser_timelineMarkers-frame-02.js +++ b/docshell/test/browser/browser_timelineMarkers-frame-02.js @@ -1,6 +1,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +/* eslint-env mozilla/frame-script */ + // This file expects frame-head.js to be loaded in the environment. /* import-globals-from frame-head.js */ diff --git a/docshell/test/browser/browser_timelineMarkers-frame-03.js b/docshell/test/browser/browser_timelineMarkers-frame-03.js index 2368b360636d..4758df7fec20 100644 --- a/docshell/test/browser/browser_timelineMarkers-frame-03.js +++ b/docshell/test/browser/browser_timelineMarkers-frame-03.js @@ -1,6 +1,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +/* eslint-env mozilla/frame-script */ + // This file expects frame-head.js to be loaded in the environment. /* import-globals-from frame-head.js */ diff --git a/docshell/test/browser/browser_timelineMarkers-frame-04.js b/docshell/test/browser/browser_timelineMarkers-frame-04.js index a05804c5b38c..a6189809d242 100644 --- a/docshell/test/browser/browser_timelineMarkers-frame-04.js +++ b/docshell/test/browser/browser_timelineMarkers-frame-04.js @@ -1,6 +1,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +/* eslint-env mozilla/frame-script */ + // This file expects frame-head.js to be loaded in the environment. /* import-globals-from frame-head.js */ diff --git a/docshell/test/browser/browser_timelineMarkers-frame-05.js b/docshell/test/browser/browser_timelineMarkers-frame-05.js index b5c245e4517d..b6b128e26976 100644 --- a/docshell/test/browser/browser_timelineMarkers-frame-05.js +++ b/docshell/test/browser/browser_timelineMarkers-frame-05.js @@ -1,6 +1,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +/* eslint-env mozilla/frame-script */ + // This file expects frame-head.js to be loaded in the environment. /* import-globals-from frame-head.js */ diff --git a/dom/messagechannel/tests/mm_messageChannel.js b/dom/messagechannel/tests/mm_messageChannel.js index 443a7949e247..3bd0f5be478b 100644 --- a/dom/messagechannel/tests/mm_messageChannel.js +++ b/dom/messagechannel/tests/mm_messageChannel.js @@ -1,3 +1,5 @@ +/* eslint-env mozilla/frame-script */ + function debug(msg) { dump("[mmMessageChannelChild]" + msg + "\n"); } diff --git a/remote/marionette/reftest-content.js b/remote/marionette/reftest-content.js index 4f481217eb45..3c0712f23277 100644 --- a/remote/marionette/reftest-content.js +++ b/remote/marionette/reftest-content.js @@ -2,6 +2,8 @@ * 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( diff --git a/testing/mochitest/shutdown-leaks-collector.js b/testing/mochitest/shutdown-leaks-collector.js index fc4e7a5c7f3f..23e164c38f9f 100644 --- a/testing/mochitest/shutdown-leaks-collector.js +++ b/testing/mochitest/shutdown-leaks-collector.js @@ -2,6 +2,8 @@ * 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 */ + // We run this code in a .jsm rather than here to avoid keeping the current // compartment alive. ChromeUtils.import("chrome://mochikit/content/ShutdownLeaksCollector.jsm"); diff --git a/testing/talos/talos/pageloader/chrome/Profiler.js b/testing/talos/talos/pageloader/chrome/Profiler.js index e23efbc666cc..696bd73a6047 100644 --- a/testing/talos/talos/pageloader/chrome/Profiler.js +++ b/testing/talos/talos/pageloader/chrome/Profiler.js @@ -2,6 +2,8 @@ * 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 */ + // - NOTE: This file is duplicated verbatim at: // - talos/pageloader/chrome/Profiler.js // - talos/tests/tart/addon/content/Profiler.js diff --git a/testing/talos/talos/pageloader/chrome/a11y.js b/testing/talos/talos/pageloader/chrome/a11y.js index 83480882f2d8..302ca0ed1f84 100644 --- a/testing/talos/talos/pageloader/chrome/a11y.js +++ b/testing/talos/talos/pageloader/chrome/a11y.js @@ -2,6 +2,8 @@ * 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 */ + (function() { let gAccService = 0; diff --git a/testing/talos/talos/pageloader/chrome/lh_dummy.js b/testing/talos/talos/pageloader/chrome/lh_dummy.js index e782b2b67290..134efd4ef1af 100644 --- a/testing/talos/talos/pageloader/chrome/lh_dummy.js +++ b/testing/talos/talos/pageloader/chrome/lh_dummy.js @@ -1,6 +1,9 @@ /* 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 mozilla/frame-script */ + function _dummy() { sendAsyncMessage("PageLoader:LoadEvent", {}); } diff --git a/testing/talos/talos/pageloader/chrome/lh_fnbpaint.js b/testing/talos/talos/pageloader/chrome/lh_fnbpaint.js index 2918fda67238..5ef0066ad288 100644 --- a/testing/talos/talos/pageloader/chrome/lh_fnbpaint.js +++ b/testing/talos/talos/pageloader/chrome/lh_fnbpaint.js @@ -1,6 +1,9 @@ /* 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 mozilla/frame-script */ + var gErr = "Abort: firstNonBlankPaint value is not available after loading the page"; var gRetryCounter = 0; diff --git a/testing/talos/talos/pageloader/chrome/lh_hero.js b/testing/talos/talos/pageloader/chrome/lh_hero.js index 6b4d95a079d9..caef53f37409 100644 --- a/testing/talos/talos/pageloader/chrome/lh_hero.js +++ b/testing/talos/talos/pageloader/chrome/lh_hero.js @@ -2,6 +2,8 @@ * 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 */ + function _contentHeroHandler(isload) { var obs = null; var el = content.window.document.querySelector("[elementtiming]"); diff --git a/testing/talos/talos/pageloader/chrome/lh_moz.js b/testing/talos/talos/pageloader/chrome/lh_moz.js index 5bbdae6ea976..46d4a74a7c23 100644 --- a/testing/talos/talos/pageloader/chrome/lh_moz.js +++ b/testing/talos/talos/pageloader/chrome/lh_moz.js @@ -1,6 +1,9 @@ /* 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 mozilla/frame-script */ + function _contentPaintHandler() { var utils = content.windowUtils; if (utils.isMozAfterPaintPending) { diff --git a/testing/talos/talos/pageloader/chrome/lh_pdfpaint.js b/testing/talos/talos/pageloader/chrome/lh_pdfpaint.js index 6562d47c9dba..0f1eff6da931 100644 --- a/testing/talos/talos/pageloader/chrome/lh_pdfpaint.js +++ b/testing/talos/talos/pageloader/chrome/lh_pdfpaint.js @@ -1,6 +1,9 @@ /* 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 mozilla/frame-script */ + function _pdfPaintHandler() { content.window.addEventListener( "pagerendered", diff --git a/testing/talos/talos/pageloader/chrome/talos-content.js b/testing/talos/talos/pageloader/chrome/talos-content.js index 1189d456df12..ca21388c2c87 100644 --- a/testing/talos/talos/pageloader/chrome/talos-content.js +++ b/testing/talos/talos/pageloader/chrome/talos-content.js @@ -2,6 +2,8 @@ * 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 TalosContent = { init() { addMessageListener("Talos:ForceGC", this); diff --git a/testing/talos/talos/pageloader/chrome/tscroll.js b/testing/talos/talos/pageloader/chrome/tscroll.js index ecfc009bb5d4..03e039b58357 100644 --- a/testing/talos/talos/pageloader/chrome/tscroll.js +++ b/testing/talos/talos/pageloader/chrome/tscroll.js @@ -2,6 +2,8 @@ * 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 */ + // Note: This file is used at both tscrollx and tp5o_scroll. With the former as // unprivileged code. // - Please make sure that any changes apply cleanly to all use cases. diff --git a/testing/talos/talos/pageloader/chrome/utils.js b/testing/talos/talos/pageloader/chrome/utils.js index 368395d96bdb..e326f6c6a4a4 100644 --- a/testing/talos/talos/pageloader/chrome/utils.js +++ b/testing/talos/talos/pageloader/chrome/utils.js @@ -1,6 +1,9 @@ /* 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 mozilla/frame-script */ + var idleCallbackHandle; function _idleCallbackHandler() { diff --git a/testing/talos/talos/talos-powers/chrome/talos-powers-content.js b/testing/talos/talos/talos-powers/chrome/talos-powers-content.js index c008648162a3..9d0af680fc00 100644 --- a/testing/talos/talos/talos-powers/chrome/talos-powers-content.js +++ b/testing/talos/talos/talos-powers/chrome/talos-powers-content.js @@ -2,9 +2,7 @@ * 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/. */ -// This file is loaded as a framescript -/* global docShell */ -// eslint-env mozilla/frame-script +/* eslint-env mozilla/frame-script */ addEventListener( "TalosContentProfilerCommand", diff --git a/testing/talos/talos/talos-powers/content/TalosContentProfiler.js b/testing/talos/talos/talos-powers/content/TalosContentProfiler.js index 7d13601d5d13..bcd5b4ff0006 100644 --- a/testing/talos/talos/talos-powers/content/TalosContentProfiler.js +++ b/testing/talos/talos/talos-powers/content/TalosContentProfiler.js @@ -2,6 +2,8 @@ * 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 */ + /** * This utility script is for instrumenting your Talos test for * performance profiles while running within content. If your test diff --git a/testing/talos/talos/tests/cpstartup/extension/framescript.js b/testing/talos/talos/tests/cpstartup/extension/framescript.js index 347bc5318c5c..13b13c81aa93 100644 --- a/testing/talos/talos/tests/cpstartup/extension/framescript.js +++ b/testing/talos/talos/tests/cpstartup/extension/framescript.js @@ -1,3 +1,5 @@ +/* eslint-env mozilla/frame-script */ + (function() { sendAsyncMessage("CPStartup:BrowserChildReady", { time: Services.telemetry.msSystemNow(), diff --git a/testing/talos/talos/tests/tabpaint/framescript.js b/testing/talos/talos/tests/tabpaint/framescript.js index b8ac5c566bd6..2253a0797b1a 100644 --- a/testing/talos/talos/tests/tabpaint/framescript.js +++ b/testing/talos/talos/tests/tabpaint/framescript.js @@ -1,3 +1,5 @@ +/* eslint-env mozilla/frame-script */ + (function() { addEventListener( "load", diff --git a/testing/talos/talos/tests/tart/addon/content/framescript.js b/testing/talos/talos/tests/tart/addon/content/framescript.js index 3a0e5e6d1b15..3d34b91a3220 100644 --- a/testing/talos/talos/tests/tart/addon/content/framescript.js +++ b/testing/talos/talos/tests/tart/addon/content/framescript.js @@ -1,3 +1,5 @@ +/* eslint-env mozilla/frame-script */ + (function() { const TART_PREFIX = "tart@mozilla.org:"; diff --git a/testing/talos/talos/tests/tresize/addon/content/framescript.js b/testing/talos/talos/tests/tresize/addon/content/framescript.js index 61b655fbd526..d12bca1c645c 100644 --- a/testing/talos/talos/tests/tresize/addon/content/framescript.js +++ b/testing/talos/talos/tests/tresize/addon/content/framescript.js @@ -1,3 +1,5 @@ +/* eslint-env mozilla/frame-script */ + (function() { const TRESIZE_PREFIX = "tresize@mozilla.org:";