Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/docshell/test/browser/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 955 B image not shown  

Quelle  browser_bug2002654.js

  Sprache: JAVA
 

"use strict";

// This test makes sure that a policy container & content security policy is initialized for frontend created documents
// see bug https://bugzilla.mozilla.org/show_bug.cgi?id=2002654
add_task(async function test_policy_container_and_csp_in_about_blank() {
  let tab = await BrowserTestUtils.openNewForegroundTab(
    gBrowser,
    "about:blank"
  );
  try {
    await SpecialPowers.spawn(tab.linkedBrowser, [], function () {
      let meta = content.document.createElement("meta");
      meta.httpEquiv = "Content-Security-Policy";
      meta.content = "script-src 'none'";
      content.document.head.appendChild(meta);
      Assert.ok(
        (() => {
          try {
            content.window.eval("1 + 1");
            return false;
          } catch (ex) {
            return true;
          }
        })(),
        "CSP set for frontend created document"
      );
    });
  } finally {
    BrowserTestUtils.removeTab(tab);
  }
});

Messung V0.5 in Prozent
C=90 H=97 G=93

¤ Dauer der Verarbeitung: 0.29 Sekunden  (vorverarbeitet am  2026-08-25) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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.