Bug 1858073 - Do not load mochitest directory listing in quirks mode r=intermittent-reviewers,jmaher

Prepend the mochitest directory listing with `<!DOCTYPE html>` to prevent the document to be loaded in quirks mode and flood the log with console messages.

Differential Revision: https://phabricator.services.mozilla.com/D190544
This commit is contained in:
Malte Juergens 2023-10-10 13:27:34 +00:00
Родитель 6a989724fd
Коммит 5bab0100a5
2 изменённых файлов: 10 добавлений и 8 удалений

Просмотреть файл

@ -373,9 +373,10 @@ function jsonArrayOfTestFiles(links) {
function regularListing(metadata, response) {
var [links] = list(metadata.path, metadata.getProperty("directory"), false);
response.write(
HTML(
HEAD(TITLE("mochitest index ", metadata.path)),
BODY(BR(), A({ href: ".." }, "Up a level"), UL(linksToListItems(links)))
)
"<!DOCTYPE html>\n" +
HTML(
HEAD(TITLE("mochitest index ", metadata.path)),
BODY(BR(), A({ href: ".." }, "Up a level"), UL(linksToListItems(links)))
)
);
}

Просмотреть файл

@ -352,10 +352,11 @@ function serverDebug(metadata, response) {
function regularListing(metadata, response) {
var [links] = list(metadata.path, metadata.getProperty("directory"), false);
response.write(
HTML(
HEAD(TITLE("mochitest index ", metadata.path)),
BODY(BR(), A({ href: ".." }, "Up a level"), UL(linksToListItems(links)))
)
"<!DOCTYPE html>\n" +
HTML(
HEAD(TITLE("mochitest index ", metadata.path)),
BODY(BR(), A({ href: ".." }, "Up a level"), UL(linksToListItems(links)))
)
);
}