Bug 1780543 - Part 2: Use eslint-env mozilla/frame-script consistently in test frame script. r=Standard8,webdriver-reviewers,perftest-reviewers,sparky,jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D152427
This commit is contained in:
Tooru Fujisawa 2022-07-26 02:46:29 +00:00
parent a6aabba5a4
commit a1a992d3cc
23 changed files with 50 additions and 3 deletions

View file

@ -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 */

View file

@ -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 */

View file

@ -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 */

View file

@ -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 */

View file

@ -1,3 +1,5 @@
/* eslint-env mozilla/frame-script */
function debug(msg) {
dump("[mmMessageChannelChild]" + msg + "\n");
}

View file

@ -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(

View file

@ -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");

View file

@ -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

View file

@ -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;

View file

@ -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", {});
}

View file

@ -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;

View file

@ -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]");

View file

@ -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) {

View file

@ -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",

View file

@ -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);

View file

@ -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.

View file

@ -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() {

View file

@ -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",

View file

@ -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

View file

@ -1,3 +1,5 @@
/* eslint-env mozilla/frame-script */
(function() {
sendAsyncMessage("CPStartup:BrowserChildReady", {
time: Services.telemetry.msSystemNow(),

View file

@ -1,3 +1,5 @@
/* eslint-env mozilla/frame-script */
(function() {
addEventListener(
"load",

View file

@ -1,3 +1,5 @@
/* eslint-env mozilla/frame-script */
(function() {
const TART_PREFIX = "tart@mozilla.org:";

View file

@ -1,3 +1,5 @@
/* eslint-env mozilla/frame-script */
(function() {
const TRESIZE_PREFIX = "tresize@mozilla.org:";