Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/base/test/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  test_progress_events_for_gzip_data.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/dom/base/test/test_progress_events_for_gzip_data.html


<!DOCTYPE HTML>
<html>
<head>
  <title>Test progess events in case of gzipped data.</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body onload="onLoadData()">
<script  class="testbody" type="text/javascript">"use strict";
SimpleTest.waitForExplicitFinish();

var url = "send_gzip_content.sjs";
var loaded = 0;
var total = 0;

function onProgress(e) {
  if(e.lengthComputable) {
    loaded = e.loaded;
    total = e.total;
    if (loaded > total) {
      ok(false, "We have loaded more bytes (" + loaded +
                ") than the total amount of bytes (" + total +
                ") available!!!");
    }
  }
}

function onLoadData() {
  var xhr = new XMLHttpRequest();
  xhr.addEventListener('progress', onProgress);
  xhr.open('GET', url, true);
  xhr.onreadystatechange = function() {
    if (xhr.readyState == 4) {
      is(loaded, total, "loaded should be equal to total");
      isnot(loaded, 0"loaded should be bigger than 0");
      SimpleTest.finish();
    }
  }
  xhr.send(null);
}

</script>
</body>
</html>

Messung V0.5 in Prozent
C=98 H=100 G=98

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

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