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

Quelle  browser_temporaryFile.js

  Sprache: JAVA
 

add_task(async _ => {
  await new Promise(resolve => {
    var xhr = new XMLHttpRequest();
    xhr.open(
      "POST",
      "http://mochi.test:8888/browser/dom/xhr/tests/temporaryFileBlob.sjs"
    );
    xhr.responseType = "blob";
    xhr.send("");
    xhr.onloadend = __ => {
      is(xhr.response.blobImplType, "EmptyBlobImpl""We want a EmptyBlobImpl");
      resolve();
    };
  });
});

add_task(async _ => {
  var data = new Array(2).join("1234567890ABCDEF");

  await new Promise(resolve => {
    var xhr = new XMLHttpRequest();
    xhr.open(
      "POST",
      "http://mochi.test:8888/browser/dom/xhr/tests/temporaryFileBlob.sjs"
    );
    xhr.responseType = "blob";
    xhr.send({
      toString() {
        return data;
      },
    });
    xhr.onloadend = __ => {
      is(
        xhr.response.blobImplType,
        "MemoryBlobImpl",
        "We want a MemoryBlobImpl"
      );
      resolve();
    };
  });
});

add_task(async _ => {
  await SpecialPowers.pushPrefEnv({
    set: [["dom.blob.memoryToTemporaryFile"1]],
  });

  var data = new Array(2).join("1234567890ABCDEF");

  await new Promise(resolve => {
    var xhr = new XMLHttpRequest();
    xhr.open(
      "POST",
      "http://mochi.test:8888/browser/dom/xhr/tests/temporaryFileBlob.sjs"
    );
    xhr.responseType = "blob";
    xhr.send({
      toString() {
        return data;
      },
    });
    xhr.onloadend = __ => {
      is(
        xhr.response.blobImplType,
        "StreamBlobImpl[TemporaryFileBlobImpl]",
        "We want a StreamBlobImpl holding a TemporaryFileBlobImpl on the parent side"
      );
      resolve();
    };
  });
});

Messung V0.5 in Prozent
C=94 H=98 G=95

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

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