Bug 1957867 - Fix eslint ignore for paths containing target r=frontend-codestyle-reviewers,devtools-reviewers,Standard8,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D244130
This commit is contained in:
@@ -239,11 +239,11 @@ module.exports = [
|
|||||||
"servo/",
|
"servo/",
|
||||||
|
|
||||||
// Rust/Cargo output from running `cargo` directly
|
// Rust/Cargo output from running `cargo` directly
|
||||||
"target/",
|
"/target/",
|
||||||
"servo/ports/geckolib/target/",
|
"/servo/ports/geckolib/target/",
|
||||||
"dom/base/rust/target/",
|
"/dom/base/rust/target/",
|
||||||
"servo/components/style/target/",
|
"/servo/components/style/target/",
|
||||||
"dom/webgpu/tests/cts/vendor/target/",
|
"/dom/webgpu/tests/cts/vendor/target/",
|
||||||
|
|
||||||
// Test files that we don't want to lint (preprocessed, minified etc)
|
// Test files that we don't want to lint (preprocessed, minified etc)
|
||||||
"testing/condprofile/condprof/tests/profile",
|
"testing/condprofile/condprof/tests/profile",
|
||||||
|
|||||||
@@ -194,6 +194,7 @@ class TargetCommand extends EventEmitter {
|
|||||||
// Called whenever a new Target front is available.
|
// Called whenever a new Target front is available.
|
||||||
// Either because a target was already available as we started calling startListening
|
// Either because a target was already available as we started calling startListening
|
||||||
// or if it has just been created
|
// or if it has just been created
|
||||||
|
// eslint-disable-next-line complexity
|
||||||
async _onTargetAvailable(targetFront) {
|
async _onTargetAvailable(targetFront) {
|
||||||
// We put the `commands` on the targetFront so it can be retrieved from any front easily.
|
// We put the `commands` on the targetFront so it can be retrieved from any front easily.
|
||||||
// Without this, protocol.js fronts won't have any easy access to it.
|
// Without this, protocol.js fronts won't have any easy access to it.
|
||||||
@@ -1154,12 +1155,12 @@ class TargetCommand extends EventEmitter {
|
|||||||
* @param {WindowGlobalTargetFront} targetFront
|
* @param {WindowGlobalTargetFront} targetFront
|
||||||
* The target front we want the toolbox to focus on.
|
* The target front we want the toolbox to focus on.
|
||||||
*/
|
*/
|
||||||
selectTarget(targetFront) {
|
async selectTarget(targetFront) {
|
||||||
// Ignore any target which we may try to select, but is already being destroyed
|
// Ignore any target which we may try to select, but is already being destroyed
|
||||||
if (targetFront.isDestroyedOrBeingDestroyed()) {
|
if (targetFront.isDestroyedOrBeingDestroyed()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return this._onTargetSelected(targetFront);
|
await this._onTargetSelected(targetFront);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -415,7 +415,7 @@ async function testIframeNavigations() {
|
|||||||
info(" # Test IFRAME navigations");
|
info(" # Test IFRAME navigations");
|
||||||
// Create a TargetCommand for a given test tab
|
// Create a TargetCommand for a given test tab
|
||||||
const tab = await addTab(
|
const tab = await addTab(
|
||||||
`http://example.org/document-builder.sjs?html=<iframe src="${TEST_COM_URL}"></iframe>`
|
`https://example.org/document-builder.sjs?html=<iframe src="${TEST_COM_URL}"></iframe>`
|
||||||
);
|
);
|
||||||
const commands = await CommandsFactory.forTab(tab);
|
const commands = await CommandsFactory.forTab(tab);
|
||||||
const targetCommand = commands.targetCommand;
|
const targetCommand = commands.targetCommand;
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ add_task(async function () {
|
|||||||
},
|
},
|
||||||
files: {
|
files: {
|
||||||
"content-script.js": function () {
|
"content-script.js": function () {
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
browser.test.notifyPass("contentScriptRan");
|
browser.test.notifyPass("contentScriptRan");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -149,6 +150,7 @@ add_task(async function () {
|
|||||||
},
|
},
|
||||||
files: {
|
files: {
|
||||||
"content-script.js": function () {
|
"content-script.js": function () {
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
browser.test.notifyPass("contentScriptRan");
|
browser.test.notifyPass("contentScriptRan");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ add_task(async function () {
|
|||||||
await targetCommand.startListening();
|
await targetCommand.startListening();
|
||||||
|
|
||||||
// Observe the new document being reported while reloading
|
// Observe the new document being reported while reloading
|
||||||
let reloadedTargets = [];
|
const reloadedTargets = [];
|
||||||
await commands.resourceCommand.watchResources(
|
await commands.resourceCommand.watchResources(
|
||||||
[commands.resourceCommand.TYPES.DOCUMENT_EVENT],
|
[commands.resourceCommand.TYPES.DOCUMENT_EVENT],
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,12 +5,14 @@
|
|||||||
|
|
||||||
/* import-globals-from head.js */
|
/* import-globals-from head.js */
|
||||||
|
|
||||||
|
/* exported setupServiceWorkerNavigationTest */
|
||||||
async function setupServiceWorkerNavigationTest() {
|
async function setupServiceWorkerNavigationTest() {
|
||||||
// Disable the preloaded process as it creates processes intermittently
|
// Disable the preloaded process as it creates processes intermittently
|
||||||
// which forces the emission of RDP requests we aren't correctly waiting for.
|
// which forces the emission of RDP requests we aren't correctly waiting for.
|
||||||
await pushPref("dom.ipc.processPrelaunch.enabled", false);
|
await pushPref("dom.ipc.processPrelaunch.enabled", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* exported watchServiceWorkerTargets */
|
||||||
async function watchServiceWorkerTargets(tab) {
|
async function watchServiceWorkerTargets(tab) {
|
||||||
info("Create a target list for a tab target");
|
info("Create a target list for a tab target");
|
||||||
const commands = await CommandsFactory.forTab(tab);
|
const commands = await CommandsFactory.forTab(tab);
|
||||||
@@ -52,6 +54,7 @@ async function watchServiceWorkerTargets(tab) {
|
|||||||
/**
|
/**
|
||||||
* Wait until the expected URL is loaded and win.registration has resolved.
|
* Wait until the expected URL is loaded and win.registration has resolved.
|
||||||
*/
|
*/
|
||||||
|
/* exported waitForRegistrationReady */
|
||||||
async function waitForRegistrationReady(tab, expectedPageUrl, workerUrl) {
|
async function waitForRegistrationReady(tab, expectedPageUrl, workerUrl) {
|
||||||
await asyncWaitUntil(() =>
|
await asyncWaitUntil(() =>
|
||||||
SpecialPowers.spawn(tab.linkedBrowser, [expectedPageUrl], function (_url) {
|
SpecialPowers.spawn(tab.linkedBrowser, [expectedPageUrl], function (_url) {
|
||||||
@@ -92,6 +95,7 @@ async function waitForRegistrationReady(tab, expectedPageUrl, workerUrl) {
|
|||||||
* onDestroyed callbacks. Assert that the callbacks have been called the
|
* onDestroyed callbacks. Assert that the callbacks have been called the
|
||||||
* expected number of times, with the expected targets.
|
* expected number of times, with the expected targets.
|
||||||
*/
|
*/
|
||||||
|
/* exported checkHooks */
|
||||||
async function checkHooks(hooks, { available, destroyed, targets }) {
|
async function checkHooks(hooks, { available, destroyed, targets }) {
|
||||||
await waitUntil(
|
await waitUntil(
|
||||||
() => hooks.availableCount == available && hooks.destroyedCount == destroyed
|
() => hooks.availableCount == available && hooks.destroyedCount == destroyed
|
||||||
|
|||||||
Reference in New Issue
Block a user