forked from mirrors/gecko-dev
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:
parent
a6aabba5a4
commit
a1a992d3cc
23 changed files with 50 additions and 3 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
/* Any copyright is dedicated to the Public Domain.
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
|
/* eslint-env mozilla/frame-script */
|
||||||
|
|
||||||
// This file expects frame-head.js to be loaded in the environment.
|
// This file expects frame-head.js to be loaded in the environment.
|
||||||
/* import-globals-from frame-head.js */
|
/* import-globals-from frame-head.js */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
/* Any copyright is dedicated to the Public Domain.
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
|
/* eslint-env mozilla/frame-script */
|
||||||
|
|
||||||
// This file expects frame-head.js to be loaded in the environment.
|
// This file expects frame-head.js to be loaded in the environment.
|
||||||
/* import-globals-from frame-head.js */
|
/* import-globals-from frame-head.js */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
/* Any copyright is dedicated to the Public Domain.
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
|
/* eslint-env mozilla/frame-script */
|
||||||
|
|
||||||
// This file expects frame-head.js to be loaded in the environment.
|
// This file expects frame-head.js to be loaded in the environment.
|
||||||
/* import-globals-from frame-head.js */
|
/* import-globals-from frame-head.js */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
/* Any copyright is dedicated to the Public Domain.
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
|
/* eslint-env mozilla/frame-script */
|
||||||
|
|
||||||
// This file expects frame-head.js to be loaded in the environment.
|
// This file expects frame-head.js to be loaded in the environment.
|
||||||
/* import-globals-from frame-head.js */
|
/* import-globals-from frame-head.js */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* eslint-env mozilla/frame-script */
|
||||||
|
|
||||||
function debug(msg) {
|
function debug(msg) {
|
||||||
dump("[mmMessageChannelChild]" + msg + "\n");
|
dump("[mmMessageChannelChild]" + msg + "\n");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
* 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(
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
* 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 */
|
||||||
|
|
||||||
// We run this code in a .jsm rather than here to avoid keeping the current
|
// We run this code in a .jsm rather than here to avoid keeping the current
|
||||||
// compartment alive.
|
// compartment alive.
|
||||||
ChromeUtils.import("chrome://mochikit/content/ShutdownLeaksCollector.jsm");
|
ChromeUtils.import("chrome://mochikit/content/ShutdownLeaksCollector.jsm");
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
* 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 */
|
||||||
|
|
||||||
// - NOTE: This file is duplicated verbatim at:
|
// - NOTE: This file is duplicated verbatim at:
|
||||||
// - talos/pageloader/chrome/Profiler.js
|
// - talos/pageloader/chrome/Profiler.js
|
||||||
// - talos/tests/tart/addon/content/Profiler.js
|
// - talos/tests/tart/addon/content/Profiler.js
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
* 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 */
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
let gAccService = 0;
|
let gAccService = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
/* 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 mozilla/frame-script */
|
||||||
|
|
||||||
function _dummy() {
|
function _dummy() {
|
||||||
sendAsyncMessage("PageLoader:LoadEvent", {});
|
sendAsyncMessage("PageLoader:LoadEvent", {});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
/* 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 mozilla/frame-script */
|
||||||
|
|
||||||
var gErr =
|
var gErr =
|
||||||
"Abort: firstNonBlankPaint value is not available after loading the page";
|
"Abort: firstNonBlankPaint value is not available after loading the page";
|
||||||
var gRetryCounter = 0;
|
var gRetryCounter = 0;
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
* 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 */
|
||||||
|
|
||||||
function _contentHeroHandler(isload) {
|
function _contentHeroHandler(isload) {
|
||||||
var obs = null;
|
var obs = null;
|
||||||
var el = content.window.document.querySelector("[elementtiming]");
|
var el = content.window.document.querySelector("[elementtiming]");
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
/* 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 mozilla/frame-script */
|
||||||
|
|
||||||
function _contentPaintHandler() {
|
function _contentPaintHandler() {
|
||||||
var utils = content.windowUtils;
|
var utils = content.windowUtils;
|
||||||
if (utils.isMozAfterPaintPending) {
|
if (utils.isMozAfterPaintPending) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
/* 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 mozilla/frame-script */
|
||||||
|
|
||||||
function _pdfPaintHandler() {
|
function _pdfPaintHandler() {
|
||||||
content.window.addEventListener(
|
content.window.addEventListener(
|
||||||
"pagerendered",
|
"pagerendered",
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
* 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 TalosContent = {
|
const TalosContent = {
|
||||||
init() {
|
init() {
|
||||||
addMessageListener("Talos:ForceGC", this);
|
addMessageListener("Talos:ForceGC", this);
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
* 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 */
|
||||||
|
|
||||||
// Note: This file is used at both tscrollx and tp5o_scroll. With the former as
|
// Note: This file is used at both tscrollx and tp5o_scroll. With the former as
|
||||||
// unprivileged code.
|
// unprivileged code.
|
||||||
// - Please make sure that any changes apply cleanly to all use cases.
|
// - Please make sure that any changes apply cleanly to all use cases.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
/* 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 mozilla/frame-script */
|
||||||
|
|
||||||
var idleCallbackHandle;
|
var idleCallbackHandle;
|
||||||
|
|
||||||
function _idleCallbackHandler() {
|
function _idleCallbackHandler() {
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,7 @@
|
||||||
* 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/. */
|
||||||
|
|
||||||
// This file is loaded as a framescript
|
/* eslint-env mozilla/frame-script */
|
||||||
/* global docShell */
|
|
||||||
// eslint-env mozilla/frame-script
|
|
||||||
|
|
||||||
addEventListener(
|
addEventListener(
|
||||||
"TalosContentProfilerCommand",
|
"TalosContentProfilerCommand",
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
* 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 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This utility script is for instrumenting your Talos test for
|
* This utility script is for instrumenting your Talos test for
|
||||||
* performance profiles while running within content. If your test
|
* performance profiles while running within content. If your test
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* eslint-env mozilla/frame-script */
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
sendAsyncMessage("CPStartup:BrowserChildReady", {
|
sendAsyncMessage("CPStartup:BrowserChildReady", {
|
||||||
time: Services.telemetry.msSystemNow(),
|
time: Services.telemetry.msSystemNow(),
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* eslint-env mozilla/frame-script */
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
addEventListener(
|
addEventListener(
|
||||||
"load",
|
"load",
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* eslint-env mozilla/frame-script */
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
const TART_PREFIX = "tart@mozilla.org:";
|
const TART_PREFIX = "tart@mozilla.org:";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* eslint-env mozilla/frame-script */
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
const TRESIZE_PREFIX = "tresize@mozilla.org:";
|
const TRESIZE_PREFIX = "tresize@mozilla.org:";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue