Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Firefox/dom/xhr/tests/   (Browser von der Mozilla Stiftung 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
C=96 H=100 G=97

¤ Dauer der Verarbeitung: 0.19 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.