/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* eslint-env node */
const { logTest } = require("./utils/profiling");
module.exports = logTest( "speculative connect pageload",
async function (context, commands) {
context.log.info( "Starting a pageload for which we will first make a speculative connection to the host"
);
context.log.debug("Make privileged call to speculativeConnect"); const script = ` var URI = Services.io.newURI("${url}"); var principal = Services.scriptSecurityManager.createContentPrincipal(URI, {});
Services.io.QueryInterface(Ci.nsISpeculativeConnect).speculativeConnect(URI, principal, null, false);
`;
commands.js.runPrivileged(script);
// More than enough time for the connection to be made
await commands.wait.byTime(1000);
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.