Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quellcode-Bibliothek unload-manual.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/testing/web-platform/tests/hr-time/unload-manual.html


<!DOCTYPE html>
<html>
<head>
  <title>time origin value manual test</title>
  <link rel="help" href="https://w3c.github.io/hr-time/#time-origin-1">
  <link rel="prefetch" href="./resources/unload-a.html">
  <link rel="prefetch" href="./resources/unload-b.html">
  <link rel="prefetch" href="./resources/unload-c.html">
</head>
<body>
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
  <script>
    setup({ explicit_timeout: true });

    const ACCEPTABLE_VARIANCE = 400; // ms

    const isRoughlyEqual = (ab) => Math.abs(a - b) < ACCEPTABLE_VARIANCE;

    const timings = { a: {}, b: {}, c: {} };
    const t = async_test("hr-time time origin");

    window.mark = msg => {
      timings[msg.docName][msg.lifecycleEventName] = {
        performanceNow: msg.performanceNow,
        dateNow: msg.dateNow
      };

      if (msg.docName === "c" && msg.lifecycleEventName === "unload") {
        setTimeout(makeAssertions, 0);
      }
    };

    function makeAssertions () {
      t.step(() => {
        const loadTimeBetweenAandB = timings.b.load.dateNow - timings.a.unload.dateNow;
        const loadTimeBetweenBandC = timings.c.load.dateNow - timings.b.unload.dateNow;

        assert_true(
          isRoughlyEqual(loadTimeBetweenAandB, timings.b.load.performanceNow),
          "Document in reused window's time origin should be time of close of pop-up box."
        );
        assert_true(
          isRoughlyEqual(loadTimeBetweenBandC, timings.c.load.performanceNow),
          "Document in reused window's time origin should be time of close of pop-up box."
        );
        assert_true(
          !isRoughlyEqual(timings.a.unload.performanceNow, 0),
          "Time origin during unload event should match that of rest of document."
        );
        assert_true(
          !isRoughlyEqual(timings.b.unload.performanceNow, 0),
          "Time origin during unload event should match that of rest of document."
        );
        assert_true(
          !isRoughlyEqual(timings.c.unload.performanceNow, 0),
          "Time origin during unload event should match that of rest of document."
        );
      });
      t.done();
    }
  </script>

  <h2>Description</h2>
  <p>This test validates the behavior of <code>performance.now()</code> with respect to its time origin.</p>
  <div id="log">
   <h2>Manual Test Steps</h2>
   <ol>
    <li><a href="resources/unload-a.html" target="_blank">Click here</a>
   </ol>
  </div>
</body>
<html>

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

¤ 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.0.14Bemerkung:  (vorverarbeitet am  2026-08-26) ¤

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






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=655579