Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/netwerk/test/browser/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  browser_mock_https_rr.js   Sprache: JAVA

 
// This test verifies that Firefox correctly upgrades an HTTP request to HTTPS
// when the request's domain name matches network.dns.mock_HTTPS_RR_domain.

"use strict";

const testPathUpgradeable = getRootDirectory(gTestPath).replace(
  "chrome://mochitests/content",
  // eslint-disable-next-line @microsoft/sdl/no-insecure-url
  "http://example.org"
);

const kTestURI = testPathUpgradeable + "dummy.html";

add_task(async function () {
  // Set the mock_HTTPS_RR_domain and tell necko to use HTTPS RR.
  await SpecialPowers.pushPrefEnv({
    set: [
      ["network.dns.mock_HTTPS_RR_domain""example.org"],
      ["network.dns.force_use_https_rr"true],
    ],
  });

  await BrowserTestUtils.withNewTab("about:blank", async function (browser) {
    const loaded = BrowserTestUtils.browserLoaded(browser, falsenulltrue);
    // The page should be upgraded to HTTPS.
    BrowserTestUtils.startLoadingURIString(browser, kTestURI);
    await loaded;
    await ContentTask.spawn(browser, {}, async () => {
      ok(
        content.document.location.href.startsWith("https://"),
        "Should be https"
      );
    });
  });
});

Messung V0.5
C=78 H=100 G=89

¤ Dauer der Verarbeitung: 0.21 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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.