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

Quelle  browser_bug349769.js   Sprache: JAVA

 
add_task(async function test() {
  const uris = [undefined, "about:blank"];

  function checkContentProcess(newBrowser, uri) {
    return ContentTask.spawn(newBrowser, [uri], async function (uri) {
      var prin = content.document.nodePrincipal;
      Assert.notEqual(
        prin,
        null,
        "Loaded principal must not be null when adding " + uri
      );
      Assert.notEqual(
        prin,
        undefined,
        "Loaded principal must not be undefined when loading " + uri
      );

      Assert.equal(
        prin.isSystemPrincipal,
        false,
        "Loaded principal must not be system when loading " + uri
      );
    });
  }

  for (var uri of uris) {
    await BrowserTestUtils.withNewTab(
      { gBrowser },
      async function (newBrowser) {
        let loadedPromise = BrowserTestUtils.browserLoaded(newBrowser);
        BrowserTestUtils.startLoadingURIString(newBrowser, uri);

        var prin = newBrowser.contentPrincipal;
        isnot(
          prin,
          null,
          "Forced principal must not be null when loading " + uri
        );
        isnot(
          prin,
          undefined,
          "Forced principal must not be undefined when loading " + uri
        );
        is(
          prin.isSystemPrincipal,
          false,
          "Forced principal must not be system when loading " + uri
        );

        // Belt-and-suspenders e10s check: make sure that the same checks hold
        // true in the content process.
        await checkContentProcess(newBrowser, uri);

        await loadedPromise;

        prin = newBrowser.contentPrincipal;
        isnot(
          prin,
          null,
          "Loaded principal must not be null when adding " + uri
        );
        isnot(
          prin,
          undefined,
          "Loaded principal must not be undefined when loading " + uri
        );
        is(
          prin.isSystemPrincipal,
          false,
          "Loaded principal must not be system when loading " + uri
        );

        // Belt-and-suspenders e10s check: make sure that the same checks hold
        // true in the content process.
        await checkContentProcess(newBrowser, uri);
      }
    );
  }
});

90%


¤ Dauer der Verarbeitung: 0.17 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 ist noch experimentell.