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_bug263127.js

  Sprache: JAVA
 

"use strict";

const { HttpServer } = ChromeUtils.importESModule(
  "resource://testing-common/httpd.sys.mjs"
);

var server;
const BUGID = "263127";

var listener = {
  QueryInterface: ChromeUtils.generateQI(["nsIDownloadObserver"]),

  onDownloadComplete(downloader, request, status, file) {
    do_test_pending();
    server.stop(do_test_finished);

    if (!file) {
      do_throw("Download failed");
    }

    try {
      file.remove(false);
    } catch (e) {
      do_throw(e);
    }

    Assert.ok(!file.exists());

    do_test_finished();
  },
};

function run_test() {
  // start server
  server = new HttpServer();
  server.start(-1);

  // Initialize downloader
  var channel = NetUtil.newChannel({
    uri: "http://localhost:" + server.identity.primaryPort + "/",
    loadUsingSystemPrincipal: true,
  });
  var targetFile = Services.dirsvc.get("TmpD", Ci.nsIFile);
  targetFile.append("bug" + BUGID + ".test");
  if (targetFile.exists()) {
    targetFile.remove(false);
  }

  var downloader = Cc["@mozilla.org/network/downloader;1"].createInstance(
    Ci.nsIDownloader
  );
  downloader.init(listener, targetFile);

  // Start download
  channel.asyncOpen(downloader);

  do_test_pending();
}

Messung V0.5 in Prozent
C=90 H=94 G=91

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