From def92d1b8e9d373e2f6f27c366d578d97d8960c6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:50 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- .../test/static/browser_all_files_referenced.js | 26 ++++++++++++++++------ .../content/test/static/browser_parsable_css.js | 14 +++++------- .../content/test/static/browser_parsable_script.js | 8 +++---- browser/base/content/test/static/head.js | 2 +- 4 files changed, 29 insertions(+), 21 deletions(-) (limited to 'browser/base/content/test/static') diff --git a/browser/base/content/test/static/browser_all_files_referenced.js b/browser/base/content/test/static/browser_all_files_referenced.js index 5e83443ec7..d73c3fe8de 100644 --- a/browser/base/content/test/static/browser_all_files_referenced.js +++ b/browser/base/content/test/static/browser_all_files_referenced.js @@ -81,6 +81,9 @@ var gExceptionPaths = [ // CSS files are referenced inside JS in an html template "chrome://browser/content/aboutlogins/components/", + + // Strip on Share parameter lists + "chrome://global/content/antitracking/", ]; // These are not part of the omni.ja file, so we find them only when running @@ -99,13 +102,6 @@ if (AppConstants.MOZ_BACKGROUNDTASKS) { gExceptionPaths.push("resource://app/modules/backgroundtasks/"); } -if (AppConstants.NIGHTLY_BUILD) { - // This is nightly-only debug tool. - gExceptionPaths.push( - "chrome://browser/content/places/interactionsViewer.html" - ); -} - // Each allowlist entry should have a comment indicating which file is // referencing the listed file in a way that the test can't detect, or a // bug number to remove or use the file if it is indeed currently unreferenced. @@ -283,6 +279,9 @@ var allowlist = [ // Bug 1875361 { file: "chrome://global/content/ml/SummarizerModel.sys.mjs" }, + // Bug 1886130 + { file: "chrome://global/content/ml/ModelHub.sys.mjs" }, + // toolkit/xre/MacRunFromDmgUtils.mm { file: "resource://gre/localization/en-US/toolkit/global/run-from-dmg.ftl" }, @@ -293,6 +292,19 @@ var allowlist = [ { file: "chrome://browser/content/screenshots/download-white.svg" }, ]; +if (AppConstants.NIGHTLY_BUILD) { + allowlist.push( + ...[ + // This is nightly-only debug tool. + { file: "chrome://browser/content/places/interactionsViewer.html" }, + + // A debug tool that is only available in Nightly builds, and is accessed + // directly by developers via the chrome URI (bug 1888491) + { file: "chrome://browser/content/backup/debug.html" }, + ] + ); +} + if (AppConstants.platform != "win") { // toolkit/mozapps/defaultagent/Notification.cpp // toolkit/mozapps/defaultagent/ScheduledTask.cpp diff --git a/browser/base/content/test/static/browser_parsable_css.js b/browser/base/content/test/static/browser_parsable_css.js index 602cc5a7e2..fb91da578a 100644 --- a/browser/base/content/test/static/browser_parsable_css.js +++ b/browser/base/content/test/static/browser_parsable_css.js @@ -13,12 +13,6 @@ let ignoreList = [ // CodeMirror is imported as-is, see bug 1004423. { sourceName: /codemirror\.css$/i, isFromDevTools: true }, // UA-only media features. - { - sourceName: /\b(autocomplete-item)\.css$/, - errorMessage: /Expected media feature name but found \u2018-moz.*/i, - isFromDevTools: false, - platforms: ["windows"], - }, { sourceName: /\b(contenteditable|EditorOverride|svg|forms|html|mathml|ua)\.css$/i, @@ -27,7 +21,7 @@ let ignoreList = [ }, { sourceName: - /\b(scrollbars|xul|html|mathml|ua|forms|svg|manageDialog|autocomplete-item-shared|formautofill)\.css$/i, + /\b(scrollbars|xul|html|mathml|ua|forms|svg|manageDialog|formautofill)\.css$/i, errorMessage: /Unknown property.*-moz-/i, isFromDevTools: false, }, @@ -123,6 +117,8 @@ let propNameAllowlist = [ isFromDevTools: false, }, { propName: "--browser-stack-z-index-rdm-toolbar", isFromDevTools: false }, + // about:profiling is in devtools even though it uses non-devtools styles. + { propName: "--in-content-border-hover", isFromDevTools: false }, // These variables are specified from devtools but read from non-devtools // styles, which confuses the test. @@ -434,13 +430,13 @@ add_task(async function checkAllTheCSS() { let loadCSS = chromeUri => new Promise(resolve => { let linkEl, onLoad, onError; - onLoad = e => { + onLoad = () => { processCSSRules(linkEl.sheet); resolve(); linkEl.removeEventListener("load", onLoad); linkEl.removeEventListener("error", onError); }; - onError = e => { + onError = () => { ok( false, "Loading " + linkEl.getAttribute("href") + " threw an error!" diff --git a/browser/base/content/test/static/browser_parsable_script.js b/browser/base/content/test/static/browser_parsable_script.js index d4dcbd87fe..3d8fbc1535 100644 --- a/browser/base/content/test/static/browser_parsable_script.js +++ b/browser/base/content/test/static/browser_parsable_script.js @@ -22,9 +22,9 @@ const kESModuleList = new Set([ /chrome\/pdfjs\/content\/web\/.*\.js$/, ]); -// Normally we would use reflect.jsm to get Reflect.parse. However, if -// we do that, then all the AST data is allocated in reflect.jsm's -// zone. That exposes a bug in our GC. The GC collects reflect.jsm's +// Normally we would use reflect.sys.mjs to get Reflect.parse. However, if +// we do that, then all the AST data is allocated in reflect.sys.mjs's +// zone. That exposes a bug in our GC. The GC collects reflect.sys.mjs's // zone but not the zone in which our test code lives (since no new // data is being allocated in it). The cross-compartment wrappers in // our zone that point to the AST data never get collected, and so the @@ -69,7 +69,7 @@ function uriIsESModule(uri) { } function parsePromise(uri, parseTarget) { - let promise = new Promise((resolve, reject) => { + let promise = new Promise(resolve => { let xhr = new XMLHttpRequest(); xhr.open("GET", uri, true); xhr.onreadystatechange = function () { diff --git a/browser/base/content/test/static/head.js b/browser/base/content/test/static/head.js index d9b978e853..317ad430af 100644 --- a/browser/base/content/test/static/head.js +++ b/browser/base/content/test/static/head.js @@ -135,7 +135,7 @@ function* generateEntriesFromJarFile(jarFile, extension) { } function fetchFile(uri) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { let xhr = new XMLHttpRequest(); xhr.responseType = "text"; xhr.open("GET", uri, true); -- cgit v1.2.3