From 2b7e2e5f7b1acaa4e81f95054be8a399ae4a5a44 Mon Sep 17 00:00:00 2001 From: Mark Banner Date: Tue, 21 Jan 2020 20:46:28 +0000 Subject: [PATCH] Bug 1607172 - Move dom third-party entries across to ThirdPartyPaths.txt, and clean up .eslintignore for dom. r=jya Differential Revision: https://phabricator.services.mozilla.com/D59694 --HG-- extra : moz-landing-system : lando --- .eslintignore | 15 +++++---------- dom/canvas/test/webgl-conf/mochi-single.html | 4 ++-- dom/media/webvtt/tests/.eslintrc.js | 7 +++++++ dom/media/webvtt/tests/test_parser.js | 6 ++++-- dom/media/webvtt/update-webvtt.js | 3 +++ tools/rewriting/ThirdPartyPaths.txt | 3 +++ 6 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 dom/media/webvtt/tests/.eslintrc.js diff --git a/.eslintignore b/.eslintignore index 942ee705339f..87b58b92e9ea 100644 --- a/.eslintignore +++ b/.eslintignore @@ -54,7 +54,6 @@ browser/components/pocket/content/panels/js/vendor/ # Kept in sync with browser/components/newtab/.eslintignore browser/components/newtab/data/ browser/components/newtab/logs/ -browser/components/newtab/vendor/ # The only file in browser/locales/ is pre-processed. browser/locales/ @@ -121,11 +120,11 @@ devtools/client/webconsole/test/browser/test-syntaxerror-worklet.js # devtools specific format test file devtools/server/tests/xpcshell/xpcshell_debugging_script.js -# Third-party -dom/canvas/test/webgl-conf/ -dom/imptests/ -dom/media/webaudio/test/blink/ -dom/media/webvtt/ +# Generated +dom/canvas/test/webgl-conf/generated/ + +# Intentionally invalid/not parsable +dom/html/test/test_bug677658.html dom/svg/test/test_nonAnimStrings.xhtml dom/svg/test/test_SVG_namespace_ids.html @@ -135,10 +134,6 @@ dom/encoding/test/test_utf16_files.html dom/encoding/test/file_utf16_be_bom.js dom/encoding/test/file_utf16_le_bom.js -# Not parsable -dom/tests/mochitest/general/test_focusrings.xul -dom/html/test/test_bug677658.html - # Service workers fixtures which require specific resource caching. dom/base/test/file_js_cache.js dom/serviceworkers/test/file_js_cache.js diff --git a/dom/canvas/test/webgl-conf/mochi-single.html b/dom/canvas/test/webgl-conf/mochi-single.html index 2e09792f85f5..2d88d3ddec37 100644 --- a/dom/canvas/test/webgl-conf/mochi-single.html +++ b/dom/canvas/test/webgl-conf/mochi-single.html @@ -17,7 +17,7 @@ var frameElem = document.getElementById('test-frame'); //////////////////////////////////////////////////////////////////////// window.webglTestHarness = { - reportResults: function(pathname, success, message) { + reportResults(pathname, success, message) { if (parent) { parent.ok(success, message); } else { @@ -25,7 +25,7 @@ window.webglTestHarness = { } }, - notifyFinished: function(testPath) { + notifyFinished(testPath) { if (parent) { parent.SimpleTest.finish(); } else { diff --git a/dom/media/webvtt/tests/.eslintrc.js b/dom/media/webvtt/tests/.eslintrc.js new file mode 100644 index 000000000000..9db908f38e33 --- /dev/null +++ b/dom/media/webvtt/tests/.eslintrc.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = { + "extends": [ + "plugin:mozilla/xpcshell-test", + ] +}; diff --git a/dom/media/webvtt/tests/test_parser.js b/dom/media/webvtt/tests/test_parser.js index 509c96d2b915..b59179b26685 100644 --- a/dom/media/webvtt/tests/test_parser.js +++ b/dom/media/webvtt/tests/test_parser.js @@ -3,8 +3,10 @@ const { WebVTT } = ChromeUtils.import("resource://gre/modules/vtt.jsm"); let fakeWindow = { - VTTCue() {}, - VTTRegion() {}, + /* eslint-disable object-shorthand */ + VTTCue: function() {}, + VTTRegion: function() {}, + /* eslint-enable object-shorthand */ }; // We have a better parser check in WPT. Here I want to check that incomplete diff --git a/dom/media/webvtt/update-webvtt.js b/dom/media/webvtt/update-webvtt.js index a919a20d690d..11de0355f354 100644 --- a/dom/media/webvtt/update-webvtt.js +++ b/dom/media/webvtt/update-webvtt.js @@ -1,4 +1,7 @@ #!/usr/bin/env node + +/* eslint-env node */ + var gift = require("gift"), fs = require("fs"), argv = require("optimist") diff --git a/tools/rewriting/ThirdPartyPaths.txt b/tools/rewriting/ThirdPartyPaths.txt index ec2a328922c9..680eaea7790f 100644 --- a/tools/rewriting/ThirdPartyPaths.txt +++ b/tools/rewriting/ThirdPartyPaths.txt @@ -24,6 +24,7 @@ devtools/shared/qrcode/encoder/ devtools/shared/sprintfjs/ devtools/shared/storage/vendor/ dom/canvas/test/webgl-conf/checkout/ +dom/imptests/ dom/media/gmp/rlz/ dom/media/gmp/widevine-adapter/content_decryption_module_export.h dom/media/gmp/widevine-adapter/content_decryption_module_ext.h @@ -34,12 +35,14 @@ dom/media/platforms/ffmpeg/ffmpeg58/ dom/media/platforms/ffmpeg/libav53/ dom/media/platforms/ffmpeg/libav54/ dom/media/platforms/ffmpeg/libav55/ +dom/media/webaudio/test/blink/ dom/media/webspeech/recognition/endpointer.cc dom/media/webspeech/recognition/endpointer.h dom/media/webspeech/recognition/energy_endpointer.cc dom/media/webspeech/recognition/energy_endpointer.h dom/media/webspeech/recognition/energy_endpointer_params.cc dom/media/webspeech/recognition/energy_endpointer_params.h +dom/media/webvtt/vtt.jsm dom/tests/mochitest/ajax/ dom/tests/mochitest/dom-level1-core/ dom/tests/mochitest/dom-level2-core/