Eine aufbereitete Darstellung der Quelle

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


SSL iframe_delivering.html  Interaktion und
PortierbarkeitHTML


 products/Sources/formale Sprachen/C/Firefox/dom/reporting/tests/iframe_delivering.html


<!DOCTYPE HTML>
<html>
<head>
  <title>Test for delivering reports</title>
</head>
<body>

<script type="application/javascript">

function ok(a, msg) {
  parent.postMessage({type: "test", check: !!a, msg }, "*");
}

function is(a, b, msg) {
  ok(a === b, msg);
}

function finish() {
  parent.postMessage({type: "finish" }, "*");
}

function checkReport() {
  return new Promise(resolve => {
    let id = setInterval(_ => {
      fetch("delivering.sjs?task=check&min=3")
      .then(r => r.text())
      .then(text => {
        if (text) {
          resolve(JSON.parse(text));
          clearInterval(id);
        }
      });
    }, 1000);
  });
}

function runTests(extraParams = "") {
  // Call a deprecating operation.
  for (let i = 0; i < 100; ++i) {
    new TestingDeprecatedInterface();
  }
  ok(true, "Created a deprecated interface");

  // Check if the report has been received.
  return checkReport()
  .then(reports => {
    ok(reports.length >= 3, "We should have received a minimum of 3 reports");

    let report = reports[0];
    is(report.contentType, "application/reports+json", "Correct mime-type");
    is(report.origin, "https://example.org", "Origin correctly set");
    is(report.url, "https://example.org/tests/dom/reporting/tests/delivering.sjs" + extraParams, "URL is correctly set");
    ok(!!report.body, "We have a report.body");
    ok(report.body.age > 0, "Age is correctly set");
    is(report.body.url, window.location.href, "URL is correctly set");
    is(report.body.user_agent, navigator.userAgent, "User-agent matches");
    ok(report.body.type, "deprecation", "Type is fine.");
    ok(!!report.body.body, "We have the real report.body");
    is(report.body.body.id, "DeprecatedTestingInterface", "Correct report.body.id");
    is(report.body.body.message, "TestingDeprecatedInterface is a testing-only interface and this is its testing deprecation message.", "We have a report.body.message");
    is(report.body.body.sourceFile, "https://example.org/tests/dom/reporting/tests/delivering.sjs?task=iframe", "report.body.sourceFile");
    is(report.body.body.lineNumber, 40, "report.body.lineNumber");
    is(report.body.body.columnNumber, 5, "report.body.columnNumber");
  });
}

runTests().then(() => {
  finish();
});

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

Messung
CHZG
899910096

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.0Angebot  (Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-11-25) ¤

*Eine klare Vorstellung vom Zielzustand







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,189,091
#Domains=945,596