Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 61392c7

Browse files
committed
Bug 1966660 - fix browser_all_files_referenced.js to avoid complaining about moz-src references to devtools files, r=Standard8
Also allow moz-src urls with 2 slashes to prep for having non-empty hosts in those URLs in future. Differential Revision: https://phabricator.services.mozilla.com/D255060
1 parent 7b30f46 commit 61392c7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

browser/base/content/test/static/browser_all_files_referenced.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ function parseCodeFile(fileUri) {
647647
);
648648

649649
if (!urls) {
650-
urls = line.match(/["']moz-src:\/\/\/[^"']+["']/g);
650+
urls = line.match(/["']moz-src:\/\/[^"']+["']/g);
651651
}
652652

653653
if (!urls) {
@@ -879,19 +879,18 @@ add_task(async function checkAllTheFiles() {
879879
const libxul = await IOUtils.read(PathUtils.xulLibraryPath);
880880
findChromeUrlsFromArray(libxul, "chrome://");
881881
findChromeUrlsFromArray(libxul, "resource://");
882-
findChromeUrlsFromArray(libxul, "moz-src:///");
882+
findChromeUrlsFromArray(libxul, "moz-src://");
883883
// Handle NS_LITERAL_STRING.
884884
let uint16 = new Uint16Array(libxul.buffer);
885885
findChromeUrlsFromArray(uint16, "chrome://");
886886
findChromeUrlsFromArray(uint16, "resource://");
887-
findChromeUrlsFromArray(uint16, "moz-src:///");
887+
findChromeUrlsFromArray(uint16, "moz-src://");
888888

889889
const kCodeExtensions = [
890890
".xml",
891891
".xsl",
892892
".mjs",
893893
".js",
894-
".jsm",
895894
".json",
896895
".html",
897896
".xhtml",
@@ -1017,7 +1016,8 @@ add_task(async function checkAllTheFiles() {
10171016
if (isDevtools) {
10181017
if (
10191018
ref.startsWith("resource://app/components/") ||
1020-
(file.startsWith("chrome://") && ref.startsWith("resource://"))
1019+
(file.startsWith("chrome://") &&
1020+
(ref.startsWith("resource://") || ref.startsWith("moz-src://")))
10211021
) {
10221022
return false;
10231023
}

0 commit comments

Comments
 (0)