зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
6a989724fd
Коммит
5bab0100a5
|
@ -373,9 +373,10 @@ function jsonArrayOfTestFiles(links) {
|
||||||
function regularListing(metadata, response) {
|
function regularListing(metadata, response) {
|
||||||
var [links] = list(metadata.path, metadata.getProperty("directory"), false);
|
var [links] = list(metadata.path, metadata.getProperty("directory"), false);
|
||||||
response.write(
|
response.write(
|
||||||
HTML(
|
"<!DOCTYPE html>\n" +
|
||||||
HEAD(TITLE("mochitest index ", metadata.path)),
|
HTML(
|
||||||
BODY(BR(), A({ href: ".." }, "Up a level"), UL(linksToListItems(links)))
|
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) {
|
function regularListing(metadata, response) {
|
||||||
var [links] = list(metadata.path, metadata.getProperty("directory"), false);
|
var [links] = list(metadata.path, metadata.getProperty("directory"), false);
|
||||||
response.write(
|
response.write(
|
||||||
HTML(
|
"<!DOCTYPE html>\n" +
|
||||||
HEAD(TITLE("mochitest index ", metadata.path)),
|
HTML(
|
||||||
BODY(BR(), A({ href: ".." }, "Up a level"), UL(linksToListItems(links)))
|
HEAD(TITLE("mochitest index ", metadata.path)),
|
||||||
)
|
BODY(BR(), A({ href: ".." }, "Up a level"), UL(linksToListItems(links)))
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче