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

Quelle  test_blob_channelname.js

  Sprache: JAVA
 

/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */


add_task(async function channelname() {
  var file = new File(
    [new Blob(["test"], { type: "text/plain" })],
    "test-name"
  );
  var url = URL.createObjectURL(file);
  var channel = NetUtil.newChannel({
    uri: url,
    loadUsingSystemPrincipal: true,
  });

  let inputStream = channel.open();
  ok(inputStream, "Should be able to open channel");
  ok(
    inputStream.QueryInterface(Ci.nsIAsyncInputStream),
    "Stream should support async operations"
  );

  await new Promise(resolve => {
    inputStream.asyncWait(
      () => {
        let available = inputStream.available();
        ok(available, "There should be data to read");
        Assert.equal(
          channel.contentDispositionFilename,
          "test-name",
          "filename matches"
        );
        resolve();
      },
      0,
      0,
      Services.tm.mainThread
    );
  });

  inputStream.close();
  channel.cancel(Cr.NS_ERROR_FAILURE);
});

Messung V0.5 in Prozent
C=88 H=97 G=92

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

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