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

Quelle  browser_cookies.js

  Sprache: JAVA
 

"use strict";

CookiePolicyHelper.runTest("document.cookies", {
  cookieJarAccessAllowed: async _ => {
    let hasCookie = !!content.document.cookie.length;

    await content
      .fetch("server.sjs")
      .then(r => r.text())
      .then(text => {
        is(
          text,
          hasCookie ? "cookie-present" : "cookie-not-present",
          "document.cookie is consistent with fetch requests"
        );
      });

    content.document.cookie = "name=value";
    ok(content.document.cookie.includes("name=value"), "Some cookies for me");
    ok(content.document.cookie.includes("foopy=1"), "Some cookies for me");

    await content
      .fetch("server.sjs")
      .then(r => r.text())
      .then(text => {
        is(text, "cookie-present""We should have cookies");
      });

    ok(!!content.document.cookie.length, "Some Cookies for me");
  },

  cookieJarAccessDenied: async _ => {
    is(content.document.cookie, """No cookies for me");
    content.document.cookie = "name=value";
    is(content.document.cookie, """No cookies for me");

    await content
      .fetch("server.sjs")
      .then(r => r.text())
      .then(text => {
        is(text, "cookie-not-present""We should not have cookies");
      });
    // Let's do it twice.
    await content
      .fetch("server.sjs")
      .then(r => r.text())
      .then(text => {
        is(text, "cookie-not-present""We should not have cookies");
      });

    is(content.document.cookie, """Still no cookies for me");
  },
});

Messung V0.5 in Prozent
C=95 H=92 G=93

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-06-06) ¤

*© 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.