Bug 1614891 - Clarify the ESLint situation around some remote/ files. Remove unnecessary remote/test/demo.js. r=remote-protocol-reviewers,whimboo

Differential Revision: https://phabricator.services.mozilla.com/D62547

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mark Banner 2020-02-13 09:23:19 +00:00
parent bb0152beb3
commit e4edff6d1a
4 changed files with 15 additions and 8 deletions

View file

@ -1,6 +1,5 @@
# Please DO NOT add more third party files to this file.
# They should be added to tools/rewriting/ThirdPartyPaths.txt instead.
# The remaining third-party paths will be removed in bug 1608799.
# This file should only be used for exclusions where we have:
# - preprocessed files
@ -158,10 +157,9 @@ modules/libpref/test/unit/*data/
# Only contains non-standard test files.
python/
# Remote agent
# These are (mainly) imported code that we don't want to lint to make imports easier.
remote/Protocol.jsm
remote/test/browser/chrome-remote-interface.js
remote/test/demo.js
# services/ exclusions
@ -186,6 +184,7 @@ testing/talos/talos/tests/devtools/addon/content/pages/
testing/talos/talos/tests/tp5n/
testing/talos/talos/fis/tp5n/
# Mainly third-party related code, that shouldn't be linted.
testing/web-platform/
# toolkit/ exclusions

View file

@ -6,6 +6,8 @@
var EXPORTED_SYMBOLS = ["Protocol"];
// The `Description` below is imported from Chromium Code.
// TODO(ato): We send back a description of the protocol
// when the user makes the initial HTTP request,
// but the following is pure fiction.

View file

@ -1,3 +1,5 @@
/* eslint-env node */
"use strict";
// Node.js script to test basic CDP behaviors against Firefox and Chromium.
@ -22,7 +24,7 @@ async function demo() {
let client;
try {
client = await CDP();
const {Log, Network, Page, Runtime} = client;
const { Log, Page, Runtime } = client;
// Bug 1553756, Firefox requires `contextId` argument to be passed to
// Runtime.evaluate, so fetch the current context id it first.
@ -48,9 +50,9 @@ async function demo() {
// receive console.log messages and print them
Log.enable();
Log.entryAdded(({entry}) => {
const {timestamp, level, text, args} = entry;
const msg = text || args.join(" ");
Log.entryAdded(({ entry }) => {
const { timestamp, level, text, args } = entry;
const msg = text || args.join(" ");
console.log(`${new Date(timestamp)}\t${level.toUpperCase()}\t${msg}`);
});
@ -58,7 +60,10 @@ async function demo() {
await Page.enable();
const onLoad = Page.loadEventFired();
await Page.navigate({url: "data:text/html,test-page<script>console.log('foo');</script><script>'</script>"});
await Page.navigate({
url:
"data:text/html,test-page<script>console.log('foo');</script><script>'</script>",
});
await onLoad;
} catch (e) {
console.error(e);

View file

@ -121,6 +121,7 @@ netwerk/srtp/src/
nsprpub/
other-licenses/
parser/expat/
remote/test/browser/chrome-remote-interface.js
remote/test/puppeteer/
security/nss/
security/sandbox/chromium/