if (AppConstants.platform != "android") { // We load HTML documents, which try to track link state, which requires // the history service, which requires a profile.
do_get_profile();
}
function run_test() { if (AppConstants.platform != "android") { // xpcshell tests are weird. They fake shutdown after the test finishes. This upsets this test // because it will try to create the history service to check for visited state on the links // we're parsing. // Creating the history service midway through shutdown breaks. // We can't catch this in the history component because we're not *actually* shutting down, // and so the app startup's service's `shuttingDown` bool is false, even though normally that // is set to true *before* profile-change-teardown notifications are fired. // To work around this, just force the history service to be created earlier:
let { PlacesUtils } = ChromeUtils.importESModule( "resource://gre/modules/PlacesUtils.sys.mjs"
); Assert.ok(
PlacesUtils.history.databaseStatus <= 1, "ensure places database is successfully initialized."
);
}
var ParserUtils = Cc["@mozilla.org/parserutils;1"].getService(
Ci.nsIParserUtils
); var sanitizeFlags =
ParserUtils.SanitizerDropForms |
ParserUtils.SanitizerDropNonCSSPresentation |
ParserUtils.SanitizerAllowStyle;
for (let { data, sanitized } of kTestCases) {
let out = ParserUtils.sanitize(`<style>${data}</style>`, sanitizeFlags);
info(out); Assert.equal(
`<html><head><style>${sanitized}</style></head><body></body></html>`,
out
);
}
for (let { data, sanitized } of kConditionalCSSTestCases) {
let out = ParserUtils.removeConditionalCSS(`<style>${data}</style>`);
info(out); Assert.equal(
`<html><head><style>${sanitized}</style></head><body></body></html>`,
out
);
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-04-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.