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

Quelle  test_timeZoneOverride.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/dom/workers/test/test_timeZoneOverride.html


<!--
  Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/
-->

<!DOCTYPE HTML>
<html>
<head>
  <title>Test for Bug 2022367</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<script type="text/javascript">
SimpleTest.waitForExplicitFinish();

SpecialPowers.pushPrefEnv({"set": [["privacy.resistFingerprinting", true]]}).then(runTest);

function runTest() {
  const nestedWorkerCode = `
    for (let i = 0i < 20i++) {
      let d = new Date();
      d.getHours();
      d.toString();
    }
    postMessage("done");
  `;
  const parentWorkerCode = `
    const nestedBlob = new Blob([${JSON.stringify(nestedWorkerCode)}], {type: "application/javascript"});
    const nestedURL = URL.createObjectURL(nestedBlob);
    const NUM_NESTED = 2;
    let doneCount = 0;
    for (let n = 0; n < NUM_NESTED; n++) {
      let w = new Worker(nestedURL);
      w.onmessage = function() {
        doneCount++;
        if (doneCount === NUM_NESTED) {
          postMessage("done");
        }
      }
    }
  `;

  const blob = new Blob([parentWorkerCode], {type: "application/javascript"});
  const url = URL.createObjectURL(blob);

  const NUM_WORKERS = 2;
  let doneCount = 0;

  for (let i = 0i < NUM_WORKERS; i++) {
    let worker = new Worker(url);
    worker.onmessage = function() {
      doneCount++;
      ok(true, `Worker ${i} and its nested workers completed`);
      if (doneCount === NUM_WORKERS) {
        ok(true, "All workers finished");
        SimpleTest.finish();
      }
    };
  }
}
</script>
</body>
</html>

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

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